@unispec-ai/cli
v0.1.2
Published
The unified `unispec` CLI — contracts registry workflow plus memory/vector/kb/agents product commands.
Readme
@unispec-ai/cli
The unified unispec CLI for the Unispec platform.
- Registry verbs stay top-level — the contracts workflow is the brand:
unispec init / validate / publish / pull / generate / diff / search / project. - Platform products are noun groups —
unispec memory …,unispec vector …,unispec kb …,unispec agents …(mounted from@unispec-ai/sdk, which no longer ships its ownlibrabin), plusunispec config …for the product config file.
Renamed from
@unispecai/cli(never published under that name).
Install
npm install -g @unispec-ai/cli
unispec --helpRun locally (this monorepo)
From the repository root:
npm install
npm run build -w @unispec-ai/sdk -w @unispec-ai/registry -w @unispec-ai/cli
node packages/registry-cli/dist/index.js --helpAuthentication
unispec login stores credentials in ~/.config/unispec/config.json and
supports both credential kinds:
# Platform API key (lb-sk_…) — preferred; works everywhere incl. CI.
# Used by the product groups AND accepted by registry commands.
unispec login --api-key lb-sk_xxx
# Firebase ID token — user-interactive registry flows
unispec login --token <id-token>
# Point at a different registry
unispec login --base-url http://localhost:8081Environment variables:
UNISPEC_API_KEY— platform API key (product groups + registry fallback)UNISPEC_TOKEN— registry access token (takes precedence for registry commands)UNISPEC_BASE_URL— overrides the API base URL (registry default:https://registry.unispec.ai; product default:https://unispec.ai)
The product groups also honor the legacy ~/.libra/config.json and the
deprecated LIBRA_API_KEY / LIBRA_BASE_URL env vars for one cycle.
Registry workflow
unispec login --api-key lb-sk_xxx
unispec init acme/support-triage
cd support-triage
unispec validate --create-if-missing
unispec publish --version 1.0.0 --create-if-missing
unispec pull acme/[email protected]Product commands
unispec memory add "I prefer dark mode" --user-id alice
unispec memory search "preferences" -u alice
unispec vector create products --dimension 384
unispec kb upload docs ./faq.pdf
unispec agents chat support-bot "How do refunds work?"
unispec config set defaults.user_id aliceEach group accepts --json / --agent before the verb for machine-readable
output (unispec memory --agent search "preferences"); most verbs also take
-o json.
Output modes
Registry commands support --json to print JSON to stdout instead of
human-readable summaries.
Config files
- global CLI config:
~/.config/unispec/config.json(baseUrl,token,apiKey,defaultOwner) - local registry project metadata:
.unispec/project.json - product config (legacy, still honored):
~/.libra/config.json
Available commands
Registry (top-level): init · login · whoami · validate · publish ·
pull · generate · diff · search · project status · project-status
Products: memory (add/search/get/list/update/delete/import/status/entity/event) ·
vector (create/list/describe/delete/upsert/query/stats) ·
kb (create/list/describe/delete/upload/docs/chat) ·
agents (create/list/describe/delete/attach/rule/chat) ·
config (show/get/set)
Publishing
Published from GitHub Actions via npm trusted publishing (OIDC) — see
.github/workflows/release.yml (tag cli-v<version>). @unispec-ai/sdk and
@unispec-ai/registry are referenced by version (^0.1.0), so they must be
published first or bumped together.
