samueltuoyo15/Dokugen

Turn your messy repositories into job-ready portfolio pieces. Generate crystal-clear READMEs recruiters actually read, and professional Conventional Commits that make your git history look senior.

Dokugen – AI‑powered README & changelog generator

What it does – Dokugen is a developer‑focused tool that scans a codebase, sends the relevant files to a large‑language model (Gemini by Google, reachable through the ApiSmart/OpenAI‑compatible API), and returns a polished README.md. It can also:

  • Update only the auto‑generated sections of an existing README while preserving any manual edits you added.
  • Produce conventional‑style Git commit messages from the diff of staged files.
  • Build a CHANGELOG.md that follows the Keep a Changelog format by analysing your commit history.
  • Keep a backup of previous README versions so you can revert instantly.

All of this is driven from a simple command‑line interface (CLI) that works in an interactive menu or via explicit sub‑commands.


Core components

Component Role
CLI clients (TypeScript, Python, Go) Local entry point that gathers project files, talks to the backend API, and writes the generated markdown back to the repo.
API server (Node.js + Express) Receives the code snapshot, forwards it to the Gemini model, merges the AI output with any existing README, and returns the result.
Supabase DB Stores user profiles and backup copies of generated READMEs.
Gemini (or any OpenAI‑compatible model via ApiSmart) The LLM that actually writes the documentation and commit messages.
Monorepo tooling (Turborepo, pnpm) Keeps the multiple packages (server, CLI clients, future web UI) in sync.

Highlighted features

  • Interactive menu – Run dokugen with no arguments to pick Generate, Update, Commit, Changelog, etc., from a friendly prompt.
  • Smart updates – When you re‑run dokugen update, only the sections that were originally generated are refreshed; your custom text, badges, and notes stay untouched.
  • AI‑assisted commits (dokugen aic) – The CLI extracts the git diff of staged files, sends it to the model, and returns a Conventional Commit message that you can confirm or edit before committing.
  • Compressed uploads – Code is packaged with 70‑90 % compression to stay under API payload limits, enabling analysis of larger projects.
  • Automatic changelog (dokugen changelog) – Scans the repository’s commit history and creates/updates a CHANGELOG.md that complies with the Keep a Changelog convention.
  • Language‑agnostic – Works with any stack (JavaScript/TS, Python, Rust, Go, Java, C++, etc.) because the CLI merely reads files and sends them to the model.

Getting started

  1. Clone & install
    git clone https://github.com/samueltuoyo15/Dokugen.git
    cd Dokugen
    pnpm install   # or npm/yarn
    
  2. Run the backend (requires a Supabase project and API keys)
    cd apps/server
    cp .env.example .env   # fill in your keys (OpenAI/ApiSmart, Supabase, etc.)
    pnpm run dev   # or pnpm run build && pnpm start
    
  3. Install a CLI – either the TypeScript version globally:
    cd apps/cli/clients/typescript
    pnpm run build
    pnpm install -g .
    
    or the Python version in a virtualenv:
    cd apps/cli/clients/python
    python -m venv .venv && source .venv/bin/activate
    pip install -e .
    
  4. Generate a README
    dokugen generate   # runs the AI against the current folder
    
    You can also supply a custom template URL with --template.

Typical workflow

$ dokugen               # opens interactive menu
> Generate README
   → scans files, calls Gemini, writes README.md
> AI Commit (aic)
   → reads staged diff, gets commit message, commits
> Changelog
   → builds/updates CHANGELOG.md from history

If you ever dislike the AI output, dokugen revert restores the previous backup instantly.


Tech stack at a glance

  • Monorepo – Turborepo
  • Backend – Node.js 18+, TypeScript, Express, Supabase
  • AI model – Gemini (or any OpenAI‑compatible endpoint via ApiSmart/OpenRouter)
  • CLI clients – TypeScript (Node), Python, Go
  • Packaging – pnpm workspaces; optional pre‑built binaries for Windows/macOS/Linux

License & community

  • License – MIT (permissive, commercial‑friendly).
  • Contributing – Guidelines in CONTRIBUTION.md; the project welcomes PRs, bug reports, and feature ideas.
  • Author – Samuel Tuoyo (LinkedIn, X).

Who might benefit?

  • Open‑source maintainers who want consistent, up‑to‑date documentation without manual writing.
  • Teams that need quick, conventional commit messages for clean Git history.
  • Anyone looking to automate changelog generation across any language stack.

Dokugen is essentially a thin wrapper around a large‑language model that turns the repetitive parts of project documentation into a one‑command operation, while still letting developers keep the custom bits they care about.

Related

  • Project
  • Project
  • Project
  • Project