Skip to main content

Context-Aware Scratchpad for Coders — a lightning-fast CLI to capture and search transient thoughts.

Project description

ThinkSpace Logo

ThinkSpace

Context-Aware Scratchpad


License: MIT Supported Platforms PyPI Supported Versions PyPI PyPI Status Downloads

  • 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 --tag multiple 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 --yes is provided, or open with --interactive to 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 LIKE clauses—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

  1. Update version in pyproject.toml.
  2. Build:
    python -m build
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thinkspace-1.0.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thinkspace-1.0.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file thinkspace-1.0.1.tar.gz.

File metadata

  • Download URL: thinkspace-1.0.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.2

File hashes

Hashes for thinkspace-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bbaff3f299ee4b209b1e8da3e6391313a5f695c420441a1f7b293c7af1f8c2e5
MD5 a77e2413fc2e75d5039ef8d087576bf2
BLAKE2b-256 4efbfbaf04ad1e72ed0bbf0b5cd5284d3bc6e323d43a7d7dd38f6a17a7b92148

See more details on using hashes here.

File details

Details for the file thinkspace-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: thinkspace-1.0.1-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

Hashes for thinkspace-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49f7e5bfeee656ce0e1a68e2af3acacf1a252fb0c5a573aecedc3b85b4ce1c9a
MD5 5c620e9f46b89ed15a2907f80afe30f5
BLAKE2b-256 f2236404e94fe2bece6ea43c34bde2c883fdda5d3828377f8b9b975ac0e17416

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