thinkspace


Namethinkspace JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryContext-Aware Scratchpad for Coders — a lightning-fast CLI to capture and search transient thoughts.
upload_time2025-10-25 17:35:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords cli developer fts5 note-taking notes rich scratchpad search typer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<a href="https://github.com/sashsinha/thinkspace">
  <img alt="thinkspace logo" src="https://raw.githubusercontent.com/sashsinha/thinkspace/main/logo.png" width=256 height=256>
</a>
</p>

<h1 align="center">thinkspace</h1>

<h3 align="center">Context-Aware Scratchpad</h3>

<br/>

<p align="center">
<a href="https://raw.githubusercontent.com/sashsinha/thinkspace/main/LICENSE">
  <img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-green.svg">
</a>
<a href="https://pypi.org/project/thinkspace/">
  <img src="https://img.shields.io/badge/platform-windows%20%7C%20linux%20%7C%20macos-lightgrey" alt="Supported Platforms">
</a>
<a href="https://pypi.org/project/thinkspace/">
  <img alt="PyPI Supported Versions" src="https://img.shields.io/pypi/pyversions/thinkspace.svg">
</a>
<a href="https://pypi.org/project/thinkspace/">
  <img alt="PyPI" src="https://img.shields.io/pypi/v/thinkspace">
</a>
<a href="https://pypi.org/project/thinkspace/">
  <img alt="PyPI Status" src="https://img.shields.io/pypi/status/thinkspace">
</a>
<a href="https://pepy.tech/project/thinkspace">
  <img alt="Downloads" src="https://pepy.tech/badge/thinkspace">
</a>
</p>

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

```bash
pip install thinkspace
# or from source
pip install .
```

Add a note:

```bash
thinkspace note "todo: fix env var issue"
```

Search later:

```bash
thinkspace search "env"
```

List recent notes:

```bash
thinkspace list --limit 10
```

Filter by project:

```bash
thinkspace search "todo" --project my-repo
```

Show top tags:

```bash
thinkspace tags
```

Export to Markdown:

```bash
thinkspace export --out notes.md
```

Delete a note:

```bash
thinkspace delete 42
```

Clean up interactively:

```bash
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

```bash
pip install -r requirements-dev.txt  # installs pytest & mypy
mypy src
pytest -q
```

## 🧹 Linting

```bash
pip install -r requirements-dev.txt  # installs ruff
ruff check .
ruff format .
```

---

## 📦 Publishing to PyPI

1. Update version in `pyproject.toml`.
2. Build:
   ```bash
   python -m build
   ```
3. Upload:
   ```bash
   python -m twine upload dist/*
   ```

---

## ⚡ uv workflow

Prefer using [uv](https://docs.astral.sh/uv/) for speed and reproducibility.

```bash
# 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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "thinkspace",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Sash Sinha <sashsinha1@gmail.com>",
    "keywords": "cli, developer, fts5, note-taking, notes, rich, scratchpad, search, typer",
    "author": null,
    "author_email": "Sash Sinha <sashsinha1@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/61/5d/ebb8545fa7cf0046ddef30718e965b52caa4c2147728a3423da9b238ccee/thinkspace-1.0.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<a href=\"https://github.com/sashsinha/thinkspace\">\n  <img alt=\"thinkspace logo\" src=\"https://raw.githubusercontent.com/sashsinha/thinkspace/main/logo.png\" width=256 height=256>\n</a>\n</p>\n\n<h1 align=\"center\">thinkspace</h1>\n\n<h3 align=\"center\">Context-Aware Scratchpad</h3>\n\n<br/>\n\n<p align=\"center\">\n<a href=\"https://raw.githubusercontent.com/sashsinha/thinkspace/main/LICENSE\">\n  <img alt=\"License: MIT\" src=\"https://img.shields.io/badge/license-MIT-green.svg\">\n</a>\n<a href=\"https://pypi.org/project/thinkspace/\">\n  <img src=\"https://img.shields.io/badge/platform-windows%20%7C%20linux%20%7C%20macos-lightgrey\" alt=\"Supported Platforms\">\n</a>\n<a href=\"https://pypi.org/project/thinkspace/\">\n  <img alt=\"PyPI Supported Versions\" src=\"https://img.shields.io/pypi/pyversions/thinkspace.svg\">\n</a>\n<a href=\"https://pypi.org/project/thinkspace/\">\n  <img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/thinkspace\">\n</a>\n<a href=\"https://pypi.org/project/thinkspace/\">\n  <img alt=\"PyPI Status\" src=\"https://img.shields.io/pypi/status/thinkspace\">\n</a>\n<a href=\"https://pepy.tech/project/thinkspace\">\n  <img alt=\"Downloads\" src=\"https://pepy.tech/badge/thinkspace\">\n</a>\n</p>\n\n- **Why:** Context switching to Notion/Obsidian/Todoist kills focus.\n- **What:** `thinkspace note \"todo: fix env var issue\"` \u2014 later: `thinkspace search \"env\"`\n\n---\n\n## \u2728 Features\n\n- \ud83c\udff7\ufe0f **Auto-tags** every note with your **project** (Git repo or folder) and **time buckets** (YYYY, YYYY\u2011MM, YYYY\u2011MM\u2011DD).\n- \ud83d\udd0e **Search** by text, tags, project, or time window. Uses SQLite with FTS5 full-text indexes when available, otherwise runs compatible LIKE queries.\n- \ud83d\udce6 Zero-config local store in your user data dir (e.g. `~/.local/share/thinkspace/notes.db`).\n- \ud83c\udfa8 **Rich CLI output**: readable tables, panels, and helpful highlighting.\n- \ud83d\uddd1\ufe0f **Safe deletes** with per-note confirmation or an interactive picker.\n- \ud83e\uddf0 Portable single dependency stack (Typer + Rich + Platformdirs).\n\n---\n\n## \ud83d\ude80 Quickstart\n\n```bash\npip install thinkspace\n# or from source\npip install .\n```\n\nAdd a note:\n\n```bash\nthinkspace note \"todo: fix env var issue\"\n```\n\nSearch later:\n\n```bash\nthinkspace search \"env\"\n```\n\nList recent notes:\n\n```bash\nthinkspace list --limit 10\n```\n\nFilter by project:\n\n```bash\nthinkspace search \"todo\" --project my-repo\n```\n\nShow top tags:\n\n```bash\nthinkspace tags\n```\n\nExport to Markdown:\n\n```bash\nthinkspace export --out notes.md\n```\n\nDelete a note:\n\n```bash\nthinkspace delete 42\n```\n\nClean up interactively:\n\n```bash\nthinkspace delete --interactive --limit 50\n```\n\n---\n\n## \ud83e\udde9 Commands\n\n- `note [TEXT]` \u2013 Capture a note. Use `--tag` multiple times to add manual tags.\n- `search [QUERY]` \u2013 Full\u2011text search with optional filters: `--project`, `--since`, `--until`, `--limit`.\n- `list` \u2013 Show most recent notes.\n- `tags` \u2013 Show top tags (auto & manual).\n- `db-path` \u2013 Print the notes DB path.\n- `export` \u2013 Export all notes (optionally filtered) to Markdown.\n- `delete [ID ...]` \u2013 Remove one or more notes (prompts for confirmation unless `--yes` is provided, or open with `--interactive` to choose from a checklist).\n\n---\n\n## \ud83c\udfd7\ufe0f How it works\n\n- On first run, Thinkspace creates a tiny SQLite DB at your user data directory.\n- Notes are stored with fields: `id`, `text`, `project`, `tags`, `created_at`, `path`.\n- 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.\n- On systems without FTS5 compiled in, Thinkspace falls back to standard SQL `LIKE` clauses\u2014simple substring matching that works everywhere, though with slower lookups on large notebooks.\n\n---\n\n## \ud83e\uddea Testing\n\n```bash\npip install -r requirements-dev.txt  # installs pytest & mypy\nmypy src\npytest -q\n```\n\n## \ud83e\uddf9 Linting\n\n```bash\npip install -r requirements-dev.txt  # installs ruff\nruff check .\nruff format .\n```\n\n---\n\n## \ud83d\udce6 Publishing to PyPI\n\n1. Update version in `pyproject.toml`.\n2. Build:\n   ```bash\n   python -m build\n   ```\n3. Upload:\n   ```bash\n   python -m twine upload dist/*\n   ```\n\n---\n\n## \u26a1 uv workflow\n\nPrefer using [uv](https://docs.astral.sh/uv/) for speed and reproducibility.\n\n```bash\n# 1) Create and sync a local env (writes uv.lock)\nuv sync\n\n# 2) Run the CLI from the project env\nuv run thinkspace note \"hello from uv\"\n\n# 3) Format & lint\nuv run ruff check --select I --fix\nuv run ruff format\n\n# 4) Type checking\nuv run mypy src\n\n# 5) Tests\nuv run pytest -q\n\n# 6) Build & publish\nuv build --no-sources\nuv publish  # set UV_PUBLISH_TOKEN with a PyPI token\n```\n\nDev dependencies live in `[dependency-groups]` and are synced by default.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Context-Aware Scratchpad for Coders \u2014 a lightning-fast CLI to capture and search transient thoughts.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/sashsinha/thinkspace",
        "Issues": "https://github.com/sashsinha/thinkspace/issues",
        "Repository": "https://github.com/sashsinha/thinkspace"
    },
    "split_keywords": [
        "cli",
        " developer",
        " fts5",
        " note-taking",
        " notes",
        " rich",
        " scratchpad",
        " search",
        " typer"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "90f1d7ca4ec9c8ac437c4ad1fcf365a358a69aeed5bce347adbf4f77330121ee",
                "md5": "31bbd7837f19f26ba01e16784e02fd8b",
                "sha256": "a6cdb4007ca59b4768948259ee2e4fb5f3278bd1f63b4ab364b55deb88c3b09f"
            },
            "downloads": -1,
            "filename": "thinkspace-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "31bbd7837f19f26ba01e16784e02fd8b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 10638,
            "upload_time": "2025-10-25T17:35:27",
            "upload_time_iso_8601": "2025-10-25T17:35:27.114003Z",
            "url": "https://files.pythonhosted.org/packages/90/f1/d7ca4ec9c8ac437c4ad1fcf365a358a69aeed5bce347adbf4f77330121ee/thinkspace-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "615debb8545fa7cf0046ddef30718e965b52caa4c2147728a3423da9b238ccee",
                "md5": "19c6f6df0b1e0c8a1927c15f21f633d8",
                "sha256": "729762305be42826e5112efef763d234bbbc1778c4ba33668aa8cc5f2ac1f065"
            },
            "downloads": -1,
            "filename": "thinkspace-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "19c6f6df0b1e0c8a1927c15f21f633d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 10462,
            "upload_time": "2025-10-25T17:35:28",
            "upload_time_iso_8601": "2025-10-25T17:35:28.193620Z",
            "url": "https://files.pythonhosted.org/packages/61/5d/ebb8545fa7cf0046ddef30718e965b52caa4c2147728a3423da9b238ccee/thinkspace-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-25 17:35:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sashsinha",
    "github_project": "thinkspace",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "thinkspace"
}
        
Elapsed time: 0.55545s