TypeScript CLI to interact with the Basilic Fastify API via @repo/core. API key auth only; auth endpoints excluded. Ideal for agentic integrations (e.g. OpenClaw) as a simpler alternative to MCP.
pnpm --filter @repo/cli build
node packages/cli/dist/cli.js --helpRequires an API key. Resolved in order:
API_KEYorBASILIC_API_KEYenv var- Config file (
~/.config/basilic/config.jsonor$XDG_CONFIG_HOME/basilic/config.json) - Interactive prompt (saves to config)
# Set via env
export API_KEY=bask_xxx_yyy
# Or save to config
basilic config set-api-key bask_xxx_yyyCommands mirror the core API nesting (excluding auth endpoints): health-check, account apikeys create, account apikeys list, ai chat, etc. Use --help on any command for OpenAPI-derived descriptions.
-
Start API:
pnpm dev -
Create API key via dashboard or
POST /account/apikeys/with JWT -
Run:
API_KEY=bask_xxx node packages/cli/dist/cli.js health-check API_KEY=bask_xxx node packages/cli/dist/cli.js account apikeys list
-
Or build and run:
pnpm --filter @repo/cli build pnpm --filter @repo/cli exec basilic health-check
The CLI is designed for AI agents (OpenClaw, Cursor Composer, etc.) as a lightweight alternative to MCP: standard stdout/JSON, no server setup, easy to wrap in scripts.