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 brain note delete <id> Delete notes for given ids brain note delete-all Delete all 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
    ├── delete
    └── delete-all

📂 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>

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.6.2.tar.gz (4.5 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.6.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brain_note-0.6.2.tar.gz
  • Upload date:
  • Size: 4.5 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.6.2.tar.gz
Algorithm Hash digest
SHA256 7a41c4094bf57c1cb69ad6a7ebbab4f1249c5e3f7bf64692088a23abb5eb76aa
MD5 f44610349d7da26eabee864609831c2d
BLAKE2b-256 a5294a30f4d74168893b693b30e181efba76c5a50e2aa3e380a150c15c5a59be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brain_note-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4745254e555d0757bffdfae359b8ebcffcd0affead7ef7c3d8bd467ec4aa14d5
MD5 115d10df985ac37073a1cfda5ea9f80e
BLAKE2b-256 9c5b9e22489f470a8e820d56474bce60c123bda7ff350b7f11aa304f3d40ce8c

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