Skip to content

rapid.json Specification

Version: 1.0

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.

RAPID looks for configuration in this order:

  1. rapid.json (project root) - recommended
  2. .rapid/config.json
  3. .rapidrc.json
{
"$schema": "https://getrapid.dev/schema/v1/rapid.json"
}
PropertyTypeRequiredDefaultDescription
$schemastringNo-JSON schema URL for validation/IntelliSense
versionstringYes-Specification version ("1.0")
namestringNoDirectory nameProject name
containerobjectNoSee belowContainer configuration
secretsobjectNo{"provider": "env"}Secret management
agentsobjectYes-AI agent configuration
contextobjectNoSee belowContext file settings
mcpobjectNo-MCP server configuration

Container lifecycle configuration.

PropertyTypeDefaultDescription
devcontainerstring".devcontainer/devcontainer.json"Path to devcontainer.json
composestringnullDocker Compose file (overrides devcontainer)
autoStartbooleantrueStart container automatically on rapid dev
buildArgsobject{}Additional Docker build arguments
{
"container": {
"devcontainer": ".devcontainer/devcontainer.json",
"autoStart": true,
"buildArgs": {
"NODE_VERSION": "20"
}
}
}

Secret management configuration. RAPID uses .envrc with direnv as the source of truth for secure secret loading.

PropertyTypeDefaultDescription
providerenum"1password""1password", "vault", "env"
vaultstring-Vault name (1Password) or path (HashiCorp)
addressstring-Vault server address (HashiCorp only)
itemsobject{}Map of env var names to secret references
envrcobject{}.envrc generation settings
PropertyTypeDefaultDescription
generatebooleantrueAuto-generate .envrc from items
pathstring".envrc"Path to .envrc file
includeLocalbooleantrueSource .envrc.local if present
{
"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:

Terminal window
# .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.local
{
"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:

Terminal window
# .envrc - Generated by RAPID
export 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)

Fallback that reads from environment. Does not generate .envrc.

{
"secrets": {
"provider": "env"
}
}

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.


AI agent configuration.

PropertyTypeRequiredDescription
defaultstringYesName of the default agent
availableobjectYesMap of agent name to configuration

Each agent in available supports:

PropertyTypeRequiredDescription
clistringYesCLI command to execute
instructionFilestringNoPath to instruction file for this agent
envVarsarrayNoRequired environment variables
installCmdstringNoCommand to install the CLI tool
argsarrayNoAdditional CLI arguments
{
"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 file generation and management.

PropertyTypeDefaultDescription
filesarray["README.md"]Files to include in agent context
dirsarray["docs/"]Directories to include
excludearray[]Patterns to exclude
generateAgentFilesbooleantrueAuto-generate AGENTS.md, CLAUDE.md
templateDirstring-Custom templates for agent files
{
"context": {
"files": ["README.md", "CONTRIBUTING.md", "docs/architecture.md"],
"dirs": ["docs/", "specs/"],
"exclude": ["docs/internal/"],
"generateAgentFiles": true
}
}

Model Context Protocol server configuration.

PropertyTypeDefaultDescription
serversobject{}MCP server configurations
configFilestring".mcp.json"Path to MCP config file
{
"mcp": {
"configFile": ".mcp.json",
"servers": {
"filesystem": {
"enabled": true
},
"github": {
"enabled": true,
"repo": "${GITHUB_REPOSITORY}"
},
"postgres": {
"enabled": false,
"connectionString": "${DATABASE_URL}"
}
}
}
}

RAPID supports variable substitution in string values:

VariableDescription
${env:VAR}Environment variable from container
${localEnv:VAR}Environment variable from host
${workspaceFolder}Absolute path to project root
${workspaceFolderBasename}Project directory name
{
"mcp": {
"servers": {
"github": {
"repo": "${localEnv:GITHUB_REPOSITORY}"
}
}
}
}

{
"$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 }
}
}
}

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.