| title | Configuration | ||
|---|---|---|---|
| section | help | ||
| tags |
|
||
| order | 6 |
Codebuff can be configured using a codebuff.json file in your project root. This file allows you to customize various aspects of how codebuff operates in your project.
Configuring codebuff helps you create a seamless development environment where codebuff becomes your central development hub. Instead of juggling multiple terminal windows and manually starting various services, you can let codebuff manage your entire development workflow.
You can configure startup processes, which will run in the background every time codebuff starts! When you use this feature, codebuff will automatically:
- Start your development processes:
- Servers (frontend, backend, etc.)
- Launch your database
- Run any other necessary background services
- Manage all these processes for you
- Read the logs and outputs and automatically handle any errors that arise
This means you can start your day with a single codebuff command, write code with codebuff's assistance, and when you're done, closing codebuff will cleanly shut down all your development processes. No more scattered terminal windows or forgotten running processes!
The configuration file follows this structure:
Here's an example configuration file that starts a development server and database:
``` { "description": "Development environment configuration", "startupProcesses": [ { "name": "nextjs-server", "command": "npm run dev", "cwd": "./web", "enabled": true }, { "name": "database", "command": "docker-compose up", "cwd": "./backend/db", "stdoutFile": "logs/db-stdout.log", "stderrFile": "logs/db-stderr.log" } ] } ```- Process Names: Use descriptive names that clearly indicate what each process does.
- Working Directories: Use relative paths for
cwdto maintain portability. - Logging: Consider using
stdoutFileandstderrFilefor important processes to help with debugging. - Process Management: Use the
enabledflag to temporarily disable processes without removing them from the configuration.
If your startup processes aren't working as expected:
- Check that the commands work when run manually from the specified working directory
- Verify that any referenced paths (for logs or cwd) exist and are writable
- Check the process output in the specified log files if you've configured them
- Make sure the JSON syntax in your configuration file is valid
Need more help? Check out our Troubleshooting guide or join our Discord community.