netscript command reference
The detailed verb-and-flag companion for the published netscript binary
(@netscript/cli). Together with the curated CLI reference, these two
pages cover every public command group and direct subcommand; this page concentrates the extended
groups and flags while the curated page carries the everyday flows. For the package API surface
(the embeddable helpers, not the command tree) see the
@netscript/cli package page.
This page documents the public netscript binary — the CLI published as
@netscript/cli and installed on your PATH — not any maintainer-only tree. Everything here
is verified against netscript <group> --help. To confirm the exact spelling in your
installed version, run netscript --help or netscript <group> --help.
The top-level groups are agent, config, deploy, init, contract, db, generate,
marketplace, plugin, service, and the ui:* commands — each has a section below.
init — scaffold a workspace
netscript init [name] scaffolds a new NetScript workspace. The everyday walk-through is in
the quickstart; every flag is:
| Flag | Description |
|---|---|
--app-name <name> |
Frontend application name (kebab-case). |
--db <engine> |
Database engine: postgres, mysql, mssql, sqlite, or none. |
--service [enabled] |
Scaffold an example oRPC service. |
--service-name <name> |
Example service name. |
--model-name <name> |
Prisma model name for the scaffolded CRUD surface. |
--service-port <port> |
Example service port. |
--cache [enabled] |
Scaffold a shared cache resource. |
--cache-backend <backend> |
Shared cache backend: redis, garnet, or deno-kv. |
--editor <editor> |
Editor config: none, zed, or vscode. |
--no-aspire |
Skip the Aspire orchestration layer. |
--no-git |
Skip git init after scaffolding. |
--force |
Overwrite an existing target directory (default false). |
--ci |
Non-interactive mode (default false). |
-y, --yes |
Accept defaults without prompting (default false). |
--path <path> |
Target directory for scaffold output. |
--dry-run |
Preview the scaffold plan without writing files (default false). |
--json |
Emit a single machine-readable JSON result (default false). |
--from <preset> |
Apply a named scaffold preset. |
agent — install and run agent tooling
netscript agent installs and runs the shared CLI × skills × MCP tooling. See
Agent tooling for the mental model and the
@netscript/mcp reference for the server's tool surface.
| Command | Description |
|---|---|
netscript agent init |
Install NetScript MCP, consumer diagnostic tools, and the canonical skill bundle, add integrations for detected agent hosts, and apply editor setup to a new or existing project. Every host receives the canonical skill bundle under .agents/skills/ and a marked NetScript section in AGENTS.md; Claude Code additionally writes .mcp.json and derives a mirror under .claude/skills/; the VS Code editor writes .vscode/mcp.json; the Zed editor writes .zed/settings.json context_servers. Flags: --host <host> (claude, vscode, or all); --editor <editor> (none, zed, or vscode, inferred from one existing editor directory when omitted); --with-docs installs the expanded exact-version corpus. Unsupported editors fail with manual-configuration guidance. |
netscript agent mcp |
Start the stdio MCP server for an MCP client. Interactive use prints Zed/VS Code setup guidance; see Agent tooling. Flags: --endpoint <url> (telemetry endpoint), --project-root <path>, --docs-root <path> (public documentation root). |
netscript agent drift <sub> |
Manage evidence-gated agent drift records. The group itself prints help; record is its only subcommand. |
agent drift subcommands
| Command | Description |
|---|---|
netscript agent drift record |
Record drift after a fresh successful diagnostic pass. Flags: --resource <name> (required), --summary <text> (required), --details <text>. |
The gate is the point. record appends an entry only when a diagnostic receipt for
--resource exists, exited 0, and is less than 15 minutes old; the receipt itself is
embedded in the entry. Anything else — no receipt, a failed one, a future timestamp, or a
stale one — is refused with a non-zero exit and a message naming how to produce a fresh
receipt (netscript plugin doctor --resource <name>, or the MCP doctor, telemetry, API
introspection, or execute_command tools). A drift note therefore cannot be written from
an agent's recollection of a run it did not just perform.
The same gate backs the MCP record_drift tool, so both surfaces refuse identically.
config — inspect and mutate configuration
netscript config reads and writes the resolved project configuration and manages
runtime overrides.
| Command | Description |
|---|---|
netscript config inspect |
Inspect the resolved project configuration. Flags: --project-root <path>, --json (emit the JSON-stable inspection report). |
netscript config list [filter] |
List the canonical appsettings paths the generator reads, with each path's current value. The optional positional [filter] narrows the listing. Paths present in appsettings.json but not read by the generator are marked (not read by the generator) — which is what makes this the command for finding a setting that is being ignored. Flags: --project-root <path>, --json. |
netscript config get <path> |
Read a resolved configuration value. Flags: --project-root <path>, --json. |
netscript config set <path> <value> |
Set a generated appsettings configuration value. Flag: --project-root <path>. |
netscript config override <sub> |
Manage runtime overrides (see below). |
netscript config runtime <sub> |
Compatibility lifecycle aliases for runtime override snapshots — carries the publish and rollback subcommands only. |
config override subcommands
| Command | Description |
|---|---|
netscript config override publish <topic> <file> |
Publish and atomically activate a versioned runtime topic file. Flag: --version <version> (defaults to the source filename). |
netscript config override rollback <topic> <version> |
Atomically point a runtime topic at an existing version. |
netscript config override list |
List active versions and payloads. |
netscript config override get <path> |
Read an override value at <path>. |
netscript config override set <path> [value] |
Set an override value. Flag: --rollout <percent>. |
netscript config override clear <path> [value] |
Clear an override value. Flag: --rollout <percent>. |
netscript config override enable <path> [value] |
Enable an override. Flag: --rollout <percent>. |
netscript config override disable <path> [value] |
Disable an override. Flag: --rollout <percent>. |
netscript config runtime publish <topic> <file> and
netscript config runtime rollback <topic> <version> are lifecycle aliases for the
matching config override verbs.
marketplace — discover and publish plugins
| Command | Description |
|---|---|
netscript marketplace search <query> |
Search the NetScript plugin marketplace. |
netscript marketplace publish |
Publish a NetScript plugin to the marketplace. |
generate — code generation
Beyond generate plugins and generate runtime-schemas (covered in the
CLI reference), the group also regenerates the Aspire
helper layer.
| Command | Description |
|---|---|
netscript generate aspire |
Regenerate Aspire AppHost helpers from appsettings.json. Flag: --project-root <path>. |
netscript generate runtime-schemas |
Generate JSON Schema files for runtime config topics. Flags: --project-root <path>, --dry-run, --force, --verbose. |
netscript generate plugins |
Authoritative command: run each installed plugin's declared runtime registry generator under the project configuration. The workers generator discovers project-authored top-level workers/jobs/*.ts modules independently of official samples, excluding declared helper files such as job-tools.ts. Flags: --project-root <path>, --dry-run, --verbose. |
netscript generate resource <resource> |
Generate a typed Fresh resource slice from a named query procedure. Required flag: --procedure <path>. Selection flags: --client <service>, --app <name>, --project-root <path>, --route <path>. Optional layers: --form, --partial, --stream. Application flags: --dry-run, --force, --json. |
Generated registries are derived artifacts. Add or replace job modules in workers/jobs/, then run
netscript generate plugins; do not hand-edit .netscript/generated/**. Removing the official
workers samples does not disable custom-job discovery.
plugin — extended verbs
The common plugin verbs (install, new, list, doctor, info, remove) are in
the CLI reference. The full group also carries:
| Command | Description |
|---|---|
netscript plugin scaffold <name> |
Scaffold a NetScript plugin package. Flags: --target <path>, --project-root <path>, --force. |
netscript plugin sync |
Compatibility alias that delegates registry synchronization to netscript generate plugins. Flag: --project-root <path>. |
netscript plugin update <name> |
Re-pin and regenerate an installed plugin. Flag: --project-root <path>. |
netscript plugin item-add <name> <item> [args...] |
Scaffold an item with a custom plugin. Flag: --project-root <path>. |
netscript plugin enable <pkg> [args...] |
Run a plugin's published enable command. Flag: --project-root <path>. |
netscript plugin disable <pkg> [args...] |
Run a plugin's published disable command. Flag: --project-root <path>. |
netscript plugin setup <pkg> [args...] |
Run a plugin's published setup command. Flag: --project-root <path>. |
netscript plugin auth <sub> |
Configure auth and manage sessions (see below). |
netscript plugin ai <verb> [...args] |
Configure AI tools, agents, models, providers, and MCP servers. Flag: --project-root <path> (the only flag NetScript consumes). |
plugin ai is a pass-through, not a command group with its own verbs. NetScript strips
--project-root, then runs the installed @netscript/plugin-ai package's CLI in a child
deno run process and forwards every remaining argument verbatim, printing its output and
propagating its exit code. The verb vocabulary therefore belongs to that plugin's release,
not to this reference; see the
@netscript/plugin-ai reference. Invoking it with no verb is an error.
plugin auth subcommands
| Command | Description |
|---|---|
netscript plugin auth backend set <backend> |
Select the active auth backend. Flag: --project-root <path>. |
netscript plugin auth backend show |
Show the currently selected auth backend. Flag: --project-root <path>. |
netscript plugin auth provider set |
Configure an auth provider. Flags: --preset <preset>, --client-id <id>, --client-secret <secret>, --redirect-uri <uri>, --issuer <issuer>, --api-key <key>, --cookie-password <password>, --secret <secret>, --kv-oauth-key <key>, --project-root <path>. |
netscript plugin auth secret generate [kind] |
Generate auth secret material. |
netscript plugin auth session list |
List auth sessions. Flag: --stream-url <url>. |
netscript plugin auth session revoke <id> |
Revoke an auth session by id. Flag: --auth-url <url>. |
The backends selectable here are the same ones read at runtime by
NETSCRIPT_AUTH_BACKEND — see add authentication.
service — extended verbs
The common service add, service list, and service generate verbs are in the
CLI reference. The full group also carries:
| Command | Description |
|---|---|
netscript service add |
Add a service workspace, v1 contract, and Aspire registration. Flags: --name <name> (kebab-case), --port <port>, --refs <refs> (comma-separated service references), --project-root <path>, --force, --with-client (scaffold app-workspace client and query helpers). |
netscript service set <name> |
Update an existing service and regenerate Aspire helpers. Flags: --port <port>, --enabled <enabled>, --project-root <path>. |
netscript service remove <name> |
Remove a service workspace and reverse its registrations. Flags: --keep-contract (retain paired contract files), --project-root <path>. |
netscript service add-handler <service> <procedure> |
Bind a contract procedure with a compiling service handler stub. Flags: --version <version> (default v1), --project-root <path>. |
netscript service ref add <caller> <callee> |
Add a service reference from <caller> to <callee>. Flag: --project-root <path>. |
netscript service ref remove <caller> <callee> |
Remove a service reference. Flag: --project-root <path>. |
contract — extended verbs
The common contract add and contract list verbs are in the
CLI reference. The full group also carries:
| Command | Description |
|---|---|
netscript contract add-route <contract> <procedure> --method <method> --path <route> |
Append a typed oRPC procedure to a contract. Required flags: --method <method>, --path <route>. Optional: --input <schema>, --output <schema>, --version <version> (default v1), --project-root <path>. |
netscript contract inspect <name> |
Inspect contract procedures and schema expressions. Flags: --version <version> (default v1), --json, --path <path>. |
netscript contract remove <name> |
Remove a contract and regenerate version aggregates. Flags: --version <version> (remove only the named version), --path <path>. |
netscript contract version add <name> --from <version> --to <version> |
Promote a contract into a new version directory. Required flags: --from <version>, --to <version>. Optional: --path <path>, --force. |
db — extended verbs
The everyday database workflow (init, generate, migrate, seed, status,
studio, introspect, reset) is in the
CLI reference — and all db commands require Aspire to be
running (cd aspire && aspire start) unless you scaffolded a file-backed sqlite
engine. The full group also carries the target-management and migration-history verbs:
| Command | Description |
|---|---|
netscript db add <engine> |
Add a database workspace to an existing project. <engine> is postgres, mysql, mssql, or sqlite. Flags: --name <key> (config key), --project-root <path>, --force. |
netscript db list |
List registered database targets. Flags: --project-root <path>, --json. |
netscript db remove <configKey> |
Deregister a database target. Flags: --project-root <path>, --purge (delete the workspace when no target still uses it). |
netscript db deploy |
Apply pending migrations without creating one. Flags: --db <target> (config key, database name, or all), --project-root <path>. |
netscript db validate |
Validate database schemas. Flags: --db <target>, --project-root <path>. |
netscript db resolve |
Resolve migration history state. Flags: --db <target>, --project-root <path>, --applied <migration> (mark as applied), --rolled-back <migration> (mark as rolled back). |
ui:* — Fresh UI registry
ui:init and ui:add are in the CLI reference. The full set
also lists, updates, and removes copied registry items:
| Command | Description |
|---|---|
netscript ui:list |
List Fresh UI registry items. Flags: --project-root <path>, --json, --collections (include collections). |
netscript ui:update [name] |
Update unmodified Fresh UI registry files. Flag: --project-root <path>. |
netscript ui:remove <name> |
Remove a copied Fresh UI registry item. Flag: --project-root <path>. |
Because Fresh UI is copy-source, ui:update only touches registry files you have not
modified — your edits are never overwritten. See
customize Fresh UI.
deploy — cloud and container targets
The CLI reference covers the Deno Deploy and OS service (Servy)
paths. The deploy group also exposes a family of routed cloud and container targets, the
packaging verbs, and artifact-copy and log verbs.
Discovering targets
| Command | Description |
|---|---|
netscript deploy list |
List registered deploy targets and operations. Prints key, advertised operations, and label per line. Flag: --json (emit machine-readable target descriptors). |
deploy list reads the live registry, so it is the authoritative answer to which targets are
registered and which operations their adapters advertise. The advertised set can be wider than
the router's callable command set; use each target's help output or the routed-verb table below to
see which verbs the CLI exposes. Ten targets are
registered by default: azure-aca, azure-aks, azure-app-service, cloud-run,
compose, deno-deploy, docker, kubernetes, linux-service, windows-service.
Routed cloud and container targets
These seven groups are generated by one router. Each is a thin command that parses flags and dispatches to a registry-resolved adapter; the adapter holds all target-specific logic.
| Command group | Verbs | Description |
|---|---|---|
netscript deploy docker <verb> |
plan up down status logs |
Manage the Docker image deployment target. |
netscript deploy compose <verb> |
plan up down status logs |
Manage the Docker Compose deployment target. |
netscript deploy kubernetes <verb> |
plan up down |
Manage the Kubernetes deployment target. |
netscript deploy azure-aca <verb> |
plan up down |
Manage the Azure Container Apps deployment target. |
netscript deploy azure-app-service <verb> |
plan up down |
Manage the Azure App Service deployment target. |
netscript deploy azure-aks <verb> |
plan up down |
Manage the Azure Kubernetes Service deployment target. |
netscript deploy cloud-run <verb> |
plan up down |
Manage the Google Cloud Run deployment target. |
The verb lists differ because a target only gets a subcommand for an operation it
advertises. The router walks a fixed candidate list — plan, up, down, status,
logs, rollback, secrets — and skips any operation missing from the adapter's
operations, so a target never exposes a verb it cannot perform. The two container targets
advertise status and logs; the five cloud targets do not.
Running a target group with no verb prints help, as every command group in the CLI does. That is the group's default action, not a sign that the target is unimplemented.
| Verb | Description |
|---|---|
plan |
Emit or preflight deployment artifacts. |
up |
Bring the deployment up. |
down |
Bring the deployment down. |
status |
Show deployment status. |
logs |
Show deployment logs. |
Every routed verb on every target shares the same flags: --project-root <dir>,
--output-dir <dir> (directory for emitted deployment artifacts),
--environment <name> (deployment environment passed to the target), --clear-cache
(clear target deployment state and do not persist new values), and --non-interactive.
Packaging
| Command | Description |
|---|---|
netscript deploy desktop <sub> |
Package and publish native Deno Desktop applications. The group prints help; package and release do the work. |
netscript deploy desktop package |
Package an enabled desktop app into Deno Desktop native formats. Flags: --project-root <path>, --app <id>, --target <triple>, --all-targets, repeatable --format <format>, --compression <algorithm> (default xz), -o, --output-dir <dir> (default .deploy/desktop/packages). Without a target flag it uses the host OS and architecture; an unsupported target fails rather than producing a wrong artifact. |
netscript deploy desktop release <sub> |
Prepare or serve a native release. The group prints help for its two subcommands. |
netscript deploy desktop release prepare |
Prepare and sign release metadata. Required flags: --target <target>, --version <version>, --sequence <n>, --current-runtime <path>, repeatable --from <version>=<runtime-path>, --private-key-file <path>. Optional: --project-root <path>, --channel <name> (default stable), --release-dir <dir> (default .deploy/desktop/releases). |
netscript deploy desktop release serve |
Serve a prepared release directory. Flags: --project-root <path>, --release-dir <dir> (default .deploy/desktop/releases), --hostname <host> (default 127.0.0.1), --port <port> (default 8787), --base-path <path> (default /). |
netscript deploy package-cli |
Compile the NetScript CLI itself into a self-shippable Windows .exe. Flags: -o, --output-dir <dir> (default ./.deploy/windows; a scripts/ subdirectory is used), --target <triple> (default x86_64-pc-windows-msvc), --no-bundle (compile directly from source — larger output), -v, --verbose. |
package-cli bundles before compiling by default and falls back to compiling from source if
the bundle step fails, so --no-bundle is a size/behaviour trade-off rather than a repair.
Artifact copy, logs, and upgrade
| Command | Description |
|---|---|
netscript deploy copy |
Copy build artifacts to the install directory (no Servy registration). Flags: --deploy-dir <path> (default ./.deploy/windows), --install-dir <path> (default auto-resolved from the manifest), --verbose, --dry-run. |
netscript deploy start [service] |
Start all registered Windows services, or one named service, via Servy. Flags: --install-dir <dir>, --deploy-dir <dir>, --servy-cli <path>, --no-health-check, --verbose. |
netscript deploy stop [service] |
Stop all registered Windows services in reverse manifest order, or stop one named service. Flags: --install-dir <dir>, --deploy-dir <dir>, --servy-cli <path>, --verbose. |
netscript deploy status [service] |
Show Servy status for all registered Windows services, or one named service. Flags: --install-dir <dir>, --deploy-dir <dir>, --servy-cli <path>, --verbose. |
netscript deploy logs <service> |
Show recent logs for a service. Flags: --install-dir <dir>, --deploy-dir <dir> (default ./.deploy/windows), -n, --lines <n> (default 50), --errors (show the error log instead of stdout), --list (list available log files), -f, --follow (tail the log). |
netscript deploy uninstall [service] |
Stop and remove all registered Windows services, or one named service, from the service manager. Flags: --install-dir <dir>, --deploy-dir <dir>, --no-stop. |
netscript deploy upgrade |
Build, sync, reinstall, and restart services in one step. Flags: --deploy-dir <path> (default ./.deploy/windows), --install-dir <path>, --servy-cli <path>, --skip-compile, --skip-install, --skip-start, --verbose, --dry-run. |