← Back to How-to Guides

Getting Started with Capsule CLI

Beginner5 min read

This guide will walk you through installing Capsule CLI, activating your license, and having your first AI-powered conversation. By the end, you'll be ready to use 400+ AI models directly from your terminal.

Prerequisites

Before you begin, make sure you have:

  • Node.js 18 or higher installed on your system
  • npm or yarn package manager
  • A Capsule CLI license (purchase at capsulecli.dev)
  • An OpenRouter account (free to create)

Step 1: Purchase a License

  1. 1.Visit capsulecli.dev
  2. 2.Click the "Purchase License" button
  3. 3.Complete the checkout process ($49.99 one-time payment)
  4. 4.Check your email for your activation code

Note: Each license is valid for one device.

Step 2: Install Capsule CLI

Open your terminal and run one of the following commands:

Using npm:

npm install -g capsule-ai-cli

Using yarn:

yarn global add capsule-cli

Verify the installation by checking the version:

capsule --version

Step 3: Activate Your License

Now you need to activate your license. You can do this in two ways:

Option 1: Direct Command

capsule activate

Enter your activation code when prompted.

Option 2: Through the CLI

capsule

Then type /activate and follow the prompts.

Important:

Your license is tied to your device.

Step 4: Configure OpenRouter

Capsule uses OpenRouter as its backend to access 400+ AI models. Here's how to set it up:

1. Create an OpenRouter Account

  1. a.Visit openrouter.ai
  2. b.Sign up for a free account
  3. c.Add credits to your account (pay-as-you-go pricing)

2. Get Your API Key

  1. a.In OpenRouter, go to Settings → API Keys
  2. b.Click "Create New Key"
  3. c.Copy your API key (starts with "sk-or-")

3. Add API Key to Capsule

Run Capsule and use the keys command:

capsule

Then type:

/keys

Select OpenRouter and paste your API key when prompted.

Step 5: Your First Conversation

You're now ready to start using Capsule! Let's test it out:

capsule

You'll see the Capsule interface. Try asking a question:

$ capsule
Welcome to Capsule CLI!
Type a message or / for commands
Help me write a function to parse a CSV file

Capsule will use the default model (usually GPT-3.5) to respond. You can change models anytime by typing /model.

Common Commands

Here are some essential commands to get you started:

/helpShow all available commands
/modelChange the AI model
/providersList all available providers
/keysManage API keys
/clearClear the conversation history
/exitExit Capsule CLI

Tips for Success

  • 💡Start with GPT-4.1-mini or Gemini-2.5-flash: It's fast and cost-effective for most tasks
  • 💡Use specialized models: Switch to Claude-4-Opus/Claude-4-Sonnet for code, Gemini-2.5-Pro for complex reasoning
  • 💡Monitor usage: Check your OpenRouter dashboard to track costs
  • 💡Save important conversations: Use /save to keep useful responses

Troubleshooting

Command not found

Make sure npm's global bin directory is in your PATH:

export PATH="$PATH:$(npm bin -g)"

Invalid API key

Double-check that your OpenRouter API key starts with "sk-or-" and try adding it again with /keys.

Model not available

Some models require specific access or credits in OpenRouter. Check your OpenRouter account settings.

Next Steps

Now that you have Capsule running, explore these topics: