@solidus-network/cli
v0.1.0
Published
Solidus Network CLI — wire did:solidus, verify, and agent identity into your app in one command
Maintainers
Readme
@solidus-network/cli
Wire Solidus — self-sovereign identity, verifiable credentials, did:solidus —
into your app in one command. Every command is agent-unattended: --json output, clean exit codes
(0 ok / 1 error), no prompts required. Your coding agent can run it directly.
Install
No install needed — run it with npx:
npx @solidus-network/cli initOr install globally:
npm install -g @solidus-network/cli
solidus initCommands
| Command | Does | Needs a key? |
|---|---|---|
| solidus init [--yes] [--with-mcp] | Detect your framework (Next.js today) and wire in .env.local placeholders + a lib/solidus.ts SDK stub | No — write-only to local files, never a secret |
| solidus did resolve <did> | Resolve a did:solidus DID document | No |
| solidus did create --public-key <hex> [--signer-key <hex>] | Register a DID the signer key owns | Yes — SOLIDUS_SIGNER_KEY env var or --signer-key |
| solidus credential verify <vcId> | Verify a Solidus verifiable credential | No |
| solidus mcp install | Add @solidus-network/mcp (the Solidus MCP server — run-time agent tools) to this project's .mcp.json, merging with any existing servers | No |
--with-mcp is opt-in and off by default — even under --yes. solidus init scaffolds the target app;
solidus mcp install configures the target app's own agent tooling — a separate consent boundary a Next.js
scaffold shouldn't silently cross. Pass --with-mcp explicitly to chain the two: solidus init --yes --with-mcp
runs init then mcp install in one step and returns a merged result ({"framework":...,"wrote":[...],"mcp":
{"wrote":"...", "alreadyPresent":false}}).
Every command also accepts the global --json flag for machine-readable output.
--json contract
--jsonon: stdout is exactly one line ofJSON.stringify(result)— no color, no spinner, no extra logging.--jsonoff: stdout is human-readable (key: valueper line).- Exit
0: the command completed and printed a result — even a "not found" answer (did resolveon an unregistered DID returns{"resolved":false}with exit0; that is a valid answer, not an error). - Exit
1: the command threw — network failure, invalid input, missing signer key. The error message goes to stderr, formatted the same way (--json→{"error": "..."}, human → plain text).
Environment variables
| Variable | Default | Used by |
|---|---|---|
| SOLIDUS_RPC_URL | https://rpc.solidus.network | every command |
| SOLIDUS_SDK_MODE | testnet | every command |
| SOLIDUS_SIGNER_KEY | none | did create only |
solidus login (interactive credential storage) is not shipped yet — set SOLIDUS_SIGNER_KEY yourself for
now.
Quickstart: wire a Next.js app, then resolve and verify
cd my-nextjs-app
npx @solidus-network/cli init --yes --json
# {"framework":"nextjs","wrote":["/path/to/my-nextjs-app/.env.local","/path/to/my-nextjs-app/lib/solidus.ts"]}
npx @solidus-network/cli did resolve did:solidus:testnet:doesnotexist --json
# {"did":"did:solidus:testnet:doesnotexist","document":null,"resolved":false}
npx @solidus-network/cli credential verify vc-123 --json
# {"vcId":"vc-123","result":{"valid":false,"error":"Credential not found","checks":{...}}}init is idempotent and non-destructive: re-running it never clobbers existing content and writes nothing
new once your app is already wired.
License
Apache-2.0
