mdwiki-cli
CLI client for the Markdown Content Service — the Wiki layer of the Karpathy LLM Wiki pattern.
mdwiki is a thin REST wrapper for the Java/Spring Boot service that maintains
bidirectional wikilinks, versioned markdown documents, and Obsidian-compatible
exports.
Install
pip install mdwiki-cli
Or with uv:
uvx --from mdwiki-cli mdwiki --help
Requires Python 3.11 or newer.
Configure
Either env vars:
export MDWIKI_BASE_URL=http://localhost:8091/hft1
export MDWIKI_TOKEN=dev-admin-token
export MDWIKI_SPACE=wiki # optional default space
Or ~/.config/mdwiki/config.toml:
base_url = "http://localhost:8091/hft1"
token = "dev-admin-token"
space = "wiki"
timeout = 30
[profiles.prod]
base_url = "https://wiki.prod.example.com/hft1"
token = "prod-token"
Switch profile with MDWIKI_PROFILE=prod. Env vars override TOML.
Quick start
mdwiki ping
mdwiki space ls
mdwiki ls --space wiki
mdwiki cat 42 # markdown body to stdout
mdwiki context 42 --json # full context for an agent
cat note.md | mdwiki new --space wiki --title "New" -f -
mdwiki put-content 42 -f revised.md
mdwiki rebuild-links --space wiki
mdwiki export wiki -o /tmp/wiki.zip
Command groups
space— list / get / new- documents —
cat,show,context,ls,search,new,edit,put-content,versions,get-by-slug - links —
links,backlinks,rebuild-links - jobs —
job-status,job-logs export <space>— Obsidian ziprecent— local history ofcat/showskill path— bundled SKILL.md absolute path
Run mdwiki <cmd> --help for full options.
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | unexpected error |
| 2 | usage error |
| 3 | config / auth missing |
| 4 | API 4xx |
| 5 | API 5xx |
| 6 | optimistic lock conflict |
Use with Claude Code
After installing the CLI, expose the bundled skill to Claude:
ln -s "$(mdwiki skill path)" ~/.claude/skills/using-mdwiki.md
Claude will then auto-invoke the skill when the user mentions wiki / mdwiki / markdown knowledge base operations.
Develop
git clone <repo>
cd mdwiki-cli
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest
End-to-end tests against a real REST server:
MDWIKI_E2E_BASE_URL=http://localhost:8091/hft1 \
MDWIKI_E2E_TOKEN=dev-admin-token \
pytest -m e2e
Release
# Bump version in pyproject.toml
python -m build
twine upload dist/*
License
MIT.
Metadata
Release files for mdwiki-cli 0.1.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 | |
|---|---|---|---|---|
| mdwiki_cli-0.1.0.tar.gz | 21.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdwiki_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.1 kB
Release files / mdwiki_cli-0.1.0.tar.gz
| Download URL | mdwiki_cli-0.1.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0ac146dda5966d0a52c18359e993d1de71e8fafad6f0e4982ed74b0507f4546
|
|
BLAKE2b-256 checksum How to use checksums |
3ea15a21b5925484a298a77506357dfd3330a821790f97f9748dc921204686b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / mdwiki_cli-0.1.0-py3-none-any.whl
| Download URL | mdwiki_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f82d1ed8dd6537d7581ed1a99a6518ac57c402f9f95c1524c6db20780a57d5ef
|
|
BLAKE2b-256 checksum How to use checksums |
2983983ab09ea9f6c58c6482801b22e2e207bc4cc7df94a4d8e842b04e30698d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for mdwiki-cli 0.1.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.