#logging #workflow #productivity

app devbrain

Local-first CLI to capture, search, and recall developer workflow (commands, errors, and fixes)

2 unstable releases

0.2.0 Apr 17, 2026
0.1.0 Apr 13, 2026

#749 in Command line utilities

MIT license

78KB
2K SLoC

devbrain

A local-first CLI that remembers your developer workflow: commands, errors, and fixes, so you never debug the same issue twice.

Why devbrain?

You fix a bug.

Two weeks later, you hit it again.

You remember solving it, but not how.

You search history and logs, then waste time.

devbrain solves that.

It passively captures your workflow:

  • commands you run
  • errors you encounter
  • fixes you apply

Then it makes searchable, structured, and reusable.

devbrain search auth

Core Features

Developer Memory

devbrain log "fixed auth bug by updating JWT secret"
devbrain log-error "ECONNREFUSED localhost:3000"
devbrain log-cmd "npm run dev"
devbrain search auth
devbrain search "auth error" --type error --since 1d
devbrain search backend --tag api

Supports:

  • multi-word search
  • tag-aware results
  • time filtering
  • type filtering
  • ranked relevance

Automatic Capture (Bash)

devbrain can log commands:

npm run dev
cargo build
git commit -m "fix"

No manual logging required.

Tagging

devbrain log "fixed login bug" --tag auth --tag backend
devbrain search auth
devbrain timeline --tag backend

Stats and Insights

devbrain stats

Example:

Total entries: 120
Logs: 60
Commands: 45
Errors: 15
Top project: api
Top tags: backend, auth

Session Tracking

Group commands by session:

devbrain session

Useful for reviewing a dev session.

Cleanup and Export

devbrain cleanup
devbrain cleanup --older-than 7
devbrain export backup.json
devbrain import backup.json --merge
devbrain search auth --json

Installation

cargo install devbrain

Example Workflow

devbrain log "fixed JWT issue"
devbrain log-error "port already in use"
devbrain log-cmd "npm run dev"
devbrain search jwt
devbrain errors --recent

Bash Integration

Add to ~/.bashrc:

shopt -s histappend
export DEVBRAIN_SESSION_ID="${DEVBRAIN_SESSION_ID:-$(date +%s)}"

devbrain_capture() {
    local status=$?

    history -a
    history -n

    local cmd
    cmd=$(history 1 | sed 's/^ *[0-9]* *//')

    [[ -z "$cmd" ]] && return
    [[ "$cmd" == devbrain* ]] && return

    [[ "$cmd" == "$LAST_DEVBRAIN_CMD" ]] && return
    LAST_DEVBRAIN_CMD="$cmd"

    devbrain shell-log "$cmd" --status "$status" --session "$DEVBRAIN_SESSION_ID" >/dev/null 2>&1
}

PROMPT_COMMAND="devbrain_capture"

Apply changes:

exec bash

Notes:

  • uses Bash history (history -a, history -n)
  • works best with shopt -s histappend
  • shell-log is internal, not for manual use

Disable auto capture:

export DEVBRAIN_DISABLE_SHELL_CAPTURE=1

Storage

All data is stored locally:

~/.devbrain/db.json

No cloud. No tracking. Private.

Philosophy

Capture small things consistently over capturing everything imperfectly.

What devbrain is

  • developer workflow memory
  • debugging aid
  • command and error history
  • local-first tool

What devbrain is not

  • note-taking app
  • AI assistant
  • full IDE plugin

Tech Stack

  • Rust
  • clap (CLI)
  • serde (storage)
  • chrono (time)

Roadmap

  • smarter filtering
  • improved shell integration
  • better ranking
  • plugin support (future)

License

MIT

Contributing

PRs welcome. Keep it simple and useful.

Dependencies

~2.1–3.5MB
~62K SLoC