### Start Ollama Server
Source: https://docs.zoocode.dev/providers/ollama
Run this command to start the Ollama server. Ensure Ollama is installed and accessible.
```bash
ollama serve
```
--------------------------------
### Build and Start Project
Source: https://docs.zoocode.dev/advanced-usage/available-tools/execute-command
Use this to run build and start commands sequentially for a project.
```xml
npm run build && npm start
```
--------------------------------
### Download Example Ollama Model
Source: https://docs.zoocode.dev/providers/ollama
Example command to download the `qwen2.5-coder:32b` model.
```bash
ollama pull qwen2.5-coder:32b
```
--------------------------------
### Install Git on macOS with Xcode Command Line Tools
Source: https://docs.zoocode.dev/features/checkpoints
Install Git on macOS by installing the Xcode Command Line Tools. This is an alternative method.
```bash
xcode-select --install
```
--------------------------------
### Install Git on Fedora
Source: https://docs.zoocode.dev/features/checkpoints
Install Git on Fedora systems using the dnf package manager.
```bash
sudo dnf install git
```
--------------------------------
### Codebase Search: Feature-Focused Query
Source: https://docs.zoocode.dev/advanced-usage/available-tools/codebase-search
Focus your queries on specific features or technical patterns. This example searches for 'database connection pool setup'.
```xml
database connection pool setup
```
--------------------------------
### Install Project Dependencies
Source: https://docs.zoocode.dev/advanced-usage/available-tools/execute-command
Use this to install project dependencies using npm.
```xml
npm install express mongodb mongoose dotenv
```
--------------------------------
### YAML Custom Instructions Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of a multi-line 'customInstructions' property in YAML. These guidelines supplement the system prompt.
```yaml
customInstructions: |-
When writing tests:
- Use describe/it blocks
- Include meaningful descriptions
```
--------------------------------
### Install LiteLLM with Proxy Support
Source: https://docs.zoocode.dev/providers/litellm
Install the LiteLLM package with the necessary dependencies for proxy support. This command ensures you have the required components to run the LiteLLM server.
```bash
pip install 'litellm[proxy]'
```
--------------------------------
### Install Nightly VSIX Builds with pnpm
Source: https://docs.zoocode.dev/update-notes/v3.43.0
Use this command to simplify the installation of nightly VSIX builds.
```bash
pnpm install:vsix:nightly
```
--------------------------------
### Install Git on Arch Linux
Source: https://docs.zoocode.dev/features/checkpoints
Install Git on Arch Linux systems using the pacman package manager.
```bash
sudo pacman -S git
```
--------------------------------
### Example Prompt Template for Code Explanation
Source: https://docs.zoocode.dev/features/code-actions
This is an example of a prompt template that can be customized for the 'Explain Code' action. It uses placeholders for dynamic content insertion.
```plaintext
Please explain the following code from ${filePath}:
${selectedText}
```
--------------------------------
### Install Git on Debian/Ubuntu
Source: https://docs.zoocode.dev/features/checkpoints
Update package lists and install Git on Debian-based or Ubuntu systems using apt.
```bash
sudo apt update
sudo apt install git
```
--------------------------------
### Ollama Modelfile Example
Source: https://docs.zoocode.dev/providers/ollama
Example `Modelfile` content for configuring an Ollama model, including context window size and temperature.
```plaintext
# Example Modelfile for reduced context
FROM qwen2.5-coder:32b
# Set context window to 32K tokens (reduced from default)
PARAMETER num_ctx 32768
# Optional: Adjust temperature for more consistent output
PARAMETER temperature 0.7
# Optional: Set repeat penalty
PARAMETER repeat_penalty 1.1
```
--------------------------------
### Start LiteLLM Proxy Server with a Single Model
Source: https://docs.zoocode.dev/providers/litellm
Quickly start the LiteLLM proxy server for a single model by setting the API key as an environment variable and specifying the model. Useful for testing or single-model use cases.
```bash
export ANTHROPIC_API_KEY=your-anthropic-key
litellm --model anthropic/claude-model-id
```
--------------------------------
### JSON Custom Instructions Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of defining 'customInstructions' in JSON. This string contains additional behavioral guidelines for the mode.
```json
"customInstructions": "Focus on explaining concepts and providing examples."
```
--------------------------------
### Retrieve API Documentation from MCP
Source: https://docs.zoocode.dev/advanced-usage/available-tools/access-mcp-resource
This example shows how to fetch API endpoint documentation from an MCP server, useful for developers.
```xml
api-docs
docs://payment-service/endpoints
```
--------------------------------
### Install Dependencies with pnpm
Source: https://docs.zoocode.dev/advanced-usage/local-development-setup
Install all project dependencies using pnpm, the package manager for Zoo Code. This command should be run after cloning the repository.
```bash
pnpm install
```
--------------------------------
### YAML Groups Configuration Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of the 'groups' property in YAML, demonstrating simple access and restricted 'edit' access with file regex.
```yaml
groups:
- read
- - edit
- fileRegex: \.(js|ts)$
description: JS/TS files only
- command
```
--------------------------------
### SSE Server Implementation Example
Source: https://docs.zoocode.dev/features/mcp/server-transports
Example of setting up an Express.js server with SSE transport for the Model Context Protocol (MCP). This snippet shows how to register the transport's request handler.
```javascript
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
import express from 'express';
const app = express();
const server = new Server({name: 'remote-server', version: '1.0.0'});
// Register tools...
// Use SSE transport
const transport = new SSEServerTransport(server);
app.use('/mcp', transport.requestHandler());
app.listen(3000, () => {
console.log('MCP server listening on port 3000');
});
```
--------------------------------
### Create a Custom Command File
Source: https://docs.zoocode.dev/advanced-usage/available-tools/run-slash-command
This command creates a new markdown file for a custom command, named 'deploy.md' in this example.
```bash
touch .roo/commands/deploy.md
```
--------------------------------
### JSON When To Use Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of defining the 'whenToUse' property in JSON. This field guides Zoo's automated decisions for mode selection.
```json
"whenToUse": "This mode is best for refactoring Python code."
```
--------------------------------
### Start LiteLLM Proxy Server with Configuration
Source: https://docs.zoocode.dev/providers/litellm
Launch the LiteLLM proxy server using a configuration file. This is the recommended method for setting up multiple models and providers.
```bash
litellm --config config.yaml
```
--------------------------------
### Fetch System Configuration from MCP
Source: https://docs.zoocode.dev/advanced-usage/available-tools/access-mcp-resource
This example demonstrates how to access system configuration details, such as database settings, from an MCP infrastructure monitor server.
```xml
infra-monitor
config://production/database
```
--------------------------------
### Codebase Search: Scoping to Test Files
Source: https://docs.zoocode.dev/advanced-usage/available-tools/codebase-search
To search only within test files, specify the 'tests' directory in the 'path' parameter. This example searches for 'mock data setup patterns' in tests.
```xml
mock data setup patterns
tests
```
--------------------------------
### Install VSIX from Command Line
Source: https://docs.zoocode.dev/advanced-usage/local-development-setup
Install the generated VSIX package into your VS Code installation using the command line. Replace with the actual version number.
```bash
code --install-extension bin/roo-cline-.vsix
```
--------------------------------
### Request Technical Clarification on Database Choice
Source: https://docs.zoocode.dev/advanced-usage/available-tools/ask-followup-question
This example demonstrates how to ask for clarification on technical choices, specifically regarding database selection. It lists common database options with brief descriptions of their use cases.
```xml
What database should this application use for storing user data?
MongoDB for flexible schema and document-based storage
PostgreSQL for relational data with strong consistency guarantees
Firebase for real-time updates and simplified backend management
SQLite for lightweight local storage without external dependencies
```
--------------------------------
### LiteLLM Configuration File Example
Source: https://docs.zoocode.dev/providers/litellm
Create a `config.yaml` file to define your model list, including parameters for different providers like Anthropic, OpenAI, and Azure OpenAI. This allows the LiteLLM server to know which models to proxy.
```yaml
model_list:
# Configure Anthropic models
- model_name: claude-sonnet
litellm_params:
model: anthropic/claude-sonnet-model-id
api_key: os.environ/ANTHROPIC_API_KEY
# Configure OpenAI models
- model_name: gpt-model
litellm_params:
model: openai/gpt-model-id
api_key: os.environ/OPENAI_API_KEY
# Configure Azure OpenAI
- model_name: azure-model
litellm_params:
model: azure/my-deployment-name
api_base: https://your-resource.openai.azure.com/
api_version: "2023-05-15"
api_key: os.environ/AZURE_API_KEY
```
--------------------------------
### Example Output Format
Source: https://docs.zoocode.dev/advanced-usage/available-tools/list-files
This shows the standard output format for listing files, including directories and file paths. Directories are marked with a trailing slash.
```text
src/
src/components/
src/components/Button.tsx
src/components/Header.tsx
src/utils/
src/utils/helpers.ts
src/index.ts
...
File listing truncated (showing 200 of 543 files). Use list_files on specific subdirectories for more details.
```
--------------------------------
### Example System Prompt with Context Enabled
Source: https://docs.zoocode.dev/features/settings-management
Illustrates the system prompt content when both 'Include Current Time' and 'Include Current Cost' settings are enabled. This shows the detailed information that will be added to the prompt.
```text
# Current Time
Current time in ISO 8601 UTC format: 2025-10-28T23:06:08.458Z
User time zone: America/Edmonton, UTC-6:00
# Current Cost
$0.14
```
--------------------------------
### Install Git on macOS with Homebrew
Source: https://docs.zoocode.dev/features/checkpoints
Use Homebrew to install Git on macOS. This is the recommended method.
```bash
brew install git
```
--------------------------------
### Run Custom Deployment Command with Arguments
Source: https://docs.zoocode.dev/advanced-usage/available-tools/run-slash-command
Execute a custom 'deploy' command with specific arguments for deployment. This allows for detailed configuration of the deployment process.
```xml
deploy
production environment with zero-downtime strategy
```
--------------------------------
### Example MCP Server Configuration (STDIO)
Source: https://docs.zoocode.dev/features/mcp/using-mcp-in-roo
This JSON object shows a basic configuration for an MCP server using the STDIO transport. It includes command, arguments, environment variables, and tool permissions.
```json
{
"mcpServers": {
"server1": {
"command": "python",
"args": ["/path/to/server.py"],
"env": {
"API_KEY": "your_api_key"
},
"alwaysAllow": ["tool1", "tool2"],
"disabled": false
}
}
}
```
--------------------------------
### Execute Built-in Initialization Command
Source: https://docs.zoocode.dev/advanced-usage/available-tools/run-slash-command
Use this snippet to run the built-in 'init' command for project initialization. It requires only the command name.
```xml
init
```
--------------------------------
### YAML Role Definition Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of a multi-line 'roleDefinition' in YAML. This text is placed at the beginning of the system prompt.
```yaml
roleDefinition: >-
You are a test engineer with expertise in:
- Writing comprehensive test suites
- Test-driven development
```
--------------------------------
### Ask About Implementation Preferences
Source: https://docs.zoocode.dev/advanced-usage/available-tools/ask-followup-question
Use this snippet to ask users about their preferred implementation details for a project, such as styling approaches. It provides a clear question and a list of suggested options.
```xml
Which styling approach would you prefer for this web application?
Use Bootstrap for rapid development with consistent components
Use Tailwind CSS for utility-first styling with maximum flexibility
Use vanilla CSS with custom styling for complete control and minimal dependencies
```
--------------------------------
### Create Skill Directory and File
Source: https://docs.zoocode.dev/features/skills
Demonstrates the command to create a new directory for a skill and an empty SKILL.md file within it. This is an example for a PDF processing skill.
```shell
# Example: PDF processing skill
mkdir -p ~/.roo/skills/pdf-processing
touch ~/.roo/skills/pdf-processing/SKILL.md
```
--------------------------------
### YAML When To Use Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of defining the 'whenToUse' property in YAML. This guidance is used for automated decision-making and not displayed in the UI.
```yaml
whenToUse: This mode is best for refactoring Python code.
```
--------------------------------
### JSON Description Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of defining a 'description' property in JSON format. This text is displayed below the mode name in the UI.
```json
"description": "A specialized mode for writing and editing technical documentation."
```
--------------------------------
### JSON Name Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of defining a 'name' property in JSON format. The name can include spaces and proper capitalization.
```json
"name": "Documentation Writer"
```
--------------------------------
### Codebase Search for Configuration
Source: https://docs.zoocode.dev/advanced-usage/available-tools/codebase-search
Use this snippet to find code related to configuration and environment setup. The search will cover the entire project.
```xml
environment variables and application configuration
```
--------------------------------
### YAML Slug Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of defining a 'slug' property in YAML format. The slug serves as a unique identifier for the mode.
```yaml
slug: docs-writer
```
--------------------------------
### JSON Groups Configuration Example
Source: https://docs.zoocode.dev/features/custom-modes
Example of the 'groups' property in JSON, showing restricted 'edit' access with file regex and description.
```json
"groups": [
"read",
["edit", { "fileRegex": "\\.(js|ts)$", "description": "JS/TS files only" }],
"command"
]
```