rapid.json Specification
Version: 1.0
Overview
Section titled “Overview”rapid.json is the configuration file for RAPID. It defines how containers are managed, which AI agents are available, how secrets are loaded, and what context is provided to agents.
File Location
Section titled “File Location”RAPID looks for configuration in this order:
rapid.json(project root) - recommended.rapid/config.json.rapidrc.json
Schema
Section titled “Schema”{ "$schema": "https://getrapid.dev/schema/v1/rapid.json"}Top-Level Properties
Section titled “Top-Level Properties”| Property | Type | Required | Default | Description |
|---|---|---|---|---|
$schema | string | No | - | JSON schema URL for validation/IntelliSense |
version | string | Yes | - | Specification version ("1.0") |
name | string | No | Directory name | Project name |
container | object | No | See below | Container configuration |
secrets | object | No | {"provider": "env"} | Secret management |
agents | object | Yes | - | AI agent configuration |
context | object | No | See below | Context file settings |
mcp | object | No | - | MCP server configuration |
container
Section titled “container”Container lifecycle configuration.
| Property | Type | Default | Description |
|---|---|---|---|
devcontainer | string | ".devcontainer/devcontainer.json" | Path to devcontainer.json |
compose | string | null | Docker Compose file (overrides devcontainer) |
autoStart | boolean | true | Start container automatically on rapid dev |
buildArgs | object | {} | Additional Docker build arguments |
Example
Section titled “Example”{ "container": { "devcontainer": ".devcontainer/devcontainer.json", "autoStart": true, "buildArgs": { "NODE_VERSION": "20" } }}secrets
Section titled “secrets”Secret management configuration. RAPID uses .envrc with direnv as the source of truth for secure secret loading.
| Property | Type | Default | Description |
|---|---|---|---|
provider | enum | "1password" | "1password", "vault", "env" |
vault | string | - | Vault name (1Password) or path (HashiCorp) |
address | string | - | Vault server address (HashiCorp only) |
items | object | {} | Map of env var names to secret references |
envrc | object | {} | .envrc generation settings |
envrc Options
Section titled “envrc Options”| Property | Type | Default | Description |
|---|---|---|---|
generate | boolean | true | Auto-generate .envrc from items |
path | string | ".envrc" | Path to .envrc file |
includeLocal | boolean | true | Source .envrc.local if present |
Provider: 1password (Recommended)
Section titled “Provider: 1password (Recommended)”{ "secrets": { "provider": "1password", "vault": "Development", "items": { "ANTHROPIC_API_KEY": "op://Development/Anthropic/api-key", "OPENAI_API_KEY": "op://Development/OpenAI/api-key", "GITHUB_TOKEN": "op://Development/GitHub/pat" }, "envrc": { "generate": true, "includeLocal": true } }}Generated .envrc:
# .envrc - Generated by RAPID# Safe to commit - contains references only, not actual secrets
export ANTHROPIC_API_KEY=$(op read "op://Development/Anthropic/api-key")export OPENAI_API_KEY=$(op read "op://Development/OpenAI/api-key")export GITHUB_TOKEN=$(op read "op://Development/GitHub/pat")
# Load local overrides (gitignored)[[ -f .envrc.local ]] && source_env .envrc.localProvider: vault (HashiCorp)
Section titled “Provider: vault (HashiCorp)”{ "secrets": { "provider": "vault", "address": "https://vault.example.com", "vault": "secret/data/dev", "items": { "ANTHROPIC_API_KEY": "anthropic_key", "OPENAI_API_KEY": "openai_key" } }}Generated .envrc:
# .envrc - Generated by RAPIDexport VAULT_ADDR="https://vault.example.com"
export ANTHROPIC_API_KEY=$(vault kv get -field=anthropic_key secret/data/dev)export OPENAI_API_KEY=$(vault kv get -field=openai_key secret/data/dev)Provider: env (Not Recommended)
Section titled “Provider: env (Not Recommended)”Fallback that reads from environment. Does not generate .envrc.
{ "secrets": { "provider": "env" }}dotenv Integration (Discouraged)
Section titled “dotenv Integration (Discouraged)”RAPID can load .env files but this is discouraged due to security risks:
{ "secrets": { "provider": "env", "dotenv": { "enabled": true, "files": [".env.local"], "warn": true } }}When warn: true, RAPID will display a security warning when loading .env files.
agents
Section titled “agents”AI agent configuration.
| Property | Type | Required | Description |
|---|---|---|---|
default | string | Yes | Name of the default agent |
available | object | Yes | Map of agent name to configuration |
Agent Configuration
Section titled “Agent Configuration”Each agent in available supports:
| Property | Type | Required | Description |
|---|---|---|---|
cli | string | Yes | CLI command to execute |
instructionFile | string | No | Path to instruction file for this agent |
envVars | array | No | Required environment variables |
installCmd | string | No | Command to install the CLI tool |
args | array | No | Additional CLI arguments |
Example
Section titled “Example”{ "agents": { "default": "claude", "available": { "claude": { "cli": "claude", "instructionFile": "CLAUDE.md", "envVars": ["ANTHROPIC_API_KEY"], "installCmd": "npm install -g @anthropic-ai/claude-code" }, "opencode": { "cli": "opencode", "instructionFile": "AGENTS.md", "envVars": ["ANTHROPIC_API_KEY", "OPENAI_API_KEY"], "installCmd": "npm install -g opencode" }, "aider": { "cli": "aider", "instructionFile": ".aider.conf.yml", "envVars": ["OPENAI_API_KEY"], "installCmd": "pip install aider-chat", "args": ["--model", "gpt-4o"] } } }}context
Section titled “context”Context file generation and management.
| Property | Type | Default | Description |
|---|---|---|---|
files | array | ["README.md"] | Files to include in agent context |
dirs | array | ["docs/"] | Directories to include |
exclude | array | [] | Patterns to exclude |
generateAgentFiles | boolean | true | Auto-generate AGENTS.md, CLAUDE.md |
templateDir | string | - | Custom templates for agent files |
Example
Section titled “Example”{ "context": { "files": ["README.md", "CONTRIBUTING.md", "docs/architecture.md"], "dirs": ["docs/", "specs/"], "exclude": ["docs/internal/"], "generateAgentFiles": true }}Model Context Protocol server configuration.
| Property | Type | Default | Description |
|---|---|---|---|
servers | object | {} | MCP server configurations |
configFile | string | ".mcp.json" | Path to MCP config file |
Example
Section titled “Example”{ "mcp": { "configFile": ".mcp.json", "servers": { "filesystem": { "enabled": true }, "github": { "enabled": true, "repo": "${GITHUB_REPOSITORY}" }, "postgres": { "enabled": false, "connectionString": "${DATABASE_URL}" } } }}Variables
Section titled “Variables”RAPID supports variable substitution in string values:
| Variable | Description |
|---|---|
${env:VAR} | Environment variable from container |
${localEnv:VAR} | Environment variable from host |
${workspaceFolder} | Absolute path to project root |
${workspaceFolderBasename} | Project directory name |
Example
Section titled “Example”{ "mcp": { "servers": { "github": { "repo": "${localEnv:GITHUB_REPOSITORY}" } } }}Complete Example
Section titled “Complete Example”{ "$schema": "https://getrapid.dev/schema/v1/rapid.json", "version": "1.0", "name": "my-rapid-project",
"container": { "devcontainer": ".devcontainer/devcontainer.json", "autoStart": true },
"secrets": { "provider": "1password", "vault": "Development", "items": { "ANTHROPIC_API_KEY": "op://Development/Anthropic/api-key", "OPENAI_API_KEY": "op://Development/OpenAI/api-key", "GITHUB_TOKEN": "op://Development/GitHub/pat" } },
"agents": { "default": "claude", "available": { "claude": { "cli": "claude", "instructionFile": "CLAUDE.md", "envVars": ["ANTHROPIC_API_KEY"], "installCmd": "npm install -g @anthropic-ai/claude-code" }, "opencode": { "cli": "opencode", "instructionFile": "AGENTS.md", "envVars": ["ANTHROPIC_API_KEY", "OPENAI_API_KEY"], "installCmd": "npm install -g opencode" }, "aider": { "cli": "aider", "instructionFile": ".aider.conf.yml", "envVars": ["OPENAI_API_KEY"], "installCmd": "pip install aider-chat" } } },
"context": { "files": ["README.md", "CONTRIBUTING.md"], "dirs": ["docs/"], "generateAgentFiles": true },
"mcp": { "configFile": ".mcp.json", "servers": { "filesystem": { "enabled": true }, "github": { "enabled": true } } }}JSON Schema
Section titled “JSON Schema”For editor IntelliSense and validation, reference the schema:
{ "$schema": "https://getrapid.dev/schema/v1/rapid.json"}Or install the RAPID VS Code extension for automatic schema association.