Skip to main content

Brain: A command-line interface for managing your knowledge base.

Project description

🧠 brain

brain is a minimal, local-first CLI note system written in pure Python.

It allows you to create simple markdown notes directly from your terminal. No database. No dependencies. No configuration.

Just files.


✨ Features

  • 📝 Create notes instantly from the CLI
  • 🔢 Automatic incremental note IDs
  • 📂 Local markdown storage (~/.brain/notes)
  • 🌳 Command tree visualization
  • ⚡ Zero external dependencies
  • 🧩 Simple, extensible command architecture

🚀 Usage

brain <command> [subcommand] [arguments]

📚 Commands

Core Commands

Command Description


brain help Show help information brain tree Display the full command tree brain note add <content> Create a new note brain note open <id> Open note with id


📝 Creating Notes

Create a note by passing content after note add:

brain note add "Ship the CLI tool"

Or:

brain note add Remember to refactor dispatch logic

Each time you create a note:

  • Storage is ensured at ~/.brain/notes
  • A new numeric ID is generated
  • A markdown file is created automatically

Example file:

~/.brain/notes/3.md

File contents:

# Note 3

Ship the CLI tool

🌳 Command Tree

Inspect the command structure with:

brain tree

Example output:

brain
├── help
├── tree
└── note
    ├── add
    └── open

📂 Storage Location

All notes are stored locally at:

~/.brain/notes/

This directory is automatically created the first time you add a note.

There is:

  • No cloud storage
  • No external service
  • No database
  • No hidden state

Everything is just markdown files.


🏗 Architecture Overview

brain is intentionally simple:

  • Uses pathlib for filesystem management
  • Uses a nested COMMANDS dictionary for routing
  • Uses a recursive dispatch() function
  • Generates incremental numeric note IDs
  • Prints command trees dynamically

This makes it easy to extend with new commands.


🔮 Future Improvements

  • brain note list
  • brain note append <id> <content>
  • brain note delete <id>
  • brain note delete-alls
  • brain search <query>

Built with simplicity in mind.

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

brain_note-0.2.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

brain_note-0.2.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file brain_note-0.2.2.tar.gz.

File metadata

  • Download URL: brain_note-0.2.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for brain_note-0.2.2.tar.gz
Algorithm Hash digest
SHA256 69827e15fd47f5bd42cd8191bd134a1b0944f438d50355c9ec60c6a8cca8c054
MD5 56c996f3a63f2bb68e0ef231b4d6db28
BLAKE2b-256 3436b0569a1bdd6f7858af2c7974bf8717d094b0494191b23deb5435ff17b772

See more details on using hashes here.

File details

Details for the file brain_note-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: brain_note-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for brain_note-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc3dad8c8cca3cccb3827226f850966b134c4d76a0a16220f397775dfbee11aa
MD5 12d9a3dfa10ffe8264169e6e174e2451
BLAKE2b-256 bc937bae6022c36867130dfc334ad21bb625bc9a47c987fd36520c8866846cf2

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