Progressive Formalization for Markdown using Pydantic and Pytest
Project description

Typedown: Markdown that scales
English | 简体中文
Typedown evolves your team's documentation into a validated knowledge base. It brings the rigor of code to the fluidity of natural language.
"Docs that don't rot."
The Problem: Markdown Doesn't Scale
Markdown is the universal standard for technical documentation. But as your repository grows from 10 to 10,000 files, it becomes a "Write-Only" graveyard:
- Links Break: Moving a file requires
grepand prayer. - Data Drifts: "Status: Active" vs "status: active" vs "Status: ON".
- Context Decays: The implicit model in your head isn't enforced in the text.
The Solution: Typedown
Typedown transforms your documentation repository into a Database. It adds a semantic layer to Markdown, allowing it to "phase transition" from loose text to structured data.
1. Structure (Schema)
Define what your data should look like using Python (Pydantic).
<!-- Defined in a code block -->
```model:User
class User(BaseModel):
name: str
role: Literal["admin", "member"]
```
2. Space (Graph)
Use Solid References that never break. Typedown resolves links by Content Hash (L0), Handle (L1), or Global ID (L2).
This report is authored by [[users/alice]].
3. Logic (Validation)
Enforce invariants directly in your documentation. Ensure your architecture rules are respected.
```spec
def check_admin_policy(user: User):
if user.role == "admin":
assert user.has_mfa, "Admins need MFA"
```
Installation
Typedown is designed to be used primarily in your editor, backed by a powerful CLI.
1. Editor Integration (Recommended)
For the true "Write-and-Validate" experience, install the VS Code extension:
2. Global CLI (For CI/CD)
Verify your knowledge base in CI pipelines using uv (recommended) or pip:
# Instant run (no install needed)
uvx typedown check
# Install globally
uv tool install typedown
3. For Contributors
If you want to hack on the compiler itself:
git clone https://github.com/IndenScale/typedown.git
Core Philosophy
Typedown is built on the concept of Consensus as Code (CaC).
- Markdown (The Interface): Humans and LLMs speak natural language.
- Pydantic (The Structure): Machines need schemas.
- Pytest (The Law): Systems need invariants.
We call this "Literate Modeling"—you don't leave the document to define the system; the document is the system.
Documentation
- Quick Start: Build your first model.
- Manifesto: Why we built this.
- GEMINI.md: Instructions for AI Agents.
License
MIT © IndenScale
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 typedown-0.2.16.tar.gz.
File metadata
- Download URL: typedown-0.2.16.tar.gz
- Upload date:
- Size: 712.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33d7d587714e691f119e78b2d52277eb63f64a1055bc2735f295effe7837b27a
|
|
| MD5 |
a02ad05acacb5be0bb5644a26f7f24bb
|
|
| BLAKE2b-256 |
16c61fa38dc9d9851d5e1a4fbd8989e98181167a859426ad18be2429b9fbaf50
|
Provenance
The following attestation bundles were made for typedown-0.2.16.tar.gz:
Publisher:
publish-pypi.yml on IndenScale/Typedown
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typedown-0.2.16.tar.gz -
Subject digest:
33d7d587714e691f119e78b2d52277eb63f64a1055bc2735f295effe7837b27a - Sigstore transparency entry: 799136586
- Sigstore integration time:
-
Permalink:
IndenScale/Typedown@dec3c20ed66f4c6ed9667195419286f46e2cc98e -
Branch / Tag:
refs/tags/v0.2.16 - Owner: https://github.com/IndenScale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@dec3c20ed66f4c6ed9667195419286f46e2cc98e -
Trigger Event:
push
-
Statement type:
File details
Details for the file typedown-0.2.16-py3-none-any.whl.
File metadata
- Download URL: typedown-0.2.16-py3-none-any.whl
- Upload date:
- Size: 89.2 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 |
4f222321ab25e9f7b9b73081e17abda686c569c108f95ab52799bd457de7496e
|
|
| MD5 |
4257d817f13603c7c1fd2ae6f9ea23d4
|
|
| BLAKE2b-256 |
78df75c595848f9c893c03d1c935982b033e5f243b3ab7529ce9882d6321a307
|
Provenance
The following attestation bundles were made for typedown-0.2.16-py3-none-any.whl:
Publisher:
publish-pypi.yml on IndenScale/Typedown
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typedown-0.2.16-py3-none-any.whl -
Subject digest:
4f222321ab25e9f7b9b73081e17abda686c569c108f95ab52799bd457de7496e - Sigstore transparency entry: 799136589
- Sigstore integration time:
-
Permalink:
IndenScale/Typedown@dec3c20ed66f4c6ed9667195419286f46e2cc98e -
Branch / Tag:
refs/tags/v0.2.16 - Owner: https://github.com/IndenScale
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@dec3c20ed66f4c6ed9667195419286f46e2cc98e -
Trigger Event:
push
-
Statement type: