Skip to main content

Authentication Commands

login

Authenticate with your BrainGrid account using OAuth2.
Opens your browser for authentication. Once complete, your credentials are stored locally.

whoami

Display information about the currently authenticated user.
Shows your username, email, and account details.

logout

Sign out from your BrainGrid account.
Removes stored authentication credentials from your local machine.

Initialization Commands

init

Initialize a BrainGrid project in the current directory.
Creates a .braingrid/project.json file linking your local directory to a BrainGrid project. Options:
  • --project <id> - Specify the project ID to link
  • --force - Skip confirmation prompts

Project Commands

project list

List all accessible projects.
Options:
  • --format <type> - Output format: table, json, xml, markdown
  • --page <number> - Page number for pagination (default: 1)
  • --limit <number> - Results per page (default: 20)

project show

Display details for a specific project.
Options:
  • --repository <string> - GitHub repository in format “owner/name”

project create

Create a new project.
Options:
  • --name <string> - Project name (required)
  • --description <string> - Project description (optional)
  • --repository <string> - GitHub repository (optional)

project update

Update an existing project.
Options:
  • --name <string> - New project name
  • --description <string> - New project description

project delete

Delete a project.
Options:
  • --force - Skip confirmation prompt
Deleting a project also deletes all associated requirements and tasks. This action cannot be undone.

Requirement Commands

specify

Create an AI-refined requirement from a natural language prompt.
Options:
  • -p, --project <id> - Target project (defaults to initialized project)
  • --prompt <string> - Natural language description (required)
  • --format <type> - Output format: table, json, xml, markdown
The specify command uses AI to refine your prompt into a structured requirement with clear scope, acceptance criteria, and technical considerations.

requirement list

List all requirements in a project.
Options:
  • --status <status> - Filter by status: IDEA, PLANNED, IN_PROGRESS, REVIEW, COMPLETED, CANCELLED
  • --format <type> - Output format: table, json, xml, markdown

requirement show

Display details for a specific requirement.
Options:
  • --format <type> - Output format: table, json, xml, markdown

requirement create

Manually create a requirement without AI refinement.
Options:
  • --name <string> - Requirement name (required)
  • --content <string> - Detailed description (optional)

requirement update

Update an existing requirement.
Options:
  • --status <status> - New status
  • --name <string> - New name
  • --content <string> - New content

requirement delete

Delete a requirement and all associated tasks.
Options:
  • --force - Skip confirmation prompt

requirement build

Generate a complete implementation plan with all task details.
Options:
  • --format <type> - Output format: markdown, json, xml

requirement create-branch

Create a git branch for a requirement via the GitHub API.
Automatically generates branch names in the format {username}/REQ-123-slugified-name and creates the branch on GitHub.
This command requires a GitHub repository to be linked to your project. The branch is created remotely via the GitHub API.

requirement review

Stream an AI-powered acceptance review for a pull request.
Analyzes your pull request against the requirement’s acceptance criteria and provides detailed feedback. If no PR is found for the current branch, you’ll be prompted to select one interactively.

Task Commands

task list

List all tasks for a requirement.
Options:
  • -r, --requirement <id> - Requirement ID (auto-detected from branch if not specified)
  • --format <type> - Output format: table, json, xml, markdown

task show

Display details for a specific task.
Options:
  • --format <type> - Output format: table, json, xml, markdown
When called without a task ID, shows the first in-progress task. If none are in progress, shows the first planned task.

task create

Manually create a task.
Options:
  • -r, --requirement <id> - Parent requirement ID (required)
  • --title <string> - Task title (required)
  • --content <string> - Task description (optional)

task update

Update a task’s status, title, or content.
Options:
  • --status <status> - New status: PLANNED, IN_PROGRESS, COMPLETED, CANCELLED
  • --title <string> - New title
  • --content <string> - New content
When called without a task ID, updates the first in-progress task. If none are in progress, updates the first planned task.

task delete

Delete a task.
Options:
  • --force - Skip confirmation prompt

task specify

Create a single AI-refined task from a description.
Options:
  • -r, --requirement <id> - Parent requirement ID (auto-detected from branch if not specified)
The task specify command creates individual tasks with AI refinement. It’s context-aware and understands existing task dependencies when adding to a requirement that already has tasks.

Utility Commands

status

Display CLI configuration and status.
Shows authentication status, current project, CLI version, and configuration details.

update

Update the CLI to the latest version.
Options:
  • --check - Only check for updates, don’t install

completion

Set up shell autocompletion for the CLI.
This adds autocompletion to your shell configuration. After setup, restart your terminal or source your config file. Manual setup:

—version

Display the CLI version.

—help

Display help information.

Status Flows

Requirement Status Flow

Requirements progress through the following states:
  • IDEA - Initial concept or feature request
  • PLANNED - Refined and ready for implementation
  • IN_PROGRESS - Active development
  • REVIEW - Under review or testing
  • COMPLETED - Successfully implemented
  • CANCELLED - No longer needed

Task Status Flow

Tasks have a simpler workflow:
  • PLANNED - Ready to be worked on
  • IN_PROGRESS - Currently being implemented
  • COMPLETED - Successfully finished
  • CANCELLED - No longer needed

Flexible ID Formats

All commands accept multiple ID formats for convenience:
  • Canonical: REQ-456, TASK-123, PROJ-789
  • Lowercase: req-456, task-123, proj-789
  • Numeric: 456, 123, 789
  • UUID: Full UUID strings
Examples:

Output Formats

Most commands support multiple output formats:

Table (Default)

Human-readable ASCII tables for terminal viewing.

JSON

Machine-readable format for scripting and automation.

XML

Structured data for enterprise integrations.

Markdown

Rich formatted output optimized for AI agents and documentation.
Use markdown format when providing task context to AI coding agents. It includes all necessary details in a format that’s easy for AI to parse and understand.

Common Patterns

Complete Feature Development Workflow

Quick Status Check

CI/CD Integration