CLI for markdownlm knowledge base
Project description
mdlm
mdlm is a governance-focused CLI tool for your markdownlm knowledge base. It bridges the gap between your codebase and your team's architectural standards by providing a powerful toolkit for syncing documentation, querying patterns, and validating code against established rules.
Built for consistency, mdlm allows you to enforce design patterns, surface documentation gaps, and ensure that your architectural decisions are consistently applied across your projects, all from the comfort of your terminal.
Install
cd cli
pip install -e .
Requires Python 3.8+ and requests.
Quick start
# 1. Save your API key (from markdownlm dashboard → Settings)
mdlm configure
# 2. Clone your knowledge base into ./knowledge/
mdlm clone
# 3. Edit any .md file in ./knowledge/
# 4. See what changed
mdlm status
# 5. Push changes back
mdlm push -m "update auth docs"
# 6. Query your patterns
mdlm query "How to handle errors?" -c error_handling
# 7. Validate code vs rules
mdlm validate app/api.py -t "Add user endpoint" -c security
Commands
| Command | Description |
|---|---|
mdlm configure |
Save API key to ~/.config/mdlm/config (mode 0600) |
mdlm clone [-c CAT] |
Download all docs → ./knowledge/ |
mdlm pull |
Refresh docs from server (overwrites local) |
mdlm status |
Show new / modified / deleted files |
mdlm push [-m MSG] [-c CAT] [--delete] |
Upload local changes |
mdlm query Q [-c CAT] |
Query rules/patterns (def: general) |
mdlm validate CODE -t TASK [-c CAT] |
Check code vs rules |
mdlm resolve-gap Q [-c CAT] |
Resolve documentation gaps |
Security
- Your API key is stored in
~/.config/mdlm/configwith permissions0600(owner read/write only). - Set
MDLM_API_KEYenv var to override without touching the config file. - Keys are never echoed to the terminal (
getpassis used duringconfigure). - HTTPS is enforced;
http://URLs are rejected at startup. - Conflict detection:
pushchecks the remote version before overwriting — runmdlm pullif there's a conflict. --deleteflag is required to delete remote docs; omitting it is the safe default.
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 mdlm-0.2.1.tar.gz.
File metadata
- Download URL: mdlm-0.2.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8a3195e287eee2c24c737f70c04850ce2d71370ed19fe4f99931fc2e4ce023e
|
|
| MD5 |
ec5feb72339193861406e3302b70f50e
|
|
| BLAKE2b-256 |
84179d2902dab19c0a6adb314ffcf78457961f4a9bb0521d8b2e64482bce0523
|
File details
Details for the file mdlm-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mdlm-0.2.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04a6976eac52405e2e106fe65f7d9bfc5caebf69bb098550277322dcbc8e3a49
|
|
| MD5 |
f3be6090e28f6dd30f20d893ef977844
|
|
| BLAKE2b-256 |
0ef48eb4e7afd21f4f3225df983bc67fd032fee74166f1c2c8b5238cf273af39
|