CLI Package
TypeScript CLI to interact with the Basilic API via API key. Ideal for agentic integrations.
The @repo/cli package is the API CLI (basilic binary): call the Fastify API with an API key. It is not the project generator.
The project generator is create-basilic (npx create-basilic@latest my-app). See Getting Started and tools/create-basilic/README.md.
The @repo/cli package uses @repo/core for all requests and supports only API key auth. Auth endpoints (magic link, OAuth, passkey, etc.) are excluded.
Auth
- Env var:
API_KEYorBASILIC_API_KEY - Config file:
~/.config/basilic/config.json - Interactive prompt (saves to config)
basilic config set-api-key bask_xxx_yyyCommands
Commands mirror core API nesting: health-check, account apikeys create, account apikeys list, ai chat, etc. Use --help for OpenAPI-derived descriptions.
basilic health-check
basilic account apikeys list
basilic ai chat --body '{"messages":[{"role":"user","content":"Hello"}]}'Local testing
- 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
See packages/cli/README.md for full instructions.
Agentic integrations
The CLI is a simple alternative to MCP for agents (Cursor, Claude Code, scripts):
- Standard stdout/JSON
- No server setup
- Easy to wrap in scripts:
result=$(basilic ai chat --body '...')
Agents can shell out to the CLI and parse JSON output without running an MCP server.