Skip to main content

Installation

Docbot is distributed as an npm package and requires Bun as the runtime. This guide covers all installation methods and system requirements.

System requirements

Required dependencies

Before installing Docbot, ensure you have the following:
1

Bun runtime

Install Bun version 1.3.0 or higher from bun.sh
curl -fsSL https://bun.sh/install | bash
2

Qdrant vector database

You’ll need a Qdrant instance (local or remote). The easiest way is via Docker:
docker run -d --name docbot-qdrant -p 6333:6333 \
  -v "$(pwd)/qdrant_storage:/qdrant/storage" qdrant/qdrant
Or use a managed Qdrant instance from qdrant.tech
3

Ripgrep (rg)

Install ripgrep for fast exact-match search:macOS:
brew install ripgrep
Ubuntu/Debian:
sudo apt-get install ripgrep
Other platforms: See ripgrep installation
4

AI Gateway API key

Set the AI_GATEWAY_API_KEY environment variable:
export AI_GATEWAY_API_KEY="your-api-key-here"
Add this to your .bashrc, .zshrc, or .env file for persistence.
Docbot requires Bun and will not work with Node.js or other runtimes. This is a deliberate design choice and will not change.

Installation methods

The fastest way to use Docbot without installation:
bunx @helmlabs/docbot --help
This runs Docbot on-demand without global installation. Perfect for:
  • Trying Docbot without commitment
  • CI/CD pipelines
  • Projects with occasional documentation updates
  • Ensuring you always use the latest version
Using bunx is the recommended approach for most users. It automatically fetches and runs the latest version of Docbot.

Global installation

For frequent use, install Docbot globally:
bun add -g @helmlabs/docbot
After global installation, you can run Docbot directly:
docbot --help
docbot init
docbot run "your task"

Project-local installation

Install Docbot as a dev dependency in your project:
bun add -d @helmlabs/docbot
Then add scripts to your package.json:
{
  "scripts": {
    "docs:init": "docbot init",
    "docs:index": "docbot index",
    "docs:update": "docbot run"
  }
}
Run with:
bun run docs:init
bun run docs:index
bun run docs:update "your task"

Environment setup

Environment variables

Docbot requires the following environment variable:
VariableRequiredDescription
AI_GATEWAY_API_KEYYesAPI key for Vercel AI Gateway
AI_GATEWAY_API_KEY=your-api-key-here
Never commit your .env file to version control. Add it to .gitignore:
echo ".env" >> .gitignore

Docker setup for Qdrant

For local development, use Docker to run Qdrant:

Run Qdrant in the foreground

docker run --rm -p 6333:6333 \
  -v "$(pwd)/qdrant_storage:/qdrant/storage" \
  qdrant/qdrant

Run Qdrant as a background service

docker run -d --name docbot-qdrant \
  -p 6333:6333 \
  -v "$(pwd)/qdrant_storage:/qdrant/storage" \
  qdrant/qdrant
Manage the container:
# Stop Qdrant
docker stop docbot-qdrant

# Start Qdrant
docker start docbot-qdrant

# View logs
docker logs docbot-qdrant

# Remove container
docker rm docbot-qdrant
The docbot init command can automatically set up and start a Qdrant container for you. Use --skip-docker if you want to handle this manually.

Using remote Qdrant

For production or team environments, use a remote Qdrant instance:
// docbot.config.jsonc
{
  "projectSlug": "my-project",
  "qdrant": {
    "url": "https://your-qdrant-instance.com",
    "collections": {
      "docs": "docbot_my-project_docs",
      "code": "docbot_my-project_code"
    }
  }
}
Or override via CLI:
docbot index --qdrant-url https://your-qdrant-instance.com

Verify installation

Check that everything is installed correctly:
1

Verify Bun

bun --version
Should output version 1.3.0 or higher
2

Verify Docbot

bunx @helmlabs/docbot --version
Should output the current Docbot version
3

Verify Qdrant

curl http://127.0.0.1:6333/health
Should return a health check response
4

Verify ripgrep

rg --version
Should output the ripgrep version
5

Verify API key

echo $AI_GATEWAY_API_KEY
Should output your API key (not empty)

Troubleshooting

Bun not found

If bun command is not found, ensure Bun is installed and in your PATH:
# Add to ~/.bashrc or ~/.zshrc
export PATH="$HOME/.bun/bin:$PATH"
Then reload your shell:
source ~/.bashrc  # or ~/.zshrc

Qdrant connection issues

If Docbot can’t connect to Qdrant:
  1. Check if Qdrant is running:
    docker ps | grep qdrant
    
  2. Verify Qdrant is accessible:
    curl http://127.0.0.1:6333/health
    
  3. Check Docker logs:
    docker logs docbot-qdrant
    

Missing AI_GATEWAY_API_KEY

If you see an error about missing AI_GATEWAY_API_KEY:
error: AI_GATEWAY_API_KEY environment variable is required
Ensure the variable is set and exported:
export AI_GATEWAY_API_KEY="your-api-key-here"
For permanent setup, add it to your shell configuration file or use a .env file.

Package installation fails

If bun add -g @helmlabs/docbot fails:
  1. Update Bun to the latest version:
    bun upgrade
    
  2. Clear Bun cache:
    rm -rf ~/.bun/install/cache
    
  3. Try again:
    bun add -g @helmlabs/docbot
    

Next steps

Quick start

Get up and running with your first Docbot task

Configuration

Learn how to customize Docbot for your project

Build docs developers (and LLMs) love