Portable, AI-native data sheets.
Project description
folio-kit
Portable, AI-native data sheets. The Python distribution ships three console scripts and a Python SDK for reading and writing typed data sheets that humans and AI agents can both edit.
my-sheet/
├── contract.yaml # required — ODCS subset
├── records.jsonl # required — one JSON object per line
├── derivations/ # optional — derivation files (ai / python / sql / cross_sheet / import / http)
├── scripts/ # optional — reusable Python scripts
├── provenance.jsonl # append-only audit log
└── README.md # optional, with typed frontmatter
What you get
| Surface | Command | Purpose |
|---|---|---|
| CLI | folio |
validate, query, list, upsert, delete, materialize, status, provenance, serve, script, export |
| MCP server | folio-mcp |
FastMCP server exposing the SDK over stdio or HTTP — drop into Claude Desktop / Cursor / any MCP client |
| Viewer backend | folio-viewer |
Local-only FastAPI server that powers the Folio Viewer desktop app and web UI |
| Python SDK | from folio import open_sheet |
Programmatic access to the same operations as the CLI |
Install
pipx install folio-kit
# or
uv tool install folio-kit
The distribution name is folio-kit; the on-disk command is folio.
Quickstart
folio validate ./my-sheet
folio materialize ./my-sheet --actor agent:demo
folio query ./my-sheet "SELECT id, status FROM records LIMIT 5"
Programmatic:
from folio import open_sheet
sheet = open_sheet("./my-sheet", actor="agent:demo")
sheet.upsert({"id": "cust_001", "company_name": "Acme", "country": "Japan"})
result = sheet.materialize()
print(result) # {"materialized": 1, "skipped": 0, "failures": [], "total_cost": 0.0}
Derivations
A derivations/<field>.yaml declares how a derived column is filled.
Folio ships six kinds:
ai— call an LLM (Anthropic by default; injectable AIClient)python— run a reusable script fromscripts/sql— DuckDB query against the sheet's records viewcross_sheet— pull a value from a sibling Folio sheet (1:1 by PK)import— copy from a CSV / JSON filehttp— fetch from a URL
Every value comes with a provenance entry (actor, timestamp, input
hash, model + cost for ai). Re-runs are content-hashed and cached.
Requirements
- Python 3.13+
- Optional:
ANTHROPIC_API_KEYin the environment if you usekind: aiderivations against the default adapter. Bring-your-ownAIClientfor any other provider.
Links
- Source & full documentation: https://github.com/nyuta01/folio
- Specification: SPECIFICATION.md — the complete contract, formats, and semantics
- Examples: four working sheets under
examples/(customers, research-notes, research-memory, onboarding) - Agent skills: the
folio-agent-skillsnpm package ships ready-to-install SKILL.md files for Claude / Cursor / any skills.sh-compatible agent runtime. - Issues & roadmap: https://github.com/nyuta01/folio/issues
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 folio_kit-0.1.6.tar.gz.
File metadata
- Download URL: folio_kit-0.1.6.tar.gz
- Upload date:
- Size: 287.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f99fd7a18acc3fd8b00c7fe28e89f96bc2b5d498bf684887ea99ccea6e38508
|
|
| MD5 |
be7c57a866e4f73becbb3c70b0be9dc6
|
|
| BLAKE2b-256 |
b0704ef2bf627461b3d7debe7e6fac6ea1ce04b958229606a188000484a25128
|
Provenance
The following attestation bundles were made for folio_kit-0.1.6.tar.gz:
Publisher:
release-python.yml on nyuta01/folio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
folio_kit-0.1.6.tar.gz -
Subject digest:
7f99fd7a18acc3fd8b00c7fe28e89f96bc2b5d498bf684887ea99ccea6e38508 - Sigstore transparency entry: 1500659643
- Sigstore integration time:
-
Permalink:
nyuta01/folio@9bba3216056a0cd6633260874e8a112ea49e5da4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nyuta01
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@9bba3216056a0cd6633260874e8a112ea49e5da4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file folio_kit-0.1.6-py3-none-any.whl.
File metadata
- Download URL: folio_kit-0.1.6-py3-none-any.whl
- Upload date:
- Size: 58.4 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 |
e9f669f0adfb3161cf26e84a96db0fd3cc9a74efc067daeff1a0c68a0e72275e
|
|
| MD5 |
18fe779936aea5d1705695467898572b
|
|
| BLAKE2b-256 |
961a69158db016404613901c5f660e97e4f5587d7c444a258f86c9179ae7f5ac
|
Provenance
The following attestation bundles were made for folio_kit-0.1.6-py3-none-any.whl:
Publisher:
release-python.yml on nyuta01/folio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
folio_kit-0.1.6-py3-none-any.whl -
Subject digest:
e9f669f0adfb3161cf26e84a96db0fd3cc9a74efc067daeff1a0c68a0e72275e - Sigstore transparency entry: 1500659738
- Sigstore integration time:
-
Permalink:
nyuta01/folio@9bba3216056a0cd6633260874e8a112ea49e5da4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nyuta01
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@9bba3216056a0cd6633260874e8a112ea49e5da4 -
Trigger Event:
workflow_dispatch
-
Statement type: