Skip to main content

BH (Black Hole)

BH is the primary CLI for this repo: a capture-first, markdown-first notes + todos system.

Core ideas:

  • Streams: hierarchical categories like inbox, work/bh, clients/acme.
  • Items: notes and todos are stored as folders with content.md, metadata.json, and attachments/.
  • Multimodal ingest: text, files, directories; voice notes can be transcribed.
  • Access: browse/search by stream, generate briefs/digests, and build completionist index docs.
  • Provenance + cost tracking: attachments are hashed and referenced; external calls are logged.

Install / Run (uv)

uv sync
uv run bh status

If you prefer the venv:

source .venv/bin/activate
bh status

Configuration

BH reads config from <base-path>/.notes_config.json (default <base-path> is ~/.notes).

Example:

{
  "embedding_provider": {"type": "openai", "model": "text-embedding-3-small"},
  "tagger": {"type": "openai", "model": "gpt-4o-mini"},
  "transcriber": {"type": "whisper", "model": "whisper-1"},
  "llm": {"model": "gpt-5-mini"}
}

Environment:

  • OPENAI_API_KEY (required for OpenAI embeddings/tagging/transcription)
  • OPENAI_API_BASE (optional; defaults to https://api.openai.com/v1)

CLI Cheatsheet

All commands support --base-path (defaults to ~/.notes).

Capture:

uv run bh add "stray idea about energy markets" --stream inbox
uv run bh new --stream work/bh                 # open $EDITOR to write markdown

uv run bh add path/to/voice.m4a --stream work/bh
uv run bh add path/to/voice.m4a --no-transcribe

uv run bh add path/to/folder --stream inbox    # ingests one item per file
uv run bh create-bh path/to/folder --follow --interval 30 --stream inbox

Access:

uv run bh search "fusion breakthroughs" --mode semantic --stream work
uv run bh browse --sort modified --stream work/bh
uv run bh show <item-id>
uv run bh open <item-id>
uv run bh link <item-id>

Todos:

uv run bh todo add "Ship v1" --due 2026-01-14 --stream work/bh
uv run bh todo list --status open --stream work
uv run bh todo done <todo-id>
uv run bh todo archive <todo-id>

Proactive (writes notes under the hood):

uv run bh proactive todo --scope all --stream work/bh
uv run bh proactive brief --scope new --stream work/bh
uv run bh digest --scope new --stream work/bh

Completionist docs:

uv run bh completion stream work/bh

Costs:

uv run bh cost daily --days 7
uv run bh cost events --day 2026-01-14 --limit 50

Storage layout

Default base path is ~/.notes (override via --base-path):

<base-path>/
  .notes_config.json
  notes/
    <item-id>/
      content.md
      metadata.json
      attachments/
  .notes_db/
    search.db       # SQLite FTS5
    embeddings.npy  # semantic index
    graph.json      # auto-link graph
    bh_state.json   # watched folders + last runs
    bh.db           # provenance + cost ledger (SQLite)
    tmp/            # editor scratch files

More details: docs/black-hole.md.

Development

uv run pytest -q

Notes:

  • bh is the supported UX. znote still exists but is considered legacy.
  • Some cost entries may be unknown if usage metadata isn’t available; pricing lookup lives in src/notes/costs.py.

Metadata

Release files for znotes 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for znotes 0.8.1
File Size Uploaded
znotes-0.8.1.tar.gz 38.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for znotes 0.8.1
File Interpreter ABI Platform
znotes-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 79.5 kB

Release files / znotes-0.8.1.tar.gz

Download URL znotes-0.8.1.tar.gz
Size 38.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c61ead4fbfeb7ce67dee54eac2e5ad754e432a25ac1c2c563a41587cea30ac70
BLAKE2b-256 checksum
How to use checksums
489dc6c31144095504501616cb41c85bb5a044530e05e31714c59f459d87dae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / znotes-0.8.1-py3-none-any.whl

Download URL znotes-0.8.1-py3-none-any.whl
Size 40.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1325eb5860cd16eb06cfea9c8e6ea28136c10905a7132f2a33bdef1636440b8d
BLAKE2b-256 checksum
How to use checksums
81984b6082b88bccbb9e15b8799ccab0d7b5acdaa4c63db612a490d95d6a6275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page