Skip to main content

Brief your AI coding assistants once, update them all

Project description

๐Ÿค– Brief

Brief your AI coding assistants once, update them all.

License: MIT Python 3.9+


The Problem

You're using Claude Projects, GitHub Copilot, and Cursor. You want them all to follow your project's conventions:

  • โœ… Run tests before committing
  • โœ… Update docs after code changes
  • โœ… Follow your team's architectural patterns

But maintaining 3+ instruction files manually is tedious and error-prone.

The Solution

pip install ai-brief

# One command updates all your AI assistants
brief update "Run pytest before committing any code"

# โœ… .github/copilot-instructions.md updated
# โœ… CLAUDE.md updated
# โœ… AGENTS.md updated
# โœ… .cursorrules updated

Installation

# CLI only (recommended for most users)
pip install ai-brief

# CLI + MCP server (for AI assistant integration)
pip install 'ai-brief[mcp]'

# Or install from source
git clone https://github.com/Nas4146/brief.git
cd brief
pip install -e .              # CLI only
pip install -e '.[mcp]'       # CLI + MCP

Requirements: Python 3.9+

Dependencies: Minimal!

  • Core (always installed):
    • click>=8.0.0 - CLI framework
    • pyyaml>=6.0.0 - Config file support
    • rich>=13.0.0 - Beautiful terminal output
  • Optional (only if you want MCP):
    • mcp>=0.1.0 - Model Context Protocol support

Install what you need:

  • Just want the CLI? โ†’ pip install ai-brief
  • Want AI assistants to use Brief? โ†’ pip install 'ai-brief[mcp]'

Verify Installation

# Check CLI is installed
brief --version
# Output: brief, version 0.1.0

# Check MCP server (if installed with [mcp])
which brief-mcp
# Output: /path/to/brief-mcp (if installed)
#         brief-mcp not found (if not installed)

Quick Start

# 1. Navigate to your project
cd your-project

# 2. Initialize brief (discovers existing instruction files)
brief init
# โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
# โ”‚ Initializing briefโ”‚
# โ”‚ your-project      โ”‚
# โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
# 
# Found 3 instruction files:
# โœ“ AGENTS.md
# โœ“ CLAUDE.md
# โœ“ .github/copilot-instructions.md

# 3. Add an instruction
brief update "Always use async/await for database calls"
# Preview changes with color-coded diffs
# Confirm with y/n

# 4. Validate everything is consistent
brief validate
# โœ… All instruction files are consistent!

# 5. List all instruction files
brief list
# Displays table with files and sizes

Features

  • ๐Ÿ” Auto-discovery - Finds all instruction files automatically
  • ๐Ÿง  Context-aware - Understands your project structure and conventions
  • โœ… Validation - Ensures consistency across all files
  • ๐ŸŽฏ Zero config - Works out of the box, customizable when needed
  • ๐Ÿชถ Lightweight - Minimal dependencies (Click + PyYAML + Rich)
  • โœจ Beautiful UI - Professional terminal output with tables, panels, and color coding
  • ๐Ÿ”’ Duplicate prevention - Fuzzy matching prevents redundant instructions
  • ๐Ÿ‘€ Preview mode - See exactly what changes before applying
  • ๐Ÿค– MCP Support - AI assistants can update their own instructions via Model Context Protocol

MCP Server (Optional)

Brief includes an optional MCP server that lets AI assistants update their own instruction files.

Note: MCP support is completely optional. The CLI works perfectly without it!

Installation

# Install Brief with MCP support
pip install 'ai-brief[mcp]'

Configuration

Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "brief": {
      "command": "brief-mcp"
    }
  }
}

Don't use AI assistants with Brief? Skip this section! The CLI works independently.

See docs/MCP_SERVER.md for full MCP documentation.


Supported Files

Brief automatically discovers and updates these instruction files:

File Tool
AGENTS.md Custom agent instructions
CLAUDE.md Claude Projects
.clinerules Cline (VS Code extension)
.github/copilot-instructions.md GitHub Copilot
.cursorrules Cursor IDE

Commands

brief init

Initialize brief in your project. Discovers existing instruction files and analyzes project structure.

brief init

# Output:
# ๐Ÿš€ Initializing brief in /Users/you/project
# ๐Ÿ“ Scanning for instruction files...
# โœ… Found 3 instruction file(s):
#    โ€ข AGENTS.md
#    โ€ข CLAUDE.md
#    โ€ข .github/copilot-instructions.md
# ๐Ÿ” Analyzing project structure...
#    Languages: Python, TypeScript
#    Frameworks: FastAPI, React
# โœ… Configuration file ready: .brief.yaml

brief update "instruction"

Add a new instruction to all files with context awareness.

brief update "Run tests before committing any code"

# Output:
# ๐Ÿ“ Analyzing project: your-project
# โœจ Updating 3 file(s) with context:
#    Languages: Python
#    Test framework: pytest
# ๐Ÿ“Š Adding instruction: "Run tests before committing any code"
#    โœ… AGENTS.md
#    โœ… CLAUDE.md
#    โœ… .github/copilot-instructions.md

brief validate

Check instruction files for consistency across all agent files.

Two validation modes:

  1. --check-all (default): Verifies that core instructions/guidance exists across all files

    • Checks if topics mentioned in one file are covered in others
    • Uses fuzzy matching - doesn't require word-for-word matches
    • Helps ensure no agent is missing important guidance
  2. --check-latest: Verifies the most recent update was added to all files

    • Finds the most recently modified file
    • Checks if similar content exists in other files
    • Useful after running brief update to verify changes propagated
# Check overall consistency (default)
brief validate

# Check only if latest update is in all files
brief validate --check-latest --no-check-all

# Check both
brief validate --check-latest

# Output with issues:
# ๐Ÿ” Validating instructions in: your-project
# ๐Ÿ“‹ Checking 3 file(s)...
# 
#   File                              Status
#   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
#   AGENTS.md                           โœ—
#   CLAUDE.md                           โœ“
#   .github/copilot-instructions.md     โœ—
#
# โš ๏ธ  Found 2 issue(s):
#   โ€ข Recent update in 'CLAUDE.md' may be missing from: AGENTS.md
#   โ€ข 'copilot-instructions.md' may be missing guidance on: testing, error handling
#
# โŒ Found inconsistencies

# Output when consistent:
# โœ… All instruction files are consistent!

brief list

List all discovered instruction files.

brief list

# Output:
# ๐Ÿ“‹ Instruction files in: your-project
#    โœ… AGENTS.md (2,456 bytes)
#    โœ… CLAUDE.md (1,832 bytes)
#    โœ… .github/copilot-instructions.md (3,120 bytes)
# ๐Ÿ“Š Total: 3 file(s)

Use Cases

For Solo Developers

Keep your personal AI assistant instructions consistent across tools without manual copy-paste.

For Teams

Onboard new developers faster by baking project conventions into AI tools.

For Open Source

Help contributors understand your project's workflow through AI assistants.


Project Structure

your-project/
โ”œโ”€โ”€ AGENTS.md                          # Custom instructions
โ”œโ”€โ”€ CLAUDE.md                          # Claude instructions
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ copilot-instructions.md       # Copilot instructions
โ”œโ”€โ”€ .cursorrules                       # Cursor instructions
โ”œโ”€โ”€ .brief.yaml                        # Brief config (optional)
โ””โ”€โ”€ src/
    โ””โ”€โ”€ ...

Configuration (Optional)

Brief works with zero configuration, but you can customize behavior with .brief.yaml:

version: 1

# Instruction files to manage
instruction_files:
  - AGENTS.md
  - CLAUDE.md
  - .github/copilot-instructions.md
  - .cursorrules

# Project metadata
project:
  languages:
    - Python
    - TypeScript
  frameworks:
    - FastAPI
    - React

# Enabled behaviors (coming soon)
behaviors:
  enabled:
    - test_before_commit
    - update_docs_after_changes

Development

# Clone the repository
git clone https://github.com/Nas4146/brief.git
cd brief

# Install in development mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linter
ruff check .

# Format code
black .

Roadmap

V0.1 (Current) - MVP โœ… Complete

  • โœ… CLI with init, update, validate, list commands
  • โœ… Auto-discovery of instruction files
  • โœ… Context-aware updates (language, framework detection)
  • โœ… Basic validation
  • โœ… Diff preview before applying changes
  • โœ… MCP server for AI assistant integration
  • โœ… Duplicate prevention with fuzzy matching

V0.2 (Next)

  • Template library with common behaviors
  • sync command for applying templates
  • Config file generation wizard
  • Advanced consistency checking
  • CI/CD integration examples

V0.3 (Future)

  • Community template marketplace
  • Web dashboard for team management
  • Git hooks integration
  • Multi-project synchronization

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.


License

MIT ยฉ 2025


Why "Brief"?

Brief (verb): to give essential information to someone

Perfect for giving your AI assistants the essential context they need, once, and having it propagate everywhere.


Links


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_brief-0.1.0.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_brief-0.1.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file ai_brief-0.1.0.tar.gz.

File metadata

  • Download URL: ai_brief-0.1.0.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for ai_brief-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a30470c207167c6048e7240c7e3cd61a3eb5b0d822cad95ac23798c07eceb16d
MD5 53e99aae4629fe3825b00ed0b29d41b8
BLAKE2b-256 c5e984238cbecd033bbf7cd0502341f572859539dfc68b9816ad7684e4381ea5

See more details on using hashes here.

File details

Details for the file ai_brief-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ai_brief-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for ai_brief-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62bd2bd4864cf3536f2e686ec9c65e8f06e0cc10a7a921a812330c9be7e353ab
MD5 6982702c30cc4d91c43794978ebc45f0
BLAKE2b-256 3b37e4e496700aec39435ceb73581122614b1fa09c1e1a522a0c5da631240f5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page