limitless_tools
A Python 3.11+ library and CLI to fetch and store Limitless lifelogs locally as JSON. Built with TDD and clean, extensible architecture.
Tested on macOS (14.x) and Ubuntu 22.04; Windows support is planned.
- PRD: docs/PRD.md
- Default data dir:
~/limitless_tools/data/lifelogs(configurable)
Quick start
- Create a virtual environment and install dev dependencies:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
pip install -r requirements-dev.txt
Prefer pip install -e ".[dev]" if you want an editable install with all contributor tooling in one step.
- Configure environment (copy
.env.exampleto.envand fill in values or export env vars):
export LIMITLESS_API_KEY=your_api_key
# export LIMITLESS_API_URL=https://api.limitless.ai
# export LIMITLESS_DATA_DIR=~/limitless_tools/data/lifelogs
- Run tests:
python3 -m pytest -q
- Fetch lifelogs (saves JSON files under the data dir):
python3 -m limitless_tools.cli.main fetch \
--limit 10 \
--direction desc \
--include-markdown \
--include-headings
Installation (macOS/Linux)
Install from PyPI (after 0.1.0 ships) with:
pip install limitless-tools
# or install it into an isolated environment:
pipx install limitless-tools
For contributor tooling plus an editable install:
pip install -e ".[dev]"
For local development you can keep an editable install around and run the console script directly:
pip install -e .
limitless --help
Windows support is planned, but the release artifacts are currently smoke-tested on macOS (Sonoma) and Ubuntu LTS only.
Configuration
- Example config file:
config.toml.examplein this repo.- Default user path:
~/limitless_tools/config/config.toml - Copy and edit:
mkdir -p ~/limitless_tools/config && cp config.toml.example ~/limitless_tools/config/config.toml - Or pass a custom file with
--config /path/to/config.toml.
- Default user path:
- You can also write/update the config via CLI:
python -m limitless_tools.cli.main configure \
--api-key YOUR_API_KEY \
--data-dir ~/limitless_tools/data/lifelogs \
--output-dir ~/limitless_tools/exports \
--timezone UTC \
--batch-size 50
Notes: You can define multiple profiles (e.g., [default], [work]) and select with --profile work. Precedence: CLI flags > environment variables > config file > built‑in defaults.
Supported platforms
- Verified locally on macOS Sonoma (arm64) and Ubuntu 22.04 (x86_64) via CI + smoke tests.
- Wheel/venv smoke tests run as part of the release checklist (
scripts/release_check.sh). - Windows support is on the roadmap; we’re tracking path/timezone quirks before advertising it as fully supported.
Notes
- Uses pagination with sensible defaults. See docs/PRD.md for detailed requirements and roadmap.
- TDD-first: tests are single-assert and documented for clarity.
CLI at a glance
limitless fetch --limit 10 --direction desc— fetch the latest entries with markdown/headings by default.limitless sync --date 2025-11-01 --timezone UTC— incremental sync that updatesindex.jsonand sync state.limitless list --date 2025-11-01 --json— list indexed lifelogs filtered by date and starred status.limitless search --query "meeting notes" --regex— search titles and markdown with regex or fuzzy matching.limitless export-markdown --limit 5/--date YYYY-MM-DD --combine— print or write markdown exports.limitless export-csv --date 2025-11-01 --output /tmp/lifelogs.csv— dump metadata (add--include-markdownto include body content).
Error handling & exit codes
- Network failures (including timeouts) are retried when safe and surface as concise
ApiErrormessages (HTTP 429with Retry-After hints, orRequest timed out …). - Local persistence issues (e.g., unwritable data dir) become
StorageError/StateErrorwith the offending path in the context. - The CLI wraps those exceptions in friendly stderr output so you see a single
Error: …line instead of a Python traceback; pass-v/--verboseto capture the stack trace in logs if needed. - Exit codes:
0success,1operational/service errors,2validation/config problems (e.g., invalid timezone, missing--datewhen using--combine),130forCtrl+Caborts. - Errors also drive JSON logging via
--verbose, so CI logs include structured context without leaking secrets.
Documentation
- Usage guide: docs/USAGE.md
- PRD & roadmap: docs/PRD.md
- Audio research: docs/AUDIO.md
- Task tracker: docs/TASKS.md
Links
- Changelog: CHANGELOG.md
- Contributing & workflow: CONTRIBUTING.md
- Security policy: SECURITY.md
Code quality
- Ruff: a fast Python linter that aggregates many checks (pycodestyle/pyflakes/isort/pyupgrade) in one tool. It keeps the codebase consistent and catches common issues early.
- mypy: static type checker for Python. It enforces type hints to reduce runtime errors and improve maintainability.
Run locally:
ruff check .
mypy limitless_tools
Release checks
Use scripts/release_check.sh before tagging a release. It runs ruff, mypy, pytest, builds sdist/wheel, validates with twine check, and performs a fresh virtualenv smoke test of the wheel on macOS/Linux. Override the Python interpreter via PYTHON_BIN=/path/to/python scripts/release_check.sh if needed.
Security & Privacy
- No unexpected egress: the HTTP client enforces a base URL allowlist (default:
api.limitless.ai,localhost,127.0.0.1).- Extend with
LIMITLESS_URL_ALLOWLIST="host1,host2"or bypass withLIMITLESS_ALLOW_UNSAFE_URLS=1if you explicitly need it.
- Extend with
- Log redaction: secret‑like fields (e.g.,
api_key,X-API-Key,authorization,token,password,secret) are redacted as[REDACTED]in structured logs. - Secret scanning: a
detect-secretspre‑commit hook and baseline are included.- Install hooks:
pre-commit install - Run locally:
pre-commit run --all-files
- Install hooks:
Release files for limitless-tools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| limitless_tools-0.1.0.tar.gz | 26.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| limitless_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:55.6 kB
Release files / limitless_tools-0.1.0.tar.gz
| Download URL | limitless_tools-0.1.0.tar.gz |
|---|---|
| Size | 26.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f27c555cf7e59a09d86722868702fbd77947713a2e843623549eb1c4f7d1a554
|
|
BLAKE2b-256 checksum How to use checksums |
f6feac885f2fafde43e35c0f5a87d68c99ef0ef157e7be01e8f8dc6009718497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2025.
Transparency logRelease files / limitless_tools-0.1.0-py3-none-any.whl
| Download URL | limitless_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d69ce823614c9de44a85de7660f290c223a8e9ae3ea6ea6cce27bd3aa1d3301
|
|
BLAKE2b-256 checksum How to use checksums |
be5eabaa9f38e545985fc2cd4acbeea7f346322a0c6101709663d93c960f40ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2025.
Transparency log