inscript
Universal agent activity ledger.
When an AI agent works on code, inscript records everything: which project, which files, what changed. Any tool can read ~/.inscript/ for context.
Install
pip install inscript
What it records
~/.inscript/
active_project ← which codebase right now
active_session ← current session ID
config.toml ← retention policy
sessions/
<session-id>/
meta.json ← start time, project, status
touches.jsonl ← every file read/edit/write
diffs.jsonl ← raw changes (Edit old→new, Write content hash)
summary.json ← stats written on session end
overlap/
<project-hash>.jsonl ← when 2+ sessions touch the same files
Setup
inscript init # configure retention, storage, diffs
Then add hooks to ~/.claude/settings.json:
{
"hooks": {
"SessionStart": [
{
"hooks": [{ "type": "command", "command": "inscript-hook" }]
}
],
"PostToolUse": [
{
"matcher": "Read|Edit|Write|Glob|Grep",
"hooks": [{ "type": "command", "command": "inscript-hook", "async": true }]
}
],
"Stop": [
{
"hooks": [{ "type": "command", "command": "inscript-hook" }]
}
]
}
}
CLI
inscript # status: active project + session
inscript log # activity log for current session
inscript log <id> # activity log for a specific session
inscript overlap # show file collisions across sessions
inscript export <id> # export session as markdown
inscript cleanup # enforce retention policy
inscript init # setup wizard
Python API
from inscript_pkg import active_project, active_session, list_sessions
project = active_project() # Path or None
session = active_session() # session ID or None
all_sessions = list_sessions() # [{session_id, start_time, project, status}, ...]
How it works
Three Claude Code hooks write to ~/.inscript/:
- SessionStart → creates
sessions/<id>/meta.json - PostToolUse → appends to
touches.jsonlanddiffs.jsonl - Stop → writes
summary.jsonwith session stats
Any MCP server, script, or tool can read these files. No coordination needed. The agent doesn't know inscript exists.
Overlap detection
When two Claude Code sessions work on the same project simultaneously, inscript records which files both sessions touch. Run inscript overlap to see collisions.
Metadata
Release files for inscript 0.5.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 | Provenance | |
|---|---|---|---|---|
| inscript-0.5.0.tar.gz | 12.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inscript-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / inscript-0.5.0.tar.gz
| Download URL | inscript-0.5.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a91af2f7a131989a2d938cceeaa1379460d6b1e2cd584cf3d85451c2395157e
|
|
BLAKE2b-256 checksum How to use checksums |
b571783797c99454ca318a89036af8db05c1e8c02e4bb581638ff236517ce345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / inscript-0.5.0-py3-none-any.whl
| Download URL | inscript-0.5.0-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e0143ba815eb7b3b2c93005cbd0398078f4346c075be1ef0f136ca7f388c61c
|
|
BLAKE2b-256 checksum How to use checksums |
e8d98431d6c7143cfaeb614d328932aa684952ebbabe2d30b266decb9941d886
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for inscript 0.5.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.