CLI for managing DraftMk previews and docs
Project description
draftmk
draftmk is a command-line tool that helps developers preview and manage DraftMk-based documentation environments locally using Docker and MkDocs.
It streamlines environment setup, port configuration, container orchestration, and browser preview, all with minimal configuration.
Installation
Install from PyPI:
pip install draftmk
Or add it to your Python project with Poetry:
poetry add draftmk
Commands
draftmk [command] [--options]
init
Initializes the environment:
- Creates required
.draftmkdirectories - Generates a
.envfile with non-conflicting ports - Downloads a default
docker-compose.ymlfrom GitHub Gist
draftmk init
up
Runs init if needed, then launches the preview stack and opens the browser.
draftmk up
preview
Starts the DraftMk Docker services and streams logs to the terminal.
draftmk preview --open
--open: Opens the frontend in the default browser
view
Opens the frontend in the default browser (reads the port from .env).
draftmk view
logs
Displays the last 50 lines from the .draftmk/logs/draftmk.log file.
draftmk logs
stop
Stops all running DraftMk Docker containers.
draftmk stop
status
Displays the status of all services managed by DraftMk.
draftmk status
Requirements
- Python 3.6 or higher
- Docker
- Docker Compose
Directory Structure
After initialization, the project structure will look like this:
.draftmk/
├── config/
├── site/
│ ├── public/
│ └── internal/
├── logs/
.env
docker-compose.yml
License
MIT © Jonmatum
echo "Pura Vida & Happy Coding!";
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 draftmk-0.3.0.tar.gz.
File metadata
- Download URL: draftmk-0.3.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7211d2f1aede46615afcba100ce282d93635ed75b893cf6d40ce3a0d5f38b67b
|
|
| MD5 |
e95158dc74b37eb2071b4dc15e091dd8
|
|
| BLAKE2b-256 |
b6652d4417b3b2d20841afbc6638614dbaaf581b956a2470b91d5fd0cd763aa2
|
File details
Details for the file draftmk-0.3.0-py3-none-any.whl.
File metadata
- Download URL: draftmk-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
437b8fb93ffea5c1c036682b17c3f1bce2e002515e37d81792b5c2eb8b8afc5d
|
|
| MD5 |
7a672a48e7bf549082003e37105feea9
|
|
| BLAKE2b-256 |
44fffeacddb0adf75e1643a2bf2ae96939354e0e7b69fa4184efdeff2cca7956
|