Skip to content

Installation

  • Rust 1.80 or later (if building from source)
  • Git (for cloning repositories)

Install the latest release (Linux/macOS):

Terminal window
curl -fsSL https://docspring.github.io/cigen/install.sh | sh

This installs cigen into ~/.local/bin by default. Use --system for /usr/local/bin or --prefix <dir> for a custom directory. Uninstall with --uninstall.

Terminal window
# Clone the repository
git clone https://github.com/DocSpring/cigen.git
cd cigen
# Build and install
cargo install --path .
Terminal window
cigen --version

Generate shell completion scripts:

Terminal window
# Bash
cigen generate-completion bash > ~/.local/share/bash-completion/completions/cigen
# Zsh
cigen generate-completion zsh > ~/.zfunc/_cigen
# Fish
cigen generate-completion fish > ~/.config/fish/completions/cigen.fish

For development work:

Terminal window
git clone https://github.com/DocSpring/cigen.git
cd cigen
# Run directly with cargo
cargo run -- --help
# Or install in development mode
cargo install --path . --debug

To update to the latest version:

Terminal window
cd cigen
git pull
cargo install --path . --force

If you encounter build errors:

  1. Ensure you have Rust 1.80+ installed: rustc --version
  2. Update Rust: rustup update
  3. Clean and rebuild: cargo clean && cargo build

On Unix systems, ensure ~/.cargo/bin is in your PATH:

Terminal window
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc