Skip to content

Quick Start Guide

Welcome to CodeBuddy Code! This guide will help you get started in 5 minutes and experience the natural language-driven programming assistant.

🎯 Before You Start

System Requirements

  • Node.js: Version 18.0 or higher

  • Operating System: macOS, Linux, or Windows

Verify Environment

bash
# Check Node.js version
node --version  # Should show v18.0.0 or higher

# Check npm version
npm --version

⚡ Fast Installation

bash
npm install -g @tencent-ai/codebuddy-code

Verify Installation

bash
codebuddy --version

🚀 First Experience

1. Navigate to Project Directory

bash
cd /path/to/your/project

2. Start Interactive Mode

bash
codebuddy

You will see the welcome interface:

bash
🤖 CodeBuddy Code v1.0.0
💡 Type /help to see available commands
📝 Start a conversation and let AI be your programming partner

>

3. Try Your First Conversation

bash
> Help me analyze the structure of this project

CodeBuddy will automatically scan your project files and provide a detailed structure analysis.

💡 Core Usage Modes

Interactive Mode

The most natural way to use, ideal for exploratory development:

bash
codebuddy

Typical Conversation Examples:

bash
> I want to add a loading state to this React component
> Help me refactor this function to make it more readable
> What are the potential performance issues with this code?
> Write unit tests for this API endpoint

Single Command Mode

Ideal for scripted and automated scenarios:

bash
# Direct query
codebuddy -p "Optimize the performance of this SQL query"

# Pipe input
cat error.log | codebuddy -p "Analyze these error logs"

# File analysis (requires authorization with --dangerously-skip-permissions)
codebuddy -p "Review the code quality of src/utils.js" --dangerously-skip-permissions

Important Tip: When using the -p/--print parameter for single executions, if the operation requires file access or command execution, the --dangerously-skip-permissions parameter must be added.

Project-Level Operations

For handling complex cross-file tasks:

bash
# Project refactoring (requires file operation authorization)
codebuddy -p "Migrate all components from class components to function components" --dangerously-skip-permissions

# Code standards (requires file read authorization)
codebuddy -p "Check the TypeScript type definitions for the entire project" --dangerously-skip-permissions

# Test coverage (requires file operation authorization)
codebuddy -p "Add unit tests for all files in the services directory" --dangerously-skip-permissions

Keyboard Shortcuts

ShortcutFunction
↑/↓Browse command history
TabCommand auto-completion
Ctrl+CExit program

🎓 Advanced Learning

Congratulations on completing the quick start guide! Next, we recommend reading:


Got issues? We're here to support you:


Let's get started and make AI your programming partner! 🚀