AtlatestRepositorysigil-repl
sigil-repl / treeREADME.md
1
# sigil-repl3
Interactive REPL infrastructure for4
[Sigil](https://codeberg.org/sigil/sigil). Provides prompt rendering,5
multi-line input handling, debug-mode stack inspection, and a shared6
command registry so applications can embed a Sigil REPL with their7
own commands.9
The `sigil repl` CLI command itself lives in sigil-cli at10
`(sigil cli repl)`; this package exposes only the embeddable library11
surface. sigil-nrepl reuses these primitives for the network REPL.13
## Modules15
| Module | Purpose |16
|-------------------------|---------------------------------------------------------------------------------|17
| `(sigil repl)` | REPL entry point, prompt rendering, debug-mode formatting, command parsing |18
| `(sigil repl commands)` | Shared command registry plus the built-in REPL commands (`,help`, `,q`, etc.) |20
## Embedding a REPL22
```scheme23
(import (sigil repl))25
(run-repl) ; starts the interactive loop on stdin/stdout26
```28
To register custom commands:30
```scheme31
(import (sigil repl commands))33
(register-repl-command!34
name: ",time"35
description: "Print elapsed time for an expression."36
handler: (lambda (args) ...))37
```39
## Build and test41
```42
sigil deps install43
sigil build44
sigil test --report45
```47
Local development against an unreleased sigil monorepo:49
```50
sigil deps install --redirects ./dev-redirects.sgl51
sigil build --redirects ./dev-redirects.sgl52
```54
## License56
BSD-3-Clause. See `LICENSE` in the sigil monorepo for the canonical copy.