Skip to main content
Get started with Codebuff in minutes. This guide will walk you through installation, setup, and your first coding task.

Getting started

1

Install the CLI

Install Codebuff globally using npm:
npm install -g codebuff
Codebuff requires Node.js 18 or higher. Check your version with node --version.
2

Navigate to your project

Change to your project directory:
cd your-project
Codebuff works best with Git repositories, but it’s not required.
3

Start Codebuff

Launch the interactive CLI:
codebuff
The first time you run Codebuff, you’ll be prompted to authenticate with your Codebuff account.
4

Give your first instruction

Try asking Codebuff to make a change to your codebase:
Add error handling to the user registration function
Codebuff will:
  • Analyze your codebase structure
  • Find relevant files
  • Make precise edits
  • Validate the changes
You can also use the /init command to create a knowledge.md file and .agents/ directory for custom agent development.
5

Review and iterate

After Codebuff completes its task, review the changes:
git diff
Continue the conversation with follow-up instructions:
Also add input validation for the email field
Codebuff maintains context from previous exchanges in the session.

First task examples

Here are some examples to try with Codebuff:
codebuff
> Fix the SQL injection vulnerability in user registration

Using with the SDK

If you want to integrate Codebuff into your application, install the SDK instead:
npm install @codebuff/sdk
Then use it in your code:
import { CodebuffClient } from '@codebuff/sdk'

const client = new CodebuffClient({
  apiKey: process.env.CODEBUFF_API_KEY,
  cwd: process.cwd(),
})

const result = await client.run({
  agent: 'base',
  prompt: 'Add error handling to all API endpoints',
  handleEvent: (event) => {
    console.log('Progress:', event)
  },
})
Get your API key from codebuff.com/api-keys.

What’s next?

CLI Guide

Learn advanced CLI commands and workflows

SDK Guide

Build Codebuff into your applications

Agent Development

Create custom agents with specialized workflows

Custom Tools

Extend Codebuff with your own tools

Need help?

Discord Community

Get help from the community

GitHub Issues

Report bugs or request features

Email Support

Contact the team directly

Documentation

Browse the full documentation

Build docs developers (and LLMs) love