All notable changes to @brainfile/cli will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Workspace format probe for migration readiness
- New shared detector classifies workspaces as
v2,legacy-root,legacy-dotbrainfile,mixed, orempty - Used consistently by init/migrate/hint flows to avoid command drift
- New shared detector classifies workspaces as
- Soft migration warnings in TUI read path
- Launching
brainfile tuiin legacy/mixed workspaces now shows a non-blocking upgrade hint
- Launching
brainfile migrateis now the primary v2 upgrade path- Migration now handles legacy root and legacy
.brainfile/brainfile.mdlayouts in one command - Mixed workspaces are handled safely (including backup of stray legacy root files)
- Existing
board//logs/partial states are recognized and migrated more robustly
- Migration now handles legacy root and legacy
- Migration guidance text now points to
brainfile migrate(without--v2)- Updated CLI hints and relevant command errors/messages
brainfile initlegacy detection behaviorinitnow refuses to initialize over detected legacy/mixed layouts and suggests runningbrainfile migrate- Already-v2 workspaces are treated idempotently (no destructive re-init path)
- List/TUI migration nudges
brainfile listandbrainfile tuinow provide soft warnings when legacy layout is detected, improving discoverability for required migration
- Per-task file architecture (v2) - Tasks are now individual
.mdfiles instead of embedded YAMLbrainfile initcreates v2 structure:brainfile.md(config),tasks/,logs/,state.jsonbrainfile migrate --v2converts v1 boards to v2 per-task files (creates.v1.bakbackup)- All existing commands auto-detect v1 vs v2 and handle both transparently
brainfile complete- Move task fromtasks/tologs/withcompletedAttimestamp- Strips
columnandpositionfields from completed task complete_taskMCP tool for parity
- Strips
brainfile log- View and manage task historybrainfile log -t <id>- View a completed task's logbrainfile log --search <query>- Search across all completed task logsbrainfile log --recent- List recently completed tasksbrainfile log note -t <id> "<message>"- Append timestamped entry to any task's## Logsectionsearch_logsandappend_logMCP tools for parity
brainfile search- Search across active tasks and completed logs with relevance scoringsearch_tasksMCP tool updated for v2
- All MCP tools have v2 support - 29 tools detect v1/v2 and handle per-task files correctly
- Uses
@brainfile/coreas single source of truth for all task I/O operations - CLI is a thin wrapper over core (no duplicated parsing/serialization logic)
- Uses
brainfile initdefaults to v2 - Creates per-task file directory structure- Upgraded to @brainfile/core@^0.11.0
brainfile schemacommand - View and manage brainfile schemasbrainfile schema- List available schemas (board, base)brainfile schema <name>- Display specific schema as JSONbrainfile schema update- Check for schema updates from protocol repo- Schemas bundled with CLI package (no network for basic usage)
- 24-hour auto-check for updates with non-blocking notification
--jsonflag for programmatic output
brainfile rulescommand - Manage project rulesbrainfile rules- List all rules by categorybrainfile rules add <category> "rule text"- Add a rulebrainfile rules delete <category> <id>- Delete a rule by ID- Categories:
always,never,prefer,context --jsonflag for programmatic output
- MCP tools for rules -
list_rules,add_rule,delete_rule
- Contract validation base directory - When brainfile is at
.brainfile/brainfile.md, validation now correctly resolves paths from project root instead of.brainfile/directory- Deliverable paths like
cli/src/file.tsnow resolve correctly - Validation commands run from project root, not
.brainfile/
- Deliverable paths like
- Directory-change warning in validation - Warns when validation commands use
cd,pushd, orchdir- Explains that directory changes may cause brainfile CLI to find a different brainfile
- Suggests using
-fflag or running from project root - Warning appears in both CLI and MCP tool output
--jsonflag for show command - Output task data as JSON for scriptingbrainfile show -t task-123 --json- Includes all task fields plus
columnandarchivedmetadata
- Archive file separation - CLI now correctly uses separate
brainfile-archive.mdfile- Archive command writes to separate file, not inline
archive: []array - Restore command reads from separate archive file
--allflag reads frombrainfile-archive.mdfor bulk export- MCP tools (archive_task, restore_task, bulk_archive_tasks) use separate file
- Archive command writes to separate file, not inline
- Extended destination format - Inline archive destination in brainfile.md
archive.destination: github:owner/repo- specify GitHub repo directlyarchive.destination: linear:TEAM_KEY- specify Linear team by key- Falls back to global config if target not specified
- TUI external archive - Shift+A now supports GitHub/Linear destinations
- Respects
archive.destinationfrom brainfile.md or global config - Shows "Archiving..." status during async operation
- Displays result (e.g., "Archived to GitHub #123")
- Respects
- Shared archive utilities - New
cli/src/utils/archive.tsmodulearchiveTaskToFile()- archive to separate fileloadArchivedTasks()- read from archive filerestoreFromArchive()- restore task to main fileremoveFromArchive()- remove after external export
- Linear auth flow - Auto-detects teams and prompts for selection
- Single team: auto-configures as default
- Multiple teams: interactive selection prompt
- Offers to set Linear as default archive destination
- MCP archive_task destination support - Archive tasks to GitHub/Linear via MCP
- New
destinationparameter:"local","github", or"linear" - Respects project default from
brainfile.mdarchive.destination - Falls back to user default from
~/.config/brainfile/config.json - Helpful error messages with exact CLI commands when auth/config needed
- Example:
archive_task({ task: "task-1", destination: "github" })
- New
- config command - Manage CLI configuration
brainfile config list- Show all config valuesbrainfile config get <key>- Get a specific valuebrainfile config set <key> <value>- Set a valuebrainfile config path- Show config file path- Configuration stored at
~/.config/brainfile/config.json
- External archive destinations - Archive completed tasks to GitHub Issues or Linear
brainfile archive --task task-1 --to=github- Create closed GitHub Issuebrainfile archive --task task-1 --to=linear- Create completed Linear issuebrainfile archive --all --to=github- Batch archive entire local archivebrainfile archive --dry-run- Preview without creating- Reads
archive.destinationfrom brainfile.md for project-level defaults - Reads
~/.config/brainfile/config.jsonfor user-level defaults
- auth command - Authenticate with external services
brainfile auth github- OAuth device flow (opens browser) or detects gh CLIbrainfile auth github --token <PAT>- Manual Personal Access Tokenbrainfile auth linear --token <API_KEY>- Linear API key authenticationbrainfile auth status- Show authentication status for all providersbrainfile auth logout [provider]- Clear stored credentialsbrainfile auth logout --all- Clear all credentials- Secure token storage in
~/.config/brainfile/auth.json - Automatic gh CLI detection (piggybacks on existing auth)
- Upgraded to @brainfile/core@^0.9.0 with task formatter functions
- Status bar rendering - Fixed character clipping in footer hints
- TUI redesign - Complete visual overhaul of the terminal interface
- Borderless task cards for cleaner, faster scanning
- Selection indicator (
▌) matches column tabs for visual consistency - Priority badge leads the title row for immediate visibility
- Compact
[X/Y]subtask counts replace block progress bars - Meta row shows progress, due date, and tags with
·separators - Task IDs right-aligned for consistent table-like appearance
- 3 lines per collapsed task (down from 7) - more tasks visible at once
- Layout stability - Reserved space for status messages prevents layout shifts during updates
- Row spacing - Fixed inconsistent margins between task cards
- Viewport calculations - Fixed content width calculations for accurate scrolling
- Task card border overflow - Fixed metadata row (tags, priority) overflowing the rounded border. Added explicit width constraints and tag truncation with ellipsis.
- Expanded task disappearing - Fixed bug where expanding a task with many subtasks would cause it to vanish from view. Selected task is now always rendered regardless of height.
- Priority badge labels - Changed truncated "MEDI" to proper abbreviations: LOW, MED, HIGH, CRIT
- TAB navigation in Rules panel - TAB/Shift+TAB now cycles through rule types (always/never/prefer/context)
- Context-aware footer hints - Status bar now shows
TAB typein Rules panel, hides TAB hint in Archive panel
- Removed broken archive search - Archive panel no longer shows non-functional search box
- Rules Panel - Full rule management in TUI (feature parity with VSCode extension)
- Press
2to switch to Rules panel - Four rule categories: Always, Never, Prefer, Context
h/lto switch between rule typesnto add new rule,eto edit,dto delete- Rules persist to brainfile YAML frontmatter
- Press
- Archive Panel - View and manage archived tasks in TUI
- Press
3to switch to Archive panel - Browse archived tasks with
j/knavigation R(Shift+R) to restore task to a columndto permanently delete archived taskEnterto expand/collapse task detailsrto refresh archive from file
- Press
- Main Panel Tabs - Tab-based navigation between Tasks, Rules, and Archive
- Press
1,2,3to switch panels - Visual tab bar shows active panel with counts
- Press
- Updated Help Overlay - Three-column layout documenting all panel shortcuts
- Clean exit - Screen clears on quit, returning to clean terminal (like vim/htop)
- Archive keybinding - Changed from
atoA(Shift+A) to prevent accidental archiving- Easy to hit
athinking "add" and accidentally archive a task - Now requires intentional Shift+A keystroke
- Easy to hit
- Panel tabs visual alignment - Main panel tabs now match column tabs styling exactly
- Same
▌indicator, spacing, and color treatment for visual consistency
- Same
- Archive to separate file - Archive now writes to
brainfile-archive.mdper protocol spec- Previously archived tasks to inline
archive: []array in same file - Now matches VSCode extension behavior and protocol specification
- Archive file is created automatically in same directory as brainfile
- Previously archived tasks to inline
- Cursor artifact after editor - Fixed blinking cursor appearing after returning from external editor
- Advanced search filters - Filter tasks using structured queries
p:highorpriority:critical- Filter by priority#tagort:bug- Filter by tag@johnorassignee:john- Filter by assigneedue:overdue,due:today,due:week,due:month- Filter by due date- Combine filters with text search:
p:high #bug fix login
- Filter hints in search bar - Shows available filters when search is empty
- Updated help overlay - Documents filter syntax
- TUI empty string rendering bug - Fixed critical Ink rendering error when
searchQuerywas empty- Changed
searchQuery && ...tosearchQuery.length > 0 && ...to returnfalseinstead of"" - Empty strings in React/Ink cause "Text string must be rendered inside Text component" errors
- Changed
- truncate() utility - Returns single space
' 'instead of empty string for Ink compatibility - Progress bar rendering - Protected
.repeat()calls from producing empty strings whenfilledoremptyis 0 - Separator lines - Added
Math.max(1, ...)safeguard for separator line widths
- TUI task management - Full interactive task management in the terminal
e- Edit task in $EDITORm- Move task to different column (overlay picker)d- Delete task with confirmationt- Toggle subtask completion (overlay picker)n- Quick add new task (inline input)N- New task in $EDITORp- Cycle priority (none→low→medium→high→critical)a- Archive tasky- Copy task ID to clipboard
- Minimum terminal size check - Shows helpful message if terminal is smaller than 60x16
- Due date display - Shows due dates with color coding (red if overdue, yellow if ≤2 days)
- Expanded subtask view - Shows all subtasks when task is expanded (removed 5-subtask limit)
- Search improvements - Now searches description field, proper trimming, "no results" message
- TUI styling - Lipgloss-inspired rounded borders and true black theme
- Upgraded to @brainfile/core@^0.8.0
- MCP server auto-discovery - Automatically finds workspace brainfile without hardcoded paths
- Checks
WORKSPACE_FOLDER_PATHSenv var (set by Cursor IDE) - Falls back to git repository root detection
- Falls back to walking up directory tree from cwd
- Logs discovered path to stderr for debugging
- Checks
brainfile initschema URL - Changed fromhttps://brainfile.md/v1tohttps://brainfile.md/v1/board.jsonper protocol spec
- Upgraded to @brainfile/core@^0.8.0 with
findNearestBrainfile()support
- get_task MCP tool - Get detailed information about a specific task by ID
- search_tasks MCP tool - Search tasks by title, description, or tags with relevance scoring
- Supports filtering by column, priority, and assignee
- Results sorted by relevance score
- Bulk MCP tools - Process multiple tasks in a single operation
bulk_move_tasks- Move multiple tasks to a target columnbulk_patch_tasks- Apply the same patch (priority, tags, assignee) to multiple tasksbulk_delete_tasks- Delete multiple tasks permanentlybulk_archive_tasks- Archive multiple tasks
- All bulk tools return detailed results with per-item success/failure status
- Upgraded to @brainfile/core@^0.7.0 with bulk operation support
- MCP patch_task null handling - Fixed field removal when passing
"null"string from MCP clients
- Updated help menu to show MCP command in usage section
- MCP Server - Model Context Protocol server for AI assistant integration
brainfile mcpstarts an MCP server via stdio- 11 tools available: list_tasks, add_task, move_task, patch_task, delete_task, archive_task, restore_task, add_subtask, delete_subtask, toggle_subtask, update_subtask
- Works with Claude Code, Cursor, and other MCP-compatible clients
- Configure via
.mcp.jsonfor project-specific integration
- patch command - Update specific task fields with partial updates
- Set new values for title, description, priority, tags, assignee, due date
- Remove fields with
--clear-*options (e.g.,--clear-assignee)
- delete command - Permanently delete tasks (requires
--forceflag) - archive command - Move tasks to the archive section
- restore command - Restore archived tasks to a column
- subtask command - Full subtask management
--add- Create new subtasks--toggle- Toggle completion status--update- Update subtask title--delete- Remove subtasks
- Updated add command to support
--assignee,--due-date, and--subtasksoptions - Upgraded to @brainfile/core@^0.5.1 with new operation APIs
- TUI: Optimized file watching with hash-based deduplication
- Uses
hashBoardContentfrom@brainfile/coreto skip redundant refreshes - File watcher now only re-renders when content actually changes
- Reduces unnecessary re-renders when file is saved without changes
- Consistent behavior with VSCode extension's realtime sync
- Uses
- Added documentation for realtime sync utilities in README
- Terminal UI (TUI) - Interactive split-terminal friendly task board
brainfileorbrainfile tuilaunches the TUIbrainfile <file>opens TUI with a specific brainfile- Real-time file watching with auto-refresh on changes
- Column navigation with TAB key
- Task navigation with j/k or arrow keys
- Expand/collapse task details with Enter
- Search/filter with
/key - Help overlay with
?key - Progress bar showing completion percentage
- Column ordering by
orderproperty (matches VSCode extension) - True black dark mode color scheme
- Inverse selection highlighting for clarity
- Responsive layout that adapts to terminal size
- Updated @brainfile/core to ^0.4.1 for column ordering support
- Added ink ^3.2.0 for React-based terminal UI
- Added chokidar ^4.0.3 for file watching
- Added react ^17.0.2 for ink compatibility
- Cline Hooks Hanging Issue - Fixed hook scripts hanging on startup
- Added 2-second timeout to stdin read using
read -t 2 - Hooks now gracefully handle missing stdin data by using empty JSON object
- Prevents indefinite blocking when Cline doesn't provide stdin properly
- All three hooks (PostToolUse, UserPromptSubmit, TaskStart) updated
- Added 2-second timeout to stdin read using
- Cline Hooks Support - Added support for Cline VS Code extension
brainfile hooks install cline- Install hooks for Clinebrainfile hooks uninstall cline- Remove Cline hooksbrainfile hooks list cline- View Cline hook status- Creates executable hook scripts: PostToolUse, UserPromptSubmit, TaskStart
- Hooks return JSON with
cancelandcontextModificationfields - User scope:
~/Documents/Cline/Rules/Hooks/ - Project scope:
.clinerules/hooks/ - Full test coverage for Cline integration
- AI Agent Hooks Integration - Native support for AI coding assistant hooks
brainfile hooks install <tool>- Install hooks for Claude Code or Cursorbrainfile hooks uninstall <tool>- Remove hooks with--scopeoption (user/project/all)brainfile hooks list [tool]- View installed hooks statusbrainfile hooks after-edit- Internal hook handler for post-edit eventsbrainfile hooks before-prompt- Internal hook handler for pre-prompt events with staleness detectionbrainfile hooks session-start- Internal hook handler for session start- Generic hook handlers work with multiple AI assistants (Claude Code and Cursor)
- Automatic task status reminders during AI-assisted development
- Smart staleness detection (warns if brainfile >5 minutes old with uncommitted changes)
- Git integration to detect uncommitted changes
- Gentle reminders (80%) + smart checkpoints (20%) approach
- Non-blocking hooks that fail gracefully
- Preserves existing hooks in settings files
- Works with both user and project scope installations
- init command - Initialize new brainfile.md with minimal template
brainfile initcreates a basic project structure- Includes default agent instructions and three columns (todo, in-progress, done)
--forceflag to overwrite existing files--fileoption to specify custom output path
- Dynamic version reading from package.json for
brainfile -V
- Refactored lint command to use
BrainfileLinterfrom @brainfile/core - Upgraded to @brainfile/core@^0.3.0 with integrated linter
- Removed ~200 lines of duplicate linting logic
- Simplified lint command implementation
- Version command now correctly displays current version from package.json
- Initial public release
- Command-line interface for Brainfile management
- Integration with @brainfile/core