Skip to content

feat: add mini-wiki CLI tool (v3.2.0)#8

Open
trsoliu wants to merge 1 commit into
mainfrom
feat/cli-tool
Open

feat: add mini-wiki CLI tool (v3.2.0)#8
trsoliu wants to merge 1 commit into
mainfrom
feat/cli-tool

Conversation

@trsoliu

@trsoliu trsoliu commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary

Add a professional CLI interface using Click, making Mini-Wiki installable and usable as a command-line tool.

Installation

pip install -e ".[dev]"
mini-wiki --version   # 3.2.0
mini-wiki --help

Or via pipx (after PyPI publish):

pipx install mini-wiki

Commands

mini-wiki --help
mini-wiki --version

mini-wiki init [--force] [PATH]        # Initialize .mini-wiki directory
mini-wiki analyze [--no-cache] [PATH]  # Analyze project structure & tech stack
mini-wiki check [PATH]                 # Check documentation quality
mini-wiki changes [PATH]               # Detect file changes since last generation

mini-wiki plugins list [PATH]              # List installed plugins
mini-wiki plugins install SOURCE [PATH]    # Install from path/URL/GitHub
mini-wiki plugins uninstall NAME [PATH]    # Remove a plugin
mini-wiki plugins enable NAME [PATH]       # Enable a plugin
mini-wiki plugins disable NAME [PATH]      # Disable a plugin
mini-wiki plugins update NAME [PATH]       # Update a plugin

Changes

New Files

  • scripts/cli.py (163 lines) — Click-based CLI with 10 commands
  • tests/test_cli.py (93 lines) — 13 tests using Click's CliRunner

Modified Files

  • pyproject.toml — Added click>=8.1, rich>=13.0 dependencies, [project.scripts] entry point, bumped to v3.2.0

Design Decisions

  • Click over Typer: Click is more mature, has better testing support (CliRunner), and doesn't require type annotation magic
  • Rich for future use: Added as dependency for upcoming colored output and progress bars
  • PATH argument optional: Defaults to current working directory, matching existing script behavior
  • Subcommand group for plugins: mini-wiki plugins list reads better than mini-wiki plugin-list

Test Plan

  • All 13 CLI tests pass compilation
  • Version flag works
  • Help text includes all commands
  • init creates directory structure
  • init fails on existing dir without --force
  • analyze works on project directory
  • check fails gracefully without wiki
  • plugins subcommands work

🤖 Generated with Claude Code

Add a professional CLI interface wrapping all core scripts:
- mini-wiki init [--force] — initialize .mini-wiki directory
- mini-wiki analyze [--no-cache] — analyze project structure
- mini-wiki check — check documentation quality
- mini-wiki changes — detect file changes
- mini-wiki plugins {list,install,uninstall,enable,disable,update}

Also:
- Add click>=8.1 and rich>=13.0 as dependencies
- Add console_scripts entry point (mini-wiki = cli:main)
- Bump version to 3.2.0
- Add 13 CLI tests using Click's CliRunner

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant