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 brain search <query> Search across notes for content


📝 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
├── search    
└── 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

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.3.2.tar.gz (4.0 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.3.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brain_note-0.3.2.tar.gz
  • Upload date:
  • Size: 4.0 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.3.2.tar.gz
Algorithm Hash digest
SHA256 258da7ea86e1f62811ab154958de76ed55138f7f88f96f622d250519a4c392d8
MD5 7a0f0a2554803913ae5a680288eec437
BLAKE2b-256 10b0caf99c5d9eec248209d2b7fe32d921ef6a51ea7056c5e40dc5ff8fffec17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brain_note-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 55393ea94ac16d1d3fea16dc0c332c67cdbfb935958f2793d08592acf1c57d1e
MD5 ff3c4cd521793dada85cc3c3b91823cc
BLAKE2b-256 dd95bbf9f47a8c30eedd27a143d99a8045f7d28abc2c845813ed801c2bb689d0

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