A Command Line Tool that helps you analyze, visualize, and navigate CLI applications with ease.
Note: This project has been developed for CLI apps that use the Cobra framework —initially. More to come soon.
CLINT is a complete rewrite and enhancement of cli-explorer-toolchain_legacy, built from the ground up in Rust for better performance and reliability (and because 🦀).
This is a WiP project. Several things work, but not everything is fully implemented yet.
Install CLINT with a single command using our installation script:
# Download and install the latest release
curl -sSL https://raw.githubusercontent.com/funnierinspanish/clint/main/install.sh | bashThe script will:
- Automatically detect your platform and architecture
- Download the latest release from GitHub
- Install CLINT to
~/.local/bin/ - Provide instructions to add it to your PATH
Do Not run random scripts from the internet without inspecting them first!
https://raw.githubusercontent.com/funnierinspanish/clint/refs/heads/main/install.sh
# Download the script, inspect it, then run
curl -sSL https://raw.githubusercontent.com/funnierinspanish/clint/main/install.sh -o install.sh
cat install.sh # Review the script
chmod +x install.sh
./install.sh# Install directly from the Git repository
cargo install --git https://github.com/unjs/clint.git
# Verify installation
clint --version# Clone the repository
git clone https://github.com/unjs/clint.git
cd clint
# Build the project
cargo build --release
# Add to PATH or use directly
./target/release/clint --versionNo setup required! CLINT works out of the box:
# Parse a CLI tool - creates data automatically
clint parse hugo
# Start web interface - downloads templates on first run
clint serveOn first use of the serve command, CLINT will:
- Detect if web templates are missing
- Offer to download them automatically from GitHub
- Fall back to embedded templates if download fails
- Provide manual template download instructions if needed
# Download web interface templates manually (optional)
clint get-template# Parse a CLI tool and extract its structure
clint parse git
# Serve an interactive web interface
clint serve
# Serve a specific JSON file on a custom port
clint serve --input my-cli-structure.json --port 9000
# Extract keywords from a parsed CLI
clint unique-keywords
# Generate a statistical summary
clint summary
# Replicate a CLI structure in Rust
clint replicate my-cli-structure.json --output ./replicaUsage: clint [COMMAND]
Commands:
parse Parse a CLI program and generate JSON structure
get-template Download web interface templates to ~/.config/clint
serve Start HTTP server for interactive CLI exploration
unique-keywords Extract unique keywords from parsed CLI data
summary Generate statistical summary of CLI structure
replicate Generate Rust code replica using clap library
help Print help information
Options:
-h, --help Print help
-V, --version Print version
The serve command offers flexible options for exploring CLI data with automatic template management:
# Interactive mode - choose from detected CLI apps
clint serve
# Serve specific file with default port (8899)
clint serve --input path/to/cli-structure.json
# Use custom port
clint serve --port 3000
# Use custom template
clint serve --template my-theme
# Combine options
clint serve --input app.json --port 8080 --template darkRecursively analyzes CLI tools by parsing their help output, extracting comprehensive information about:
- Commands and subcommands hierarchy
- All available flags (short and long forms)
- Usage patterns and descriptions
- Command depth and relationships
Generate detailed reports in multiple formats:
- JSON: Structured data for programmatic use
- Markdown: Human-readable documentation
- Plain Text: Simple text summaries
Export types:
- Complete Structure: Full CLI hierarchy with all details
- Keywords Summary: Unique commands, subcommands, and flags
- Statistical Summary: Counts and metrics about the CLI
Built-in HTTP server with a modern web interface featuring:
- Interactive Navigation: Browse CLI structure visually
- Search & Filter: Find commands and flags quickly
- Template System: Customizable themes and layouts
- Hot Reloading: Instant updates during development
Flexible serving modes:
- Interactive Selection: Choose from automatically detected CLI apps
- Direct File Serving: Serve specific JSON files directly
- Custom Port Selection: Use any available port (default: 8899)
- Template Customization: Switch between different themes
Generate working Rust code replicas using the clap library:
- Complete command structure recreation
- Placeholder implementations for rapid prototyping
- Developer Experience (DX) experimentation platform
The CLI structure JSON files generated by clint are validated against well-defined schemas:
- JSON Schema (
<cli_framework>.cli_structure.schema.json): Standard JSON Schema for general validation and documentation - Zod Schema (
<cli_framework>.cli_structure.zod.ts): TypeScript/JavaScript runtime validation with full type safety
Both schemas support enhanced metadata including:
depth: Command nesting level (0 for root, 1+ for subcommands)command_path: Full command path (e.g., "my_cli open socket all")- Optional
descriptionfield to handle CLI parsing edge cases
- Auto-download: On first run, CLINT will offer to download web templates from GitHub
- Fallback: If templates are missing or download fails, embedded templates are used automatically
- No interruption: The server always starts successfully regardless of template status
- Customization: Downloaded templates can be customized in
~/.config/clint/templates/
If automatic template download fails:
- Run
clint get-template - Download the files from GitHub to
~/.config/clint/templates/default/