doteb CLI
Command-line tool for scaffolding projects and managing keys, budgets, and usage
The doteb CLI (@llmgateway/cli) is a command-line utility for scaffolding projects, discovering models, and managing your doteb account — API keys, spending budgets, and usage analytics — straight from the terminal.
Installation
Run commands directly without installation:
npx @llmgateway/cli initInstall globally for faster access:
npm install -g @llmgateway/cliThen run commands directly (lg works as a shorthand alias):
llmgateway init
lg initQuick Start
Initialize a Project
Create a new project from a template:
npx @llmgateway/cli initOr specify the template and name directly:
npx @llmgateway/cli init --template image-generation --name my-ai-appSign In
Sign in with your doteb account to unlock key management, budgets, and usage analytics:
npx @llmgateway/cli auth login --email you@example.comOr store a gateway API key only (enough for making gateway requests):
npx @llmgateway/cli auth login --keyCredentials are stored in ~/.llmgateway/config.json. The LLMGATEWAY_API_KEY environment variable takes precedence over a stored key.
Start Development
Navigate to your project and start the development server:
cd my-ai-app
npx @llmgateway/cli devOr specify a custom port:
npx @llmgateway/cli dev --port 3000Project Commands
init
Initialize a new project from a template.
npx @llmgateway/cli init [directory] [options]Options:
-t, --template <name>— Template to use (default:image-generation)-n, --name <name>— Project name
Examples:
# Interactive mode
npx @llmgateway/cli init
# With options
npx @llmgateway/cli init --template image-generation --name my-applist
Display available project templates, grouped by category. Alias: ls.
npx @llmgateway/cli listOptions:
--json— Output in JSON format
models
Browse and filter available AI models.
npx @llmgateway/cli models [options]Options:
-c, --capability <type>— Filter by capability (e.g.,image,text)-p, --provider <name>— Filter by provider (e.g.,openai,anthropic)-s, --search <term>— Search models by name--json— Output in JSON format
Examples:
# List all models
npx @llmgateway/cli models
# Filter by provider
npx @llmgateway/cli models --provider openai
# Search models
npx @llmgateway/cli models --search gptadd
Add tools or API routes to an existing project.
npx @llmgateway/cli add [type] [name]Runs interactively when type (tool or route) and name are omitted.
Tools available:
weather— Weather lookup functionalitysearch— Web search capabilitycalculator— Mathematical operations
API routes available:
generate— Text generation endpointchat— Chat completion endpoint with streaming
dev
Start the local development server using your project's package manager.
npx @llmgateway/cli dev [options]Options:
-p, --port <number>— Port to run on
upgrade
Update doteb dependencies (@llmgateway/ai-sdk-provider, @llmgateway/models, @llmgateway/cli) in your project.
npx @llmgateway/cli upgrade [options]Options:
--check— Check for updates without installing
docs
Open the documentation in your browser.
npx @llmgateway/cli docs [topic]Topics: models, api, sdk, quickstart — omit to open the docs home and see all topics.
Account Commands
The commands below require a dashboard session — sign in first with
llmgateway auth login --email. A gateway API key alone is not enough for
account management.
auth
Manage authentication (dashboard session and gateway API key).
# Sign in with email & password (full access), or paste an API key
npx @llmgateway/cli auth login
npx @llmgateway/cli auth login --email you@example.com
npx @llmgateway/cli auth login --key
# Check authentication status (session + API key)
npx @llmgateway/cli auth status
# Show the signed-in user
npx @llmgateway/cli auth whoami
# Remove stored session and API key
npx @llmgateway/cli auth logoutkeys
Create and manage gateway API keys.
npx @llmgateway/cli keys <subcommand>keys create
Create a new API key, optionally with spending limits and an expiry.
npx @llmgateway/cli keys create --description "CI key" --limit 100 --expires 30dOptions:
-p, --project <id>— Project the key belongs to-d, --description <text>— Key description-l, --limit <usd>— Total spending limit in USD (e.g.100or49.99)--period-limit <usd>— Spending limit per rolling period in USD--period <duration>— Rolling period for--period-limit(12h,1d,2w,1mo; default1mo)-e, --expires <ttl>— TTL as a duration (30d,12h) or an ISO date--json— Output in JSON format
The token is only displayed once at creation time — save it immediately.
keys list
List API keys with spend, budget, and expiry. Alias: keys ls.
Options:
-p, --project <id>— Filter by project--all— Show all keys in the org (admin/owner only)--json— Output in JSON format
keys update <id>
Activate or deactivate an API key.
Options:
--activate— Set the key to active--deactivate— Set the key to inactive-e, --expires <ttl>— New expiry as a duration (30d) or ISO date (needed to reactivate expired keys)
keys limit <id>
Set spending limits on an API key (same as budget set).
Options:
-l, --limit <usd>— Total spending limit in USD--period-limit <usd>— Spending limit per rolling period in USD--period <duration>— Rolling period (12h,1d,2w,1mo; default1mo)--clear— Remove all spending limits
keys roll <id>
Regenerate the token for an API key. The old token becomes invalid immediately.
Options:
-y, --yes— Skip confirmation
keys delete <id>
Delete an API key. Alias: keys rm.
Options:
-y, --yes— Skip confirmation
budget
Manage API key spending limits.
# Set a total and/or rolling-period budget
npx @llmgateway/cli budget set <keyId> --limit 100 --period-limit 25 --period 1w
# Remove all spending limits
npx @llmgateway/cli budget set <keyId> --clear
# Show budget and current spend
npx @llmgateway/cli budget get <keyId>budget set options: -l, --limit <usd>, --period-limit <usd>, --period <duration>, --clear
budget get options: -p, --project <id>, --json
usage
View usage and cost analytics.
npx @llmgateway/cli usage [options]Options:
-o, --org <id>— Aggregate usage across an organization-p, --project <id>— Filter by project-k, --api-key <id>— Filter by API key--by <dimension>— Break down bymodelorkey-r, --range <range>— Time range:1h,4h,24h,7d,30d,365d(default7d)--days <n>— Look back N days instead of--range--from <date>/--to <date>— Custom date range (YYYY-MM-DD)--json— Output in JSON format
Examples:
# Last 7 days for the default project
npx @llmgateway/cli usage
# Cost per model over the last 30 days
npx @llmgateway/cli usage --by model --range 30d
# Whole-org aggregate
npx @llmgateway/cli usage --org <orgId>usage sources
Break down usage by session/agent source to see which agents or sessions are spending.
npx @llmgateway/cli usage sources [options]Options: -p, --project <id>, -r, --range <range> (7d, 30d), --from <date>, --to <date>, --json
orgs
List your organizations with plan and credit balance. Alias: orgs ls.
npx @llmgateway/cli orgs list [--json]projects
Manage projects and the CLI's default project.
# List projects (optionally filtered by org)
npx @llmgateway/cli projects list [--org <id>] [--json]
# Set the default project used by keys/budget/usage commands
npx @llmgateway/cli projects use <id>credits
Show organization credit balances.
npx @llmgateway/cli credits [--org <id>] [--json]Available Templates
Web Applications
image-generation— Full-stack AI image generation app (Next.js 16, React 19). Multi-provider support with a unified API.ai-chatbot— AI chatbot with streaming responses.og-image-generator— AI-powered OG image generator.feedback-dashboard— Customer feedback sentiment dashboard.writing-assistant— AI writing assistant with text actions.qa-agent— AI-powered QA testing agent with browser automation, real-time action timeline, and live browser preview.
CLI Agents
weather-agent— Answers weather queries using tool calling.lead-agent— Researches people and posts results through a configurable webhook.changelog-generator-agent— Generates changelogs from git history.email-drafter-agent— Drafts polished emails from rough notes.sentiment-analyzer-agent— Analyzes text sentiment.data-extractor-agent— Extracts structured entities from text.
npx @llmgateway/cli init --template qa-agentConfiguration
The CLI stores configuration in ~/.llmgateway/config.json:
{
"apiKey": "llmgtwy_...",
"defaultTemplate": "image-generation",
"sessionEmail": "you@example.com",
"defaultOrgId": "org_...",
"defaultProjectId": "proj_..."
}Signing in with auth login --email also stores a dashboard session used by the account commands (keys, budget, usage, orgs, projects, credits).
Environment Variables
LLMGATEWAY_API_KEY— Gateway API key; takes precedence over the config file:
export LLMGATEWAY_API_KEY="llmgtwy_..."LLMGATEWAY_API_URL— Override the management API base URL (defaults tohttps://internal.doteb.com), useful for self-hosted deployments.
More Resources
Need help or want to request a feature? Email us at dotebceo@gmail.com.
How is this guide?
Last updated on