Skip to main content

A tool that automatically generates gitlab documentation from yaml files

Reason this release was yanked:

Bug

Project description

Gitlab Docs

📖 Overview

GitLab Docs is your portable, Python-powered sidekick for keeping GitLab CI/CD pipelines well-documented. If your system supports Python 3, you can install it instantly — no complex setup, no platform restrictions.

💡 Why it matters:

Code documentation is crucial.

Pipeline documentation is critical.

As pipelines grow, the what, when, and where of your workflows often get lost.

That’s where GitLab Docs comes in — a simple, elegant CLI tool that automatically generates and updates Markdown documentation for your pipelines, right alongside your code.

✨ Key Features

🛠 Portable — Works anywhere Python 3 runs.

📜 Markdown Output — Friendly for developers, perfect for GitLab README integration.

🔄 Auto-Update Mode — Insert or refresh documentation between customizable markers.

🧩 Multi-Block Support — Maintain different sections for different workflows.

🧪 Dry Run Mode — Preview changes without touching files.

Python

pip3 install --user gitlab-docs

Docker

docker run -v ${PWD}:/gitlab-docs charlieasmith93/gitlab-docs

or

podman run -it -v $(PWD):/gitlab-docs charlieasmith93/gitlab-docs

Using gitlab-docs

This will output the results in the current working directory to GITLAB-DOCS.md based on the .gitlab-ci.yml config. Noting it will also automatically try to detect and produce documentation for any include configurations as well.

gitlab-docs

ENVIRONMENT VARIABLES

Key Default Value Description
GLDOCS_CONFIG_FILE .gitlab-ci.yml The gitlab configuration file you want to generate documentation on
OUTPUT_FILE ./README.md The file to output documentation to.
LOG_LEVEL INFO Determines the verbosity of the logging when you run gitlab-docs. For detailed logging set to TRACE.
False Outputting documentation for the workflow config is experimental

Example of what's generated



GITLAB DOCS - .gitlab-ci.yml

Inputs

Key Value Description Options Expand
job-stage {'default': 'test'} true
environment {'default': 'production'} true

Variables

Key Value Description Options Expand
APPLICATION gitlab-docs true
OUTPUT_FILE GITLAB-DOCS.md true

.gitlab-ci.yml

SPEC


Property Value
inputs 'job-stage': 'default': 'test'
'environment': 'default': 'production'

.gitlab-ci.yml

MEGALINTER


Property Value
allow_failure True
image oxsecurity/megalinter-ci_light
stage test
Type Key Value
artifacts when always
artifacts paths ['megalinter-reports']
artifacts expire_in 1 week
variables DEFAULT_WORKSPACE $CI_PROJECT_DIR

BEHAVE-TESTS


Property Value
only ['merge_requests']
stage test
Type Key Value
variables POETRY_VIRTUALENVS_CREATE false

.BUILD:PYTHON


Property Value
environment release
id_tokens 'PYPI_ID_TOKEN': 'aud': 'pypi'
stage build
Type Key Value
artifacts when always
artifacts paths ['./dist/*.tar.gz']
artifacts expire_in 1 hour

BUILD


Property Value
extends ['.build:python']

DOCKER-BUILD


Property Value
image docker:latest
rules ['if': '$CI_COMMIT_REF_NAME != $CI_COMMIT_TAG']
services ['docker:dind']
stage build
tags ['gitlab-org-docker']
comment: <> (gitlab-docs-closing-auto-generated)

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

gitlab_docs-0.2.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

gitlab_docs-0.2.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_docs-0.2.1.tar.gz.

File metadata

  • Download URL: gitlab_docs-0.2.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for gitlab_docs-0.2.1.tar.gz
Algorithm Hash digest
SHA256 846342c8c5c379c67992f16c33893d60e8559d3283247833b67e5d54cd6be113
MD5 8b1adb2fba811de352346fbc7abffc83
BLAKE2b-256 1c821f703751107c7352e342a5310fa6ab66df574532867e58ed2ab486b1d079

See more details on using hashes here.

File details

Details for the file gitlab_docs-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: gitlab_docs-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for gitlab_docs-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2f41309541a03afe64aa822e9607edd052560e24030b08529e69a4faed19ab
MD5 a2ae75cd06d64b15824f7d22cde4b5d7
BLAKE2b-256 c962d178f7bd64cd3d2996e8643f834299c979b454c5876e14a87fde41dc27dc

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