AtlatestRepositorysigil-repl
1# sigil-repl
2
3Interactive REPL infrastructure for
4[Sigil](https://codeberg.org/sigil/sigil). Provides prompt rendering,
5multi-line input handling, debug-mode stack inspection, and a shared
6command registry so applications can embed a Sigil REPL with their
7own commands.
8
9The `sigil repl` CLI command itself lives in sigil-cli at
10`(sigil cli repl)`; this package exposes only the embeddable library
11surface. sigil-nrepl reuses these primitives for the network REPL.
13## Modules
15| 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 REPL
22```scheme
23(import (sigil repl))
25(run-repl) ; starts the interactive loop on stdin/stdout
26```
28To register custom commands:
30```scheme
31(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 test
41```
42sigil deps install
43sigil build
44sigil test --report
45```
47Local development against an unreleased sigil monorepo:
49```
50sigil deps install --redirects ./dev-redirects.sgl
51sigil build --redirects ./dev-redirects.sgl
52```
54## License
56BSD-3-Clause. See `LICENSE` in the sigil monorepo for the canonical copy.