Library and CLI to fetch Limitless lifelogs and store locally
Project description
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:
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 limitless_tools-0.1.0.tar.gz.
File metadata
- Download URL: limitless_tools-0.1.0.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f27c555cf7e59a09d86722868702fbd77947713a2e843623549eb1c4f7d1a554
|
|
| MD5 |
59302249cdb59c59662231faa626c311
|
|
| BLAKE2b-256 |
f6feac885f2fafde43e35c0f5a87d68c99ef0ef157e7be01e8f8dc6009718497
|
Provenance
The following attestation bundles were made for limitless_tools-0.1.0.tar.gz:
Publisher:
publish.yml on ScottSucksAtProgramming/limitless_tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
limitless_tools-0.1.0.tar.gz -
Subject digest:
f27c555cf7e59a09d86722868702fbd77947713a2e843623549eb1c4f7d1a554 - Sigstore transparency entry: 701164130
- Sigstore integration time:
-
Permalink:
ScottSucksAtProgramming/limitless_tools@2ba7b1f5dbec61f8595a6ea335aecb59752512d5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ScottSucksAtProgramming
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ba7b1f5dbec61f8595a6ea335aecb59752512d5 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file limitless_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: limitless_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d69ce823614c9de44a85de7660f290c223a8e9ae3ea6ea6cce27bd3aa1d3301
|
|
| MD5 |
4299052e6a88c85fee68445384cd17e5
|
|
| BLAKE2b-256 |
be5eabaa9f38e545985fc2cd4acbeea7f346322a0c6101709663d93c960f40ec
|
Provenance
The following attestation bundles were made for limitless_tools-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ScottSucksAtProgramming/limitless_tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
limitless_tools-0.1.0-py3-none-any.whl -
Subject digest:
0d69ce823614c9de44a85de7660f290c223a8e9ae3ea6ea6cce27bd3aa1d3301 - Sigstore transparency entry: 701164143
- Sigstore integration time:
-
Permalink:
ScottSucksAtProgramming/limitless_tools@2ba7b1f5dbec61f8595a6ea335aecb59752512d5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ScottSucksAtProgramming
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ba7b1f5dbec61f8595a6ea335aecb59752512d5 -
Trigger Event:
workflow_dispatch
-
Statement type: