Skip to main content

Command-line tool for managing DraftMk documentation environments using Docker and MkDocs.

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 .draftmk directories
  • Generates a .env file with non-conflicting ports
  • Downloads a default docker-compose.yml from 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

draftmk-0.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

draftmk-0.4.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file draftmk-0.4.0.tar.gz.

File metadata

  • Download URL: draftmk-0.4.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

Hashes for draftmk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 613048c8d5c792cac01337c1bb520445120f28a895e0391d1eef06f022b76845
MD5 8f5d5c91ce516197cd50cc9fa753de90
BLAKE2b-256 4018d6bdfcdd8dbf99ac6a7e7d2d1275cd04f8f646ca49a4b8964e6c2c9d7f37

See more details on using hashes here.

File details

Details for the file draftmk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: draftmk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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

Hashes for draftmk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7a78ef3a3e3a14836bc084710e7f6351a863c1e4c550e79aea284c4f40e1a3
MD5 829d3d5f2b160658021387580e17eaf7
BLAKE2b-256 0b8b1c7388fbbf45dbb02cafba70a0ddb144249f8b697eb9c9dd780767003909

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