CLI Reference
Sigil’s CLI is built on bunli and runs via Bun.
sigil up [name]
Section titled “sigil up [name]”Start an environment from a config file.
| Argument | Description | Default |
|---|---|---|
name | Instance name | "default" |
| Flag | Description | Default |
|---|---|---|
-c, --config | Path to config file | "sigil.config.ts" |
Behavior:
- Checks if an instance with this name is already running. Errors if so.
- Dynamically imports the config file (must export an
Environmentas default) - Writes instance state to
.sigil/instances/<name>.json - Starts all entities sequentially via
env.up() - Keeps the process alive until interrupted
Signal handling: On SIGINT (Ctrl+C) or SIGTERM, calls env.down(), removes the state file, and exits cleanly.
Exit codes:
0— Clean shutdown1— Error (instance already running, config load failure, startup failure)
sigil down [name]
Section titled “sigil down [name]”Stop a running environment.
| Argument | Description | Default |
|---|---|---|
name | Instance name | "default" |
Behavior:
- Reads instance state from
.sigil/instances/<name>.json - If the process is dead, cleans up the stale state file
- If alive, sends
SIGTERMto thesigil upprocess - Polls for process exit (500ms intervals, 30s timeout)
- Falls back to
SIGKILLif the process doesn’t exit - Removes the state file
The down command does not re-import the config. It signals the up process, which handles its own teardown.
sigil status [name]
Section titled “sigil status [name]”Show running instances.
| Argument | Description | Default |
|---|---|---|
name | Instance name (optional) | Show all |
Output format:
Instance: default (PID 12345, running, started 5m ago) Config: /path/to/sigil.config.ts Entities: db running backend running frontend runningStatus values:
running— PID is alivestale— PID is dead (state file is automatically cleaned up)
sigil init
Section titled “sigil init”Initialize a new Sigil project in the current directory.
Global Flags
Section titled “Global Flags”| Flag | Description |
|---|---|
--help | Show help |
--version | Show version |