Skip to main content

A minimal, local-first CLI note system.

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 brain note list List all the notes


📝 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
    └── list

📂 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 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.4.2.tar.gz (4.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.4.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brain_note-0.4.2.tar.gz
  • Upload date:
  • Size: 4.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.4.2.tar.gz
Algorithm Hash digest
SHA256 3ff0e5da4b79182c01ca07beba0153ff3e1f1cabb00ed81ab6a32b29d9042a01
MD5 641031a00deac9b84fb2fb40df3b579f
BLAKE2b-256 c58787465898216d2f83a2f7e099f9405518ae101e1f88914873665a36f27182

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brain_note-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1ce403c73df0882b0eb4ea5996c0342c34d5017922f64a6d2c40512899e3614
MD5 b7973ee76fad3ce73d010cf70a866301
BLAKE2b-256 606f8807cfd7a8399e1ffe1b836126fcf5323b36d33034ebbcff6d50df2cf379

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