Skip to main content

CLI client for the Markdown Content Service (LLM Wiki layer)

Project description

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 zip
  • recent — local history of cat/show
  • skill 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.

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

mdwiki_cli-0.1.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mdwiki_cli-0.1.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file mdwiki_cli-0.1.0.tar.gz.

File metadata

  • Download URL: mdwiki_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for mdwiki_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0ac146dda5966d0a52c18359e993d1de71e8fafad6f0e4982ed74b0507f4546
MD5 9a958bdcca5f6417a3b82c74f3e9a79e
BLAKE2b-256 3ea15a21b5925484a298a77506357dfd3330a821790f97f9748dc921204686b2

See more details on using hashes here.

File details

Details for the file mdwiki_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mdwiki_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for mdwiki_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f82d1ed8dd6537d7581ed1a99a6518ac57c402f9f95c1524c6db20780a57d5ef
MD5 dfabb351aebb32da884abb9787a2de90
BLAKE2b-256 2983983ab09ea9f6c58c6482801b22e2e207bc4cc7df94a4d8e842b04e30698d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page