@nwire/cli
v0.15.1
Published
Nwire CLI — branded TUI. Dev, run, please, build, test, fmt, lint, check, ps, logs, cache, ls, studio. One surface for the whole framework.
Readme
@nwire/cli
The
nwireumbrella CLI —dev,run,cache,studio,please,ls,trace,watch,replay,infra, …
Built on citty: one root command per file under commands/. Long-lived
processes (dev, run, studio) go through @nwire/kernel;
build/quality passthroughs (fmt, lint, check, test) shell out.
Reads nwire.config.ts (or falls back to convention) to locate the
consumer's apps registry and the .nwire/ cache.
pnpm add -D @nwire/cliAfter install the nwire binary is on node_modules/.bin.
Commands
# Run / develop
nwire dev # boot every app in the registry, hot-reload
nwire run <wire> # boot one wire
nwire ps # list running processes
nwire logs <wire> # tail logs
# Static + dynamic introspection
nwire cache # rebuild .nwire/*.json from source
nwire ls # list actions / events / actors per app
nwire studio # open Studio against the cache + live runtime
# Live observability (hooks + events)
nwire trace [--correlation <id>] [--limit N]
# tail event stream from a running wire; with --correlation
# renders the causation tree.
nwire watch <hook> [--limit N]
# tail hook-step telemetry. Supports wildcards:
# `nwire watch plugin.boot:*`
nwire replay --file <recording.json> [--hook <name>]
# replay a recorded hook run against the live wire,
# or print an offline trace.
# Operator
nwire please <action> [--<arg> <value> ...]
# dispatch an action / query / defineCommand
# Quality + build
nwire fmt / nwire lint / nwire check / nwire test / nwire build
# Misc
nwire infra up # docker-compose up (postgres/redis/mongo/mailhog/logto/minio)
nwire doctor # environment + config sanity checkRunning nwire with no args prints a greeting + the command list.
Surface
| Export | Role |
| ------------------------------- | --------------------------------------------------- |
| nwire binary | One subcommand per file under src/commands/. |
| loadConfig(cwd) | Programmatic config loader. |
| resolveAppsEntry(cwd, config) | Locate the apps registry from convention or config. |
Adding a command: write src/commands/<name>.ts with citty's
defineCommand, register it in src/cli.ts. To make it reachable
from Studio + MCP, register a kernel router handler too.
Related
@nwire/kernel— host for long-lived processes; the CLI delegatesdev/run/studioto it.@nwire/scan—nwire cachewrites.nwire/*.jsonvia this package.@nwire/please—nwire pleasedelegates here.@nwire/mcp— same kernel router exposed to AI clients over stdio.@nwire/studio—nwire studioboots the Vite dev server for it.
Status
v0.x — command surface is additive. trace / watch / replay operate on the runtime's /__nwire/* HTTP+SSE endpoints; offline modes fall back to .nwire/ cache where possible.
