CLI
The power of BrainGrid in your terminal
Manage projects, requirements, and tasks from your terminal.
Common use cases:
- Fetch a requirement's tasks - Get the tasks for a requirement for your coding agent to implement.
- Save agent plans - Save your coding agent's plans to share and implement later.
- Refine vague ideas - Transform rough concepts into clear, actionable requirements with AI assistance.
Installation
Install the BrainGrid CLI globally using npm:
npm install -g @braingrid/cliAuthentication
Before using the CLI, authenticate with your BrainGrid account:
braingrid loginQuick Start: One-Minute Flow
Get started with BrainGrid in four simple steps:
Initialize
Initialize your project with BrainGrid:
braingrid initSpecify
Create a requirement with AI refinement:
braingrid specify --prompt "Add user authentication with OAuth2"Build
Get complete implementation plan:
braingrid requirement build REQ-1The CLI automatically detects your current project from .braingrid/project.json and can extract requirement IDs from your git branch names (e.g., feature/REQ-123-auth).
AI Coding Integration
BrainGrid CLI integrates seamlessly with AI coding tools:
Typical Workflow
Here's how BrainGrid CLI fits into your development process:
- Capture Ideas - Use
braingrid specifyto refine vague ideas into structured requirements - Build Features - Create a git branch and let your AI agent work through tasks
- Track Progress - Update task status with
braingrid task updateas you complete work
Auto-Detection Features
The CLI includes smart auto-detection to minimize typing:
- Project Detection - Automatically finds project from
.braingrid/project.json - Branch-Based Requirements - Extracts requirement IDs from branch names like
feature/REQ-123-description - Flexible ID Formats - Accepts
REQ-123,req-123,123, or full UUIDs
Output Formats
Commands support multiple output formats for different use cases:
table(default) - Human-readable tables for terminal viewingjson- Machine-readable format for scripting and automationxml- Structured data for enterprise integrationsmarkdown- Rich formatted output perfect for AI agents
Use the --format flag on any command:
braingrid requirement list --format json
braingrid requirement build REQ-123 --format markdown