Skip to main content

Chat with your codebase. Understand everything.

Project description

๐Ÿž Bread Crumb

Chat with your codebase from the terminal.

Bread Crumb lets you ask questions about any code repository, get security audits, review diffs, and understand your codebase in seconds. Supports Anthropic, OpenAI, Gemini, and Ollama โ€” bring your own API key.

Demo Recording โ€ข Features โ€ข Installation โ€ข Documentation โ€ข Contributing


โšก Quick Start

# 1. Install
pip install breadcrumb-cli

# 2. Set your AI provider
breadcrumb config set-key --provider anthropic
breadcrumb config set-key --key anthropic_key --value "sk-ant-..."

# 3. Ask questions
breadcrumb ask "What does the auth module do?"
breadcrumb ask "Are there any security issues?" --format markdown

# 4. Start interactive chat
breadcrumb chat .

# 5. Get a security audit
breadcrumb audit .

# 6. Review a PR
breadcrumb diff HEAD~1

๐ŸŽฏ Features

๐Ÿ”ด Critical Features

  • Multi-provider AI support โ€” Anthropic, OpenAI, Gemini, Ollama
  • One-shot mode (breadcrumb ask) โ€” Perfect for CI/CD pipelines
  • Pipe mode โ€” Use in shell scripts and tools: echo "question" | breadcrumb ask --pipe
  • .breadcrumbignore support โ€” Skip generated files, vendor directories, etc.
  • Token usage tracking โ€” See exactly what you're spending
  • Session management โ€” Named conversations per repository

๐ŸŸ  High-Value Features

  • breadcrumb diff โ€” AI-powered code review of PRs and commits
  • breadcrumb audit โ€” Security and architecture audits
  • breadcrumb init โ€” Generate .breadcrumb.yaml for repo-level config
  • Smart context compression โ€” Large files get AI summaries instead of truncation
  • breadcrumb commit โ€” Auto-generate conventional commit messages
  • Multi-session chat โ€” Multiple independent conversations per repo

๐ŸŸก Viral Features

  • breadcrumb explain-error โ€” Pipe any error and get a fix: npm run build 2>&1 | breadcrumb explain-error
  • breadcrumb share โ€” Export chat as beautiful shareable HTML
  • breadcrumb digest โ€” Daily summary of git commits

๐Ÿ“ฆ Installation

Option A: pip (Recommended for developers)

pip install breadcrumb-cli
breadcrumb ask "How does this work?"

Option B: pipx (Isolated, recommended for CLI tools)

pipx install breadcrumb-cli
breadcrumb ask "How does this work?"

Option C: Download Binary (No Python needed)

Download the standalone executable from GitHub Releases:

  • breadcrumb-linux for Linux
  • breadcrumb-macos for macOS
  • breadcrumb-windows.exe for Windows

Then run:

./breadcrumb ask "How does this work?"

TestPyPI Publishing

Use TestPyPI when you want to validate packaging before a real release.

  1. Create a TEST_PYPI_API_TOKEN on TestPyPI.
  2. Add it to GitHub as a repository secret named TEST_PYPI_API_TOKEN.
  3. Run the Publish to TestPyPI workflow from the Actions tab, or push a tag like testpypi-v0.1.0.

This publishes to https://test.pypi.org/legacy/ and does not create a GitHub Release.

Option D: Docker

docker run --rm \
  -v $(pwd):/repo \
  -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
  breadcrumb/breadcrumb audit

๐Ÿ”‘ Configuration

Set Your API Key

# Anthropic (Claude)
breadcrumb config set-key --provider anthropic
breadcrumb config set-key --key anthropic_key --value "sk-ant-..."

# OpenAI
breadcrumb config set-key --provider openai
breadcrumb config set-key --key openai_key --value "sk-..."

# Google Gemini
breadcrumb config set-key --provider gemini
breadcrumb config set-key --key gemini_key --value "..."

# Ollama (local)
breadcrumb config set-key --provider ollama
breadcrumb config set-key --key ollama_url --value "http://localhost:11434"

Repository Config

Create .breadcrumb.yaml in your repo:

# AI Provider to use for this repo
provider: anthropic
model: claude-3-5-sonnet-20241022

# Files to ignore (like .gitignore)
ignore_patterns:
  - "*.min.js"
  - "node_modules/"
  - "vendor/"

# Custom system prompt for this project
system_prompt: |
  This is a fintech application. Always flag PCI-DSS compliance issues.
  The main database is PostgreSQL. Never suggest breaking changes.

temperature: 0.7
max_tokens: 4096

Then generate this file automatically:

breadcrumb init

๐Ÿ“– Commands

Interactive Chat

breadcrumb chat .              # Start interactive session
breadcrumb chat . --session "security-review"  # Named session

One-Shot Queries

breadcrumb ask "What does auth.ts do?"
breadcrumb ask "Security issues?" --format markdown

Code Review

breadcrumb diff HEAD~1         # Review last commit
breadcrumb diff main..feature/new-auth  # Review PR branch

Security & Architecture Audit

breadcrumb audit .             # Full audit
breadcrumb audit . --model gpt-4o  # Use different model

Generate Commit Messages

git add .
breadcrumb commit              # Suggests: "feat(auth): add JWT refresh"

# Or use in scripts:
git commit -m "$(breadcrumb commit --silent)"

Explain Errors

npm run build 2>&1 | breadcrumb explain-error
python script.py 2>&1 | breadcrumb explain-error
cat error.log | breadcrumb explain-error

Daily Digest

breadcrumb digest              # Summary of today's commits
breadcrumb digest --hours 48   # Last 48 hours

Export & Share

breadcrumb share session.json  # Export as HTML

๐Ÿš€ Use Cases

For Teams

# Security review before merge
breadcrumb diff feature-branch --format json > audit.json

# Onboarding: new dev understands the codebase
breadcrumb ask "Give me a 5-minute overview of this project"

# Daily standup digest
breadcrumb digest | pbcopy  # Copy to Slack

In CI/CD Pipelines

# .github/workflows/security.yml
- name: Bread Crumb Audit
  run: |
    breadcrumb audit . --format json > audit-report.json
    if grep -q "critical" audit-report.json; then exit 1; fi

# Pre-commit hook
breadcrumb commit --silent  # Auto-generate commit message

Local Development

# Ask questions while coding
breadcrumb ask "How do I add error handling to this module?"

# Quick error debugging
npm run test 2>&1 | breadcrumb explain-error

# Understand what you changed
breadcrumb diff

๐Ÿ—๏ธ Architecture

breadcrumb/
โ”œโ”€โ”€ cli.py              # Click entry point
โ”œโ”€โ”€ config.py           # Configuration management
โ”œโ”€โ”€ ingest.py           # File walking & .breadcrumbignore
โ”œโ”€โ”€ history.py          # Session management
โ”œโ”€โ”€ ai/
โ”‚   โ”œโ”€โ”€ router.py       # Provider routing (Anthropic/OpenAI/Gemini/Ollama)
โ”‚   โ””โ”€โ”€ prompts.py      # System prompts
โ”œโ”€โ”€ commands/
โ”‚   โ”œโ”€โ”€ chat.py         # Interactive TUI
โ”‚   โ”œโ”€โ”€ ask.py          # One-shot queries
โ”‚   โ”œโ”€โ”€ audit.py        # Security audit
โ”‚   โ”œโ”€โ”€ diff.py         # Diff review
โ”‚   โ”œโ”€โ”€ commit.py       # Commit generation
โ”‚   โ”œโ”€โ”€ explain_error.py
โ”‚   โ”œโ”€โ”€ digest.py       # Commit digest
โ”‚   โ”œโ”€โ”€ init.py         # Config initialization
โ”‚   โ””โ”€โ”€ share.py        # HTML export

๐Ÿค Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

git clone https://github.com/yourusername/breadcrumb
cd breadcrumb
pip install -e .

# Run tests
pytest tests/

# Run linting
ruff check .

๐Ÿ“ License

MIT License โ€” see LICENSE for details.


๐ŸŒŸ Show Your Support

If Bread Crumb helps you, please give it a star on GitHub! It helps us reach more developers.

Questions? Issues? Create an issue or start a discussion.


Made with ๐Ÿž by developers who love their codebases

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

breadcrumb_cli-0.1.0.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

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

breadcrumb_cli-0.1.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

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