cli-distribution

Package Rust CLI applications with shell completions, man pages, and cross-compilation.

8|2|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/geoffjay/claude-plugins --skill cli-distribution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-distribution
Source: https://github.com/geoffjay/claude-plugins/tree/main/plugins/rust-cli-developer/skills/cli-distribution
Command: npx skills add https://github.com/geoffjay/claude-plugins --skill cli-distribution

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Patterns for distributing Rust CLI applications to users, including shell completions, man pages, cross-compilation, and release automation.

Core Features & Use Cases

  • Shell Completion Generation: Using clap_complete; dynamic completions.
  • Man Page Generation: clap_mangen; build script patterns.
  • Cross-Compilation: Target triples and using cross to build for other platforms.
  • GitHub Actions for Cross-Compilation: CI workflow examples for release.

Quick Start

Use the cli-distribution skill to generate shell completions for Bash and Zsh, and prepare cross-compiled artifacts for release.

Frequently Asked Questions about cli-distribution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate shell completions for a Rust CLI application?

Shell completions for Rust CLIs are generated using clap_complete, which creates dynamic completions for Bash, Zsh, and other shells. Add clap_complete as a dependency, configure it in your build script, and completions are automatically generated during compilation for distribution to users.

Can I create man pages for my Rust CLI tool automatically?

Man pages are automatically generated using clap_mangen integrated into your build script. This tool extracts documentation from your clap command definitions and renders formatted man pages that users can install alongside your binary.

What's the best way to cross-compile a Rust CLI for multiple platforms?

Cross-compilation uses the cross tool to build Rust binaries for different target triples (Linux, macOS, Windows). Cross handles toolchain setup and dependencies, eliminating manual configuration; pair it with GitHub Actions workflows to automate release builds across all platforms.

How do I automate Rust CLI releases across Linux, macOS, and Windows?

GitHub Actions workflows orchestrate cross-platform releases by running cross-compilation for each target triple, generating shell completions and man pages, creating release artifacts, and publishing binaries. This enables one-command releases to multiple operating systems.

Can I reduce binary size for distributed Rust CLI applications?

Binary size is optimized through Rust build profiles (release mode with LTO and codegen-units tuning) and post-build tools like UPX compression. Smaller binaries reduce distribution overhead and download time for end users.

Do I need separate tools to generate completions, man pages, and cross-compile?

No. clap_complete, clap_mangen, and cross integrate into a single distribution workflow. All three work together in build scripts and CI pipelines, eliminating the need to chain separate tools or manual steps.