Source-Wire includes a tiny local validation CLI.
It validates explicit files against explicit Source-Wire schema names.
It does not import sources, sync connectors, call servers, create memories, or promote trusted records.
source-wire validate <schema> <file...>During local development, run the built CLI directly:
Use Node.js 22 with npm from the repository root. For the complete local setup path, read the Quickstart.
Install dependencies first:
npm installnpm run build
node dist/cli.js validate <schema> <file...>| Schema name | Expected file shape |
|---|---|
project-context-pack |
One JSON Project Context Pack file |
second-brain-v1 |
One JSON /2nd-brain response fixture file |
chat-export-message |
One JSONL chat export file with one message per line |
owner-hosted-api-mcp-boundary |
One JSON owner-hosted API plus MCP boundary proof-case fixture |
Validate a Project Context Pack:
node dist/cli.js validate project-context-pack examples/fixtures/project-context-pack/project-context.jsonValidate a second-brain-v1 response fixture:
node dist/cli.js validate second-brain-v1 examples/fixtures/second-brain/use-2nd-brain-example.jsonValidate a chat export JSONL file:
node dist/cli.js validate chat-export-message examples/fixtures/chat-export/agent-session.jsonlValidate the owner-hosted API plus MCP boundary proof cases:
node dist/cli.js validate owner-hosted-api-mcp-boundary examples/fixtures/owner-hosted-api-mcp-boundary/boundary-proof-cases.jsonValidate multiple files with the same schema:
node dist/cli.js validate project-context-pack file-a.json file-b.jsonSuccessful validation prints:
ok <file>
Failed validation prints:
failed <file>
- <error>
0: all files passed.- non-zero: one or more files failed, the schema name is invalid, or no file path was provided.
The CLI is intentionally small.
It does not:
- crawl directories by default,
- import source collections,
- sync connectors,
- call API servers,
- call MCP server runtime,
- call databases,
- call memory engines,
- create trusted Memory Records,
- promote candidate memories,
- inspect private implementation code.
Run:
npm run cli:smokeThe smoke command builds the package, validates the four public schema-backed fixtures, and verifies that invalid synthetic payloads fail.