Skip to content

Quick Start

Choose your preferred method:

Section titled “VSCode Extension (Recommended for Visual UI)”
  1. Open VSCode
  2. Install the Brainfile extension from the marketplace
  3. Create a brainfile.md file in your project root
  4. The visual kanban board appears automatically
Terminal window
npm install -g @brainfile/cli
Terminal window
npm install @brainfile/core
Section titled “Option 1: Copy the Example (Recommended for AI Integration)”

Download the fully-featured example from the repository:

Terminal window
curl -o brainfile.md https://raw.githubusercontent.com/brainfile/protocol/main/example/brainfile.md

This example includes:

  • Multiple columns (todo, in-progress, review, done)
  • Tasks with various metadata (priority, tags, assignee, description)
  • Project rules (always, never, prefer)
  • AI agent instructions
  • Custom stats configuration

Initialize a new brainfile in your project:

Terminal window
npm install -g @brainfile/cli
brainfile init

This creates a minimal brainfile.md with basic structure.

Create a file named brainfile.md in your project root:

---
schema: https://brainfile.md/v1
title: My First Project
agent:
instructions:
- Modify only the YAML frontmatter
- Preserve all IDs
- Keep ordering
columns:
- id: todo
title: To Do
tasks:
- id: task-1
title: Setup project structure
priority: high
- id: task-2
title: Write documentation
priority: medium
- id: in-progress
title: In Progress
tasks: []
- id: done
title: Done
tasks: []
---
# My First Project
Welcome to your Brainfile task board!
Terminal window
brainfile list

Output:

📋 My First Project
To Do:
task-1: Setup project structure [high]
task-2: Write documentation [medium]
Terminal window
brainfile add --title "Implement authentication" --priority high
Terminal window
brainfile move --task task-1 --column in-progress
Terminal window
brainfile template --list
brainfile template --use bug-report --title "Login fails on mobile"
  1. Open your project with brainfile.md in VSCode
  2. View the board in the Brainfile sidebar
  3. Drag and drop tasks between columns
  4. Create tasks using the ”+” button or templates
  5. Edit tasks by clicking on them
import { Brainfile } from '@brainfile/core';
import fs from 'fs';
// Read and parse
const markdown = fs.readFileSync('brainfile.md', 'utf-8');
const board = Brainfile.parse(markdown);
console.log(`Project: ${board.title}`);
console.log(`Tasks: ${board.columns.flatMap(c => c.tasks).length}`);
// Add a task
const todoColumn = board.columns.find(c => c.id === 'todo');
todoColumn?.tasks.push({
id: 'task-3',
title: 'New task',
priority: 'medium'
});
// Serialize back
const output = Brainfile.serialize(board);
fs.writeFileSync('brainfile.md', output);

Add these instructions to your agent configuration file (AGENTS.md, CLAUDE.md, .cursorrules, etc.):

# Task Management Rules
- review and follow rules in @brainfile.md
- update task status in @brainfile.md as you work (todo → in-progress → done)
- reference `schema` in the file for how to create tasks
- your existing tools do not modify this file, you need to edit it directly

Recommended: Keep only these minimal instructions in your agent config file, and use brainfile.md for project-specific rules and context.

Add this comment to your README to auto-load the board for AI assistants:

brainfile.md

Now when AI agents read your README, they automatically understand your project’s task context.

AI agents that support Brainfile will:

  • Automatically detect and load your board
  • Follow the instructions in both your agent config and the brainfile.md agent block
  • Update task status as they work
  • Validate changes against the schema
  • Preserve your task structure

Define project-specific rules:

rules:
always:
- id: 1
rule: write tests for all new features
- id: 2
rule: update documentation when adding features
never:
- id: 1
rule: commit directly to main branch
- id: 2
rule: skip code review
prefer:
- id: 1
rule: functional programming patterns
- id: 2
rule: small, atomic commits
context:
- id: 1
rule: this is a TypeScript monorepo
- id: 2
rule: we use Jest for testing

Break down complex tasks:

tasks:
- id: task-1
title: Implement user authentication
priority: high
subtasks:
- id: task-1-1
title: Setup OAuth provider
completed: true
- id: task-1-2
title: Create login UI
completed: false
- id: task-1-3
title: Add session management
completed: false

Use built-in templates for common scenarios:

Terminal window
brainfile template --use bug-report \
--title "Memory leak in data processing" \
--description "Application crashes after 1000+ items"
Terminal window
brainfile template --use feature-request \
--title "Add dark mode" \
--description "Users want theme customization"
Terminal window
brainfile template --use refactor \
--title "Refactor authentication module"

Brainfile works perfectly with Git:

Terminal window
# Add to version control
git add brainfile.md
git commit -m "Add task board"
# See task changes in diffs
git diff brainfile.md
# Merge conflicts are just YAML
# Resolve like any other file

Validate your brainfile in CI:

.github/workflows/validate.yml
name: Validate Brainfile
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Validate
run: npx @brainfile/cli lint --check

See a fully-featured example: