Documentation

CLI Tool

The PTKRDME CLI generates README files directly from your terminal. It auto-detects your project's dependencies, tech stack, and Git information to pre-fill section configurations. Can also sync config with package.json and bump versions.

Installation

Via npm (recommended)

npm install -g readme-manager

From source

git clone https://gitlab.com/plantek/ptkrdme/cli.git
cd cli
npm install
npm run build

The binary is registered as ptkrdme in package.json bin.

Quick Start

Navigate to your project root and run:

ptkrdme

If no .dev/rdme.config.json exists, the CLI starts an interactive wizard that:

  • Prompts for project name, description, and Git username
  • Scans the project for dependencies, config files, and Git metadata
  • Shows a multi-select of detected sections to enable
  • Runs init prompts for each enabled section (e.g. pick shields, choose brands)
  • Saves the configuration and auto-generates README.md

Commands

ptkrdme (no args)

Interactive menu mode (default). Shows the main menu with options to edit project info, edit sections, generate README, and save config.

ptkrdme --generate

Non-interactive generation. Syncs config files, renders all enabled sections via Mustache templates, assembles the output, and writes README.md to the project root. Runs the shields, brands, and other section renders in parallel.

ptkrdme --sync

Bidirectional config sync. Reads package.json (or pubspec.yaml) and merges name, description, version, contributors, keywords, license, and repository URL into .dev/rdme.config.json. Also syncs back to keep the config file canonical.

ptkrdme --release <major|minor|patch>

Bumps the version in .dev/rdme.config.json, creates a Git tag, and pushes. Respects semver: major, minor, or patch.

ptkrdme --test

Scans the project and dumps all detected dependencies and technologies to the console. Useful for debugging auto-detection.

ptkrdme --config <path>

Use a custom config file path instead of the default .dev/rdme.config.json.

Config File Format

{
"name": "my-project",
"version": "1.0.0",
"description": "My project description",
"gitPath": "https://gitlab.com/user/my-project",
"syncConfig": true,
"sections": ["Brands", "Shields", "License", "Contributors"],
"sectionconfig": {
"Brands": { "order": 2, "data": ["typescript","react","node"] },
"Shields": { "order": 0, "data": { "NPM Version": { "name":"npm", "pathParams":{...} } } },
"License": { "order": 3, "data": { "spdx_id": "MIT" } }
}
}

Stored at .dev/rdme.config.json relative to the project root. Thesections array controls which sections are enabled and their order. The sectionconfig object holds per-section data.

Auto-Detection

Both phases live in ptkrdmelib and are consumed by the CLI, VS Code extension, and (where applicable) the web app.

Loading diagram...

On each run, the CLI uses the AutoDetector from ptkrdmelib to scan the project directory for dependencies, file types, Git metadata, and environment variables. The detected data then feeds into section-specific autodetectors (BrandsSectionAutodetect,ShieldsSectionAutodetect, RelatedProjectsSectionAutodetect) that pre-populate section configurations.

Section Reference

The CLI shares all section types with the web app and VS Code extension. See the section types reference for details on each section's fields, autodetection behavior, and render output.