Context-Aware Scratchpad for Coders — a lightning-fast CLI to capture and search transient thoughts.
Project description
ThinkSpace
Context-Aware Scratchpad
- Why: Context switching to Notion/Obsidian/Todoist kills focus.
- What:
thinkspace note "todo: fix env var issue"— later:thinkspace search "env"
✨ Features
- 🏷️ Auto-tags every note with your project (Git repo or folder) and time buckets (YYYY, YYYY‑MM, YYYY‑MM‑DD).
- 🔎 Search by text, tags, project, or time window. Uses SQLite with FTS5 full-text indexes when available, otherwise runs compatible LIKE queries.
- 📦 Zero-config local store in your user data dir (e.g.
~/.local/share/thinkspace/notes.db). - 🎨 Rich CLI output: readable tables, panels, and helpful highlighting.
- 🗑️ Safe deletes with per-note confirmation or an interactive picker.
- 🧰 Portable single dependency stack (Typer + Rich + Platformdirs).
🚀 Quickstart
pip install thinkspace
# or from source
pip install .
Add a note:
thinkspace note "todo: fix env var issue"
Search later:
thinkspace search "env"
List recent notes:
thinkspace list --limit 10
Filter by project:
thinkspace search "todo" --project my-repo
Show top tags:
thinkspace tags
Export to Markdown:
thinkspace export --out notes.md
Delete a note:
thinkspace delete 42
Clean up interactively:
thinkspace delete --interactive --limit 50
🧩 Commands
note [TEXT]– Capture a note. Use--tagmultiple times to add manual tags.search [QUERY]– Full‑text search with optional filters:--project,--since,--until,--limit.list– Show most recent notes.tags– Show top tags (auto & manual).db-path– Print the notes DB path.export– Export all notes (optionally filtered) to Markdown.delete [ID ...]– Remove one or more notes (prompts for confirmation unless--yesis provided, or open with--interactiveto choose from a checklist).
🏗️ How it works
- On first run, Thinkspace creates a tiny SQLite DB at your user data directory.
- Notes are stored with fields:
id,text,project,tags,created_at,path. - If SQLite FTS5 (the built-in full-text search extension) is available, Thinkspace builds an FTS5 virtual table so queries tokenize text and return ranked matches instantly.
- On systems without FTS5 compiled in, Thinkspace falls back to standard SQL
LIKEclauses—simple substring matching that works everywhere, though with slower lookups on large notebooks.
🧪 Testing
pip install -r requirements-dev.txt # installs pytest & mypy
mypy src
pytest -q
🧹 Linting
pip install -r requirements-dev.txt # installs ruff
ruff check .
ruff format .
📦 Publishing to PyPI
- Update version in
pyproject.toml. - Build:
python -m build
- Upload:
python -m twine upload dist/*
⚡ uv workflow
Prefer using uv for speed and reproducibility.
# 1) Create and sync a local env (writes uv.lock)
uv sync
# 2) Run the CLI from the project env
uv run thinkspace note "hello from uv"
# 3) Format & lint
uv run ruff check --select I --fix
uv run ruff format
# 4) Type checking
uv run mypy src
# 5) Tests
uv run pytest -q
# 6) Build & publish
uv build --no-sources
uv publish # set UV_PUBLISH_TOKEN with a PyPI token
Dev dependencies live in [dependency-groups] and are synced by default.
📝 License
MIT © Thinkspace
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thinkspace-1.0.0.tar.gz.
File metadata
- Download URL: thinkspace-1.0.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a356e8dca35e370ca2f65e42e09ce15e779728fabfbe268a85f87c6a31f105c
|
|
| MD5 |
ec263775c11ebb7d514b49233bdbb743
|
|
| BLAKE2b-256 |
801c2cad3c19479cae749c0125c8d3407d3ca0c03a246f6ba978d0794c249317
|
File details
Details for the file thinkspace-1.0.0-py3-none-any.whl.
File metadata
- Download URL: thinkspace-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1e6076e46b1da91cfb1ab01f0be5c3066c62da0d2560fd8a08f8afa8129616
|
|
| MD5 |
73913699db7e07c89b521d6bf8b3f09b
|
|
| BLAKE2b-256 |
97ccb51b16213471d7129ede63b0be7f27095e56ca946c3183f8a54e9c95b585
|