@llmgateway/cli
v1.4.0
Published
CLI tool for scaffolding LLM Gateway templates and managing AI projects
Downloads
19
Maintainers
Readme
@llmgateway/cli
CLI tool for scaffolding LLM Gateway templates and managing AI projects.
Installation
# Use directly with npx (recommended)
npx @llmgateway/cli init
# Or install globally
npm install -g @llmgateway/cliCommands
init - Create a new project
# Interactive mode
npx @llmgateway/cli init
# Specify template
npx @llmgateway/cli init --template image-generation
# Specify template and directory
npx @llmgateway/cli init --template weather-agent ./my-agent
# Specify project name
npx @llmgateway/cli init --template image-generation --name my-applist - Show available templates
npx @llmgateway/cli list
npx @llmgateway/cli list --jsonmodels - Browse available models
# List all models
npx @llmgateway/cli models
# Filter by capability
npx @llmgateway/cli models --capability image
# Filter by provider
npx @llmgateway/cli models --provider openai
# Search by name
npx @llmgateway/cli models --search gptadd - Add tools or routes to your project
# Interactive mode
npx @llmgateway/cli add
# Add a specific tool
npx @llmgateway/cli add tool weather
npx @llmgateway/cli add tool search
npx @llmgateway/cli add tool calculator
# Add an API route
npx @llmgateway/cli add route generate
npx @llmgateway/cli add route chatauth - Manage API key
# Login (opens browser to get API key)
npx @llmgateway/cli auth login
# Check authentication status
npx @llmgateway/cli auth status
# Logout (remove stored key)
npx @llmgateway/cli auth logoutdev - Start development server
npx @llmgateway/cli dev
npx @llmgateway/cli dev --port 3001upgrade - Upgrade @llmgateway packages
# Upgrade packages
npx @llmgateway/cli upgrade
# Check for updates without installing
npx @llmgateway/cli upgrade --checkdocs - Open documentation
# Open main docs
npx @llmgateway/cli docs
# Open specific topic
npx @llmgateway/cli docs models
npx @llmgateway/cli docs api
npx @llmgateway/cli docs sdkAvailable Templates
| Template | Description | Type |
|----------|-------------|------|
| image-generation | Full-stack AI image generation app (Next.js 16, React 19) | Web |
| weather-agent | CLI agent that answers weather queries using tools | Agent |
Configuration
The CLI stores configuration in ~/.llmgateway/config.json:
{
"apiKey": "your-api-key",
"defaultTemplate": "image-generation"
}Environment variables take precedence over the config file:
LLMGATEWAY_API_KEY- Your LLM Gateway API key
License
MIT
