Local project memory and correction learning for Python workflows
Project description
PyRecall
Local project memory and correction learning for Python workflows.
PyRecall keeps durable notes about your repository, turns corrections into reusable skills, and serves them back through a CLI or a stdio tool bridge that compatible coding tools can call.
No cloud account. No network calls for recall. Everything stays in .pyrecall/ inside your project.
Replay the same session locally:
# Unix
bash examples/demo.sh
# Windows PowerShell
./examples/demo.ps1
Why
Coding tools forget project preferences between sessions. You correct the same mistake twice. PyRecall records the correction once and surfaces it the next time the same topic comes up — especially for Python testing, typing, packaging, and style conventions.
Install
pip install pyrecall-cli
This installs the pyrecall command and the pyrecall Python package.
For local development:
pip install -e ".[dev]"
Requires Python 3.10+.
Quick start
cd your-python-project
pyrecall init
pyrecall index
pyrecall remember "API errors" "Raise domain exceptions from services; map to HTTP in the API layer only."
pyrecall learn --rejected "unittest.TestCase" --preferred "pytest assert + fixtures" --reason "Repo standard"
pyrecall recall "how should tests be written"
Free-form corrections
pyrecall learn --blob "os.path.join => Path / 'name'"
pyrecall learn --blob "avoid: bare except | prefer: except ValueError as exc"
Commands
| Command | Purpose |
|---|---|
pyrecall init |
Create .pyrecall/ and seed Python defaults |
pyrecall index |
Index docs and Python module signals |
pyrecall remember |
Store a decision / convention / note |
pyrecall learn |
Distill a correction into a skill |
pyrecall recall |
Search memories and skills |
pyrecall skills |
List learned skills |
pyrecall playbook |
Write SKILLS.md from active skills |
pyrecall stats |
Show store counts |
pyrecall export / import-data |
Backup and restore JSON |
pyrecall serve |
Run the stdio tool bridge |
Stdio tool bridge
Compatible coding tools that speak JSON-RPC over stdio can attach PyRecall as a local tool server.
Full guide: docs/BRIDGE.md
Quick connect
pip install pyrecall-cli
cd your-python-project
pyrecall init
pyrecall serve
Add this to your host tool config (restart the host afterward):
{
"pyrecall": {
"command": "pyrecall",
"args": ["serve"],
"cwd": "/absolute/path/to/your/python-project"
}
}
Windows / PATH-safe variant:
{
"pyrecall": {
"command": "python",
"args": ["-m", "pyrecall", "serve"],
"cwd": "C:/Users/you/projects/myapp"
}
}
Ready-made files: bridge.client.json · bridge.mcp.json · bridge.windows.json
Tools exposed
| Tool | Purpose |
|---|---|
get_context |
Paste-ready conventions + skills for a task |
search_memory |
Ranked search over memories and skills |
learn_correction |
Turn “don’t do X, do Y” into a durable skill |
add_memory |
Store a decision / convention / note |
list_skills |
List active skills |
project_stats |
Store counts |
How learning works
- You provide a rejected approach and a preferred approach.
- PyRecall stores the correction and distills a named skill.
- Later
recall/get_contextranks that skill into the result set with BM25 + overlap scoring. - Skill hit counts increase when they are retrieved, so useful rules rise over time.
All ranking is local. There are no model downloads and no external APIs.
Storage layout
.pyrecall/
config.json
store.db
index/
Add .pyrecall/store.db to .gitignore if you do not want binary state in git. Export JSON when you want a reviewable backup.
Python defaults
pyrecall init seeds practical skills such as:
- prefer pytest over unittest
- type-hint public APIs
- pathlib over
os.path - context managers for I/O
- no bare
except: - pyproject-first configuration
Development
pip install -e ".[dev]"
pytest
ruff check src tests
See CHANGELOG.md for release history.
License
MIT
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
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 pyrecall_cli-0.1.0.tar.gz.
File metadata
- Download URL: pyrecall_cli-0.1.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4efc24497f8964773d814173142425b22a7a9f0f03c518a531dbfc0b9845305a
|
|
| MD5 |
e4bdb2d3689fc66e607e04fdaf40049b
|
|
| BLAKE2b-256 |
b92e11fdd12b8a9828d794addf553ffb6cf9f33d34748ae26ecce8d15d84e2e0
|
Provenance
The following attestation bundles were made for pyrecall_cli-0.1.0.tar.gz:
Publisher:
publish.yml on mjpt1/pyrecall
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrecall_cli-0.1.0.tar.gz -
Subject digest:
4efc24497f8964773d814173142425b22a7a9f0f03c518a531dbfc0b9845305a - Sigstore transparency entry: 2138604055
- Sigstore integration time:
-
Permalink:
mjpt1/pyrecall@c536dd0ed887348b034034afece9c9267abf5e49 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/mjpt1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c536dd0ed887348b034034afece9c9267abf5e49 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pyrecall_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyrecall_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d40b097c5bf0b3a5fdebebc3838ea44a3e26d38eba11ae1f02df6afb1af3d064
|
|
| MD5 |
f3b10a30e010dd370a32743b36d854ff
|
|
| BLAKE2b-256 |
4a81ced7942cb8402366e665bbe4263e6330911c7b4cd6a9b775cc05f90a4941
|
Provenance
The following attestation bundles were made for pyrecall_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on mjpt1/pyrecall
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrecall_cli-0.1.0-py3-none-any.whl -
Subject digest:
d40b097c5bf0b3a5fdebebc3838ea44a3e26d38eba11ae1f02df6afb1af3d064 - Sigstore transparency entry: 2138604063
- Sigstore integration time:
-
Permalink:
mjpt1/pyrecall@c536dd0ed887348b034034afece9c9267abf5e49 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/mjpt1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c536dd0ed887348b034034afece9c9267abf5e49 -
Trigger Event:
workflow_dispatch
-
Statement type: