### Install Project Dependencies
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/README.md
Use this command to install all necessary project dependencies.
```bash
$ pnpm install
```
--------------------------------
### Start Local Development Server
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/README.md
This command starts a local development server and opens the project in your browser. Changes are reflected live without restarting.
```bash
$ pnpm start
```
--------------------------------
### Install LiteLLM Proxy
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/providers/litellm.md
Install the LiteLLM package with proxy support enabled.
```bash
pip install 'litellm[proxy]'
```
--------------------------------
### Fetch System Configuration
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/access-mcp-resource.md
This example demonstrates how to retrieve system configuration details, like database settings.
```xml
infra-monitor
config://production/database
```
--------------------------------
### STDIO Configuration Example
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/mcp/using-mcp-in-roo.mdx
An example of a local server configuration using STDIO transport. It includes command, arguments, working directory, environment variables, and tool permissions.
```json
{
"mcpServers": {
"local-server": {
"command": "node",
"args": ["server.js"],
"cwd": "/path/to/project/root",
"env": {
"API_KEY": "your_api_key"
},
"alwaysAllow": ["tool1", "tool2"],
"disabled": false
}
}
}
```
--------------------------------
### Retrieve API Documentation
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/access-mcp-resource.md
This example shows how to fetch API documentation for a given service.
```xml
api-docs
docs://payment-service/endpoints
```
--------------------------------
### Install Git on macOS with Xcode Command Line Tools
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/checkpoints.mdx
Install Git on macOS by installing the Xcode Command Line Tools. This is an alternative method if Homebrew is not used.
```bash
xcode-select --install
```
--------------------------------
### Install Project Dependencies
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/execute-command.md
Install multiple npm packages for your project. List all desired packages within the `` tags.
```xml
npm install express mongodb mongoose dotenv
```
--------------------------------
### Create Initial Todo List
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/update-todo-list.md
Defines the starting set of tasks for a new development project.
```xml
[ ] Analyze requirements
[ ] Design architecture
[ ] Implement core logic
[ ] Write tests
[ ] Update documentation
```
--------------------------------
### Define Custom Command Content
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/run-slash-command.md
Example content for a deployment command file.
```markdown
---
description: Deploy application to production environment
argument-hint: environment name (staging, production)
---
## Deployment Process
1. Run test suite to ensure all tests pass
2. Build production bundle with optimizations
3. Update environment variables for target
4. Deploy to specified environment
5. Run post-deployment health checks
6. Update deployment documentation
```
--------------------------------
### Diff Format Example
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/apply-diff.md
This example demonstrates the required format for the `` parameter, including line number hints and the structure for SEARCH and REPLACE blocks.
```diff
<<<<<<< SEARCH
:start_line:10
:end_line:12
-------
// Old calculation logic
const result = value * 0.9;
return result;
=======
// Updated calculation logic with logging
console.log(`Calculating for value: ${value}`);
const result = value * 0.95; // Adjusted factor
return result;
>>>>>>> REPLACE
<<<<<<< SEARCH
:start_line:25
:end_line:25
-------
const defaultTimeout = 5000;
=======
const defaultTimeout = 10000; // Increased timeout
>>>>>>> REPLACE
```
--------------------------------
### Download Qwen2.5-Coder Model
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/providers/ollama.md
Example of downloading the qwen2.5-coder:32b model using the ollama pull command.
```bash
ollama pull qwen2.5-coder:32b
```
--------------------------------
### Example MCP Server Configuration (STDIO Transport)
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/mcp/using-mcp-in-roo.mdx
This is an example of an MCP server configuration using STDIO transport. It defines the command to run, arguments, environment variables, and tools to always allow.
```json
{
"mcpServers": {
"server1": {
"command": "python",
"args": ["/path/to/server.py"],
"env": {
"API_KEY": "your_api_key"
},
"alwaysAllow": ["tool1", "tool2"],
"disabled": false
}
}
}
```
--------------------------------
### Install npm Dependencies for Custom Tools
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/experimental/custom-tools.md
To use npm packages within your custom tools, install them in the same directory as your tool files. This example shows installing 'axios' and 'lodash'.
```bash
# From your tool directory
cd .roo/tools/
npm init -y
npm install axios lodash
```
--------------------------------
### Initialize Skill Directory
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/skills.mdx
Create the necessary directory and SKILL.md file for a new skill.
```bash
# Example: PDF processing skill
mkdir -p ~/.roo/skills/pdf-processing
touch ~/.roo/skills/pdf-processing/SKILL.md
```
--------------------------------
### Define a Custom Tool with npm Dependencies
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/experimental/custom-tools.md
This example demonstrates a custom tool that utilizes an npm package ('axios') to fetch data from an API. Ensure the package is installed in the tool's directory.
```typescript
import { parametersSchema as z, defineCustomTool } from "@roo-code/types"
import axios from "axios"
export default defineCustomTool({
name: "fetch_api",
description: "Fetch data from an API endpoint",
parameters: z.object({
url: z.string().describe("API endpoint URL"),
}),
async execute({ url }) {
const response = await axios.get(url)
return JSON.stringify(response.data, null, 2)
}
})
```
--------------------------------
### Start LiteLLM Proxy Server
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/providers/litellm.md
Launch the proxy server using a configuration file or by specifying a single model directly.
```bash
# Using configuration file (recommended)
litellm --config config.yaml
# Or quick start with a single model
export ANTHROPIC_API_KEY=your-anthropic-key
litellm --model anthropic/claude-model-id
```
--------------------------------
### Install Dependencies with pnpm
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/local-development-setup.mdx
Install all necessary project dependencies using pnpm, the package manager for Roo Code. Ensure pnpm is installed globally before running this command.
```bash
pnpm install
```
--------------------------------
### Install VSIX Package via Command Line
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/local-development-setup.mdx
Install a generated VSIX package into your VS Code installation using the command line. Replace `` with the actual version number from the filename.
```bash
code --install-extension bin/roo-cline-.vsix
```
--------------------------------
### Create Directory and File
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/execute-command.md
Execute shell commands to create directories and files. This example creates a directory and then a file within it.
```xml
mkdir -p src/components && touch src/components/App.js
```
--------------------------------
### Verify Git Installation on macOS/Linux
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/checkpoints.mdx
Verify that Git has been successfully installed by checking its version in the terminal.
```bash
git --version
```
--------------------------------
### Apply Patch Format Example
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/advanced-usage/available-tools/apply-patch.md
Demonstrates the required unified diff format with custom headers for adding, updating, and deleting files.
```diff
*** Add File: src/utils/newHelper.ts
--- /dev/null
+++ b/src/utils/newHelper.ts
@@ -0,0 +1,5 @@
+export function helperFunction(value: string): string {
+ return value.toUpperCase();
+}
*** Update File: src/main.ts
--- a/src/main.ts
+++ b/src/main.ts
@@ -10,7 +10,7 @@
import { config } from './config';
-const timeout = 5000;
+const timeout = 10000;
function main() {
*** Delete File: src/deprecated/oldUtil.ts
```
--------------------------------
### Install Git on Arch Linux
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/checkpoints.mdx
Install Git on Arch Linux distributions using the pacman package manager.
```bash
sudo pacman -S git
```
--------------------------------
### Install Git on Fedora Linux
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/checkpoints.mdx
Install Git on Fedora Linux distributions using the dnf package manager.
```bash
sudo dnf install git
```
--------------------------------
### Serve Ollama Models
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/providers/ollama.md
Start the Ollama server to make models available. Ensure this command is running in your terminal.
```bash
ollama serve
```
--------------------------------
### Install Git on macOS with Homebrew
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/checkpoints.mdx
Use Homebrew to install Git on macOS. This is the recommended method for macOS users.
```bash
brew install git
```
--------------------------------
### Complete E-Commerce Platform Configuration
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/roo-code-cloud/environments.mdx
A full-stack application example including frontend, API, and worker services with detailed repository and port configurations.
```yaml
name: E-Commerce Platform
description: Full stack with frontend, API, and worker
repositories:
- repository: acme/storefront
commands:
- name: Install
run: npm install
- name: Build
run: npm run build
env:
VITE_API_URL: ${ROO_API_HOST}
- name: Serve
run: npx serve -s dist -l 3000
detached: true
logfile: /tmp/storefront.log
- repository: acme/api
tool_versions:
node: "20.11.0"
commands:
- name: Install
run: npm install
- name: Migrate
run: npm run db:push
- name: Start
run: npm run start
detached: true
logfile: /tmp/api.log
env:
ALLOWED_ORIGINS: ${ROO_WEB_HOST}
- repository: acme/worker
branch: main
commands:
- name: Install
run: npm install
- name: Start
run: npm run start
detached: true
logfile: /tmp/worker.log
ports:
- name: WEB
port: 3000
- name: API
port: 3001
- name: WORKER
port: 3002
services:
- postgres16
- redis7
env:
NODE_ENV: production
LOG_LEVEL: info
```
--------------------------------
### Install Shell Integration Manually
Source: https://github.com/roocodeinc/roo-code-docs/blob/main/docs/features/shell-integration.mdx
Add these lines to your shell configuration file to enable integration if automatic installation fails.
```bash
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"
```
```zsh
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"
```
```powershell
if ($env:TERM_PROGRAM -eq "vscode") { . "$(code --locate-shell-integration-path pwsh)" }
```
```fish
string match -q "$TERM_PROGRAM" "vscode"; and . (code --locate-shell-integration-path fish)
```