nwire CLI
pnpm exec nwire <command> [args]
# or globally:
pnpm add -g @nwire/cli
nwire <command>Commands
nwire dev
Boots dev-all topology + opens Studio in parallel.
nwire dev
# equivalent to:
# NWIRE_TOPOLOGY=dev-all pnpm exec vite-node apps/run.ts &
# cd packages/nwire-studio && pnpm devWatches modules/**, apps/**, packages/nwire-*/src/** and restarts the wire on save. Studio's HMR handles its own reloads.
nwire run <wire>
Runs a single wire topology. Resolves apps/topologies/<wire>.topology.ts.
nwire run lms # → apps/topologies/lms.topology.ts
nwire run prod-split # → apps/topologies/prod-split.topology.tsEquivalent to NWIRE_TOPOLOGY=<wire> pnpm exec vite-node apps/run.ts.
nwire cache
Builds .nwire/*.json static reflection cache from your apps.
nwire cache
# wrote 4 apps, 9 modules, 25 actions, 23 events, 18 routes to .nwire/Studio reads from this cache via Vite middleware at /__nwire/manifest.json. Run after adding/renaming actions, modules, etc. (nwire dev runs it automatically on first start.)
nwire call <action> '<json-input>'
Dispatches an action via the running learnflow-please wire. Single-shot.
nwire call submissions.submit-answer \
'{"studentId":"avi","exerciseId":"ex-1","answer":"alef"}'Useful for shell scripts, smoke tests, cron-replacements during dev. Equivalent to a curl against /_nwire/dispatch but typed.
nwire please [...args]
Passthrough to the @nwire/please runner. Use for arbitrary scripts that need the runtime booted.
nwire please scripts/reseed.ts --tenant school-tlvnwire ls
Lists every wire (topology) and every action grouped by app + module.
nwire ls
# wires:
# dev-all (all 4 apps, in-memory bus)
# lms (lms-only)
# lx (lx-only)
# competency (competency-only)
#
# actions:
# learnflow/submissions
# submissions.submit-answer
# submissions.flag-for-review
# submissions.grade-submission
# …
# learnflow/enrollments
# enrollments.enroll-student
# …nwire studio
Launches Studio (@nwire/studio) on port 7777. Builds the static cache first if needed.
nwire help
Lists every command + flag.
Conventions
| Env var | Purpose |
|---|---|
NWIRE_TOPOLOGY | Topology name to run (overrides argv) |
NWIRE_INSPECT_URL | Where Studio's /_nwire/* proxy points by default |
PORT | Override topology's HTTP port |
See also
- Concepts → Topology — what
<wire>resolves to - @nwire/scan — what
nwire cacheproduces - Studio guide — the Run page is
nwire runwith a UI