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


📝 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

📂 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 open <id>
  • 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.1.0.tar.gz (3.2 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.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brain_note-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 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.1.0.tar.gz
Algorithm Hash digest
SHA256 5e4dd5d06533711bb932ec3a3028643d18854ade6f13893e337ca2380262a2c4
MD5 1822678a45cc2411c20193eda0af77e5
BLAKE2b-256 ea92e6aa93f40054766cbf9697c8fa2ffe8e0d87e76f11060749766596af714b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brain_note-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24780afdd4373a5a3fe65c331fb1b5ddc40a79cf51177449eb7528d552a644c0
MD5 eebad8055441f0ea02c66413708bdaea
BLAKE2b-256 2a1efb3eddb5e84ac3dcb428f42858dad2ecc789f3f91759aaf7e7af97068ce6

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