@netscript/cli@0.0.10Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
The NetScript command surface: scaffold a workspace, then grow it — contracts, services, databases, plugins, Fresh UI, deployment — with verbs that regenerate the derived wiring for you.
Examples
Create an embeddable NetScript CLI command tree.
Create an embeddable NetScript CLI command tree.
import { createPublicCli } from "@netscript/cli"; const cli = createPublicCli({ cwd: () => "/workspace/app", resolvePath: (path = ".") => `/workspace/app/${path}`, });
Functions
Create a plugin host loader from structural public ports.
Create the public NetScript CLI command tree.
Dispatch a framework plugin verb through deno x -A jsr:<pkg>/cli.
Validate, plan, and reconcile every manifest service client.
Inspect an embeddable CLI target for diagnostics.
Return whether a value is a framework-owned plugin verb.
Resolve the JSR CLI specifier for a plugin package.
Resolve a plugin manifest by package spec.
Run the public CLI with consistent error formatting.
Scaffold a plugin package from skeleton templates.
Interfaces
Diagnostic summary for an embeddable CLI target.
Target accepted by inspectCli.
- command: PublicCliCommand
Optional command tree to inspect.
Options for dispatching a plugin verb.
- processRunner: { exec(): Promise<PluginDispatchProcessResult>; }command: string,args: readonly string[],options?: { readonly cwd?: string; readonly env?: Readonly<Record<string, string>>; }
Process runner used to invoke Deno.
- projectRoot: string
Project root used as the subprocess working directory.
Dependencies for manifest-owned service-client generation.
- clientScaffolder: { plan(): Promise<projectRoot: string,projectName: string,serviceName: string>; needsWrite({ readonly serviceName: string; readonly path: string; readonly content: string; }): Promise<boolean>; write(plan: { readonly serviceName: string; readonly path: string; readonly content: string; }): Promise<void>; }plan: { readonly serviceName: string; readonly path: string; readonly content: string; },force: boolean
Canonical client-module planner and writer.
- readProjectName: (projectRoot: string) => Promise<string>
Resolve the project scope used by generated contract imports.
- serviceResolver: { discoverServices(projectRoot: string): Promise<readonly { readonly name: string; }[]>; }
Sorted manifest service discovery.
Request for reconciling manifest-owned service client modules.
- dryRun: boolean
Report the complete plan without writing files.
- force: boolean
Rewrite identical generated files.
- projectRoot: string
Absolute project root.
Deterministic result from service-client generation.
- dryRun: boolean
Whether this invocation intentionally withheld writes.
- planned: readonly PlannedServiceClientFile[]
Fully validated output plan in manifest order.
- skipped: readonly string[]
Paths already current and therefore skipped.
- written: readonly string[]
Paths actually written; empty for a dry run.
One planned service-client output and whether it needs a write.
- content: string
Rendered TypeScript module.
- path: string
Generator-owned output path.
- serviceName: string
Manifest service name.
- willWrite: boolean
Whether current content requires reconciliation.
Result of a public process dispatch.
Plugin host loader contracts.
- configLoader: { load(projectRoot: string): Promise<Readonly<Record<string, unknown>>>; }
Config loader for
netscript.config.ts. - emitter: { emit(contributions: readonly unknown[]): Promise<unknown>; }
Emitter used by the walker pipeline.
- extractor: { extract(files: readonly unknown[]): Promise<readonly unknown[]>; }
Extractor used to read contributions from walked files.
- fs: unknown
Filesystem adapter reserved for host-side template expansion.
- manifestResolver: { resolve(spec: string): Promise<PluginHostManifest | undefined>; }
Manifest resolver used for configured plugin specs.
- projectRoot: string
Project root for configuration and walker operations.
- walker: { walk(root: string): Promise<readonly unknown[]>; }
Walker used to discover plugin source files.
Public host loader port.
- resolve(): Promise<PluginHostState>
Resolve the current plugin host state.
Plugin manifest value returned by public host loader contracts.
- contributions: unknown
Runtime contribution payload owned by the plugin package.
- description: string
Optional human-readable description.
- name: string
Plugin package name.
- version: string
Plugin semantic version.
Resolved plugin host state.
- config: Readonly<Record<string, unknown>>
Loaded project configuration.
- contributions: unknown
Merged contribution payload.
- emissions: readonly unknown[]
Registry emissions produced by the walker.
- plugins: readonly PluginHostManifest[]
Resolved plugin manifests.
Dependencies for plugin package scaffolding.
- fs: { readFile(path: string): Promise<string>; writeFile(): Promise<void>; exists(path: string): Promise<boolean>; createDir(path: string): Promise<void>; }path: string,content: string
Filesystem adapter used by the scaffold use case.
Options for scaffolding a plugin package.
- overwrite: boolean
Whether existing files may be overwritten.
- pluginName: string
Full plugin package name, for example
@acme/plugin-billing. - targetPath: string
Directory that receives generated files.
- templateContent: Readonly<Record<string, string>>
Optional embedded template content keyed by registry path.
- templateRegistry: readonly string[]
Optional template path registry.
Result returned after plugin package scaffolding.
- directoriesCreated: readonly string[]
Directories created by the scaffold use case.
- filesCreated: readonly string[]
Files written by the scaffold use case.
- filesSkipped: readonly string[]
Files skipped because overwrite was disabled.
Public command tree returned by createPublicCli.
- getVersion: () => string | undefined
Return the command version printed by
--version. - parse: (args?: string[]) => Promise<unknown> | unknown
Parse command-line arguments.
Host services supplied by the binary edge.
- cwd: () => string
Return the current working directory.
- resolvePath: (path?: string) => string
Resolve a path from the current working directory.
Runtime hooks supplied by the public CLI binary.
Options for resolving a plugin manifest.
- manifestResolver: { resolve(spec: string): Promise<PluginHostManifest | undefined>; }
Manifest resolver used to resolve the package spec.
Type Aliases
| "remove"
| "enable"
| "disable"
| "sync"
| "setup"
| "update"
| "doctor"
| "info"
Framework-owned plugin verbs.
Variables
Framework-owned plugin verb constants.