Where Codebuff Shines
Refactor Files
Good for heavy edits:
- Convert files between languages while preserving functionality
- Update code to use new APIs or libraries
- Implement consistent patterns across your codebase
- Reorganize file structure for better maintainability
It keeps patterns consistent as you evolve the code.
Multi-file Edits
Strong at cross-file work:
- Rename functions, classes, or variables across the entire codebase
- Update API endpoints and their corresponding client code
- Modify shared types and update all their usages
- Add new features that require changes in multiple parts of the application
Code Generation
Useful for boilerplate:
- Create new API endpoints with proper logging and error handling
- Generate TypeScript types from existing code
- Add test cases for new functionality
- Create documentation files in markdown format
Terminal Integration
It can run commands while working:
- Install new dependencies with the correct package manager
- Run type checks and tests after making changes
- Search through code using grep or other tools
- Move, rename, or delete files as part of refactoring
Knowledge Management
Codebuff reads knowledge.md files to keep your context handy:
- Project-specific patterns and conventions
- Architecture decisions and their rationale
- Best practices for different parts of the codebase
Update them anytime; Codebuff loads them on start.
Example commands
Code Review
Ask for feedback:
bash
# Review current changescodebuff "Please review my current changes"# Review branchcodebuff "Review the differences between this branch and main"# Review specific filescodebuff "Review the changes in src/components/auth/*"
Git Workflow Commands
Git helpers:
bash
# Create commit messagecodebuff "Generate a commit message for these changes"# Clean up commitscodebuff "Help me squash the last 3 commits into one"
Codebase Questions
Understand the repo:
bash
# Architecture questionscodebuff "Explain how our authentication system works"# Find examplescodebuff "Show me examples of error handling in our codebase"
Script Generation
Generate scripts:
bash
# Data processingcodebuff "Write a script to calculate our churn this month"# Build automationcodebuff "Create a script to automate our release process"
Documentation Commands
Generate docs:
bash
# API docscodebuff "Document this new API endpoint"# Component docscodebuff "Add JSDoc comments to this React component"# README updatescodebuff "Update the README with the new environment variables"
Configuration Commands
Configuration help:
bash
# Tool setupcodebuff "Help me configure ESLint for this project"# Build configcodebuff "Update webpack to handle .mdx files"
SQL Commands
Database help:
bash
# Query writingcodebuff "Help me write a query to find users who haven't logged in for 30 days"# Query optimizationcodebuff "How can I make this query faster?"# Index suggestionscodebuff "What indexes should I add for this query?"# Schema changescodebuff "Help me write a migration to add a status column"
Tips
- Name the files or components you're working with
- Say what you're trying to achieve
- If the first attempt misses, clarify
- Use
knowledge.mdto teach Codebuff your patterns