Modern command-line utilities installation including bat, eza, fd, helix, and GitHub releases.
The CLI Tools role installs a comprehensive collection of modern command-line utilities that enhance productivity and provide better alternatives to traditional Unix tools. It handles installations via cargo (Rust packages), system packages, and GitHub releases.
- Ubuntu 20.04 LTS or later
- Ansible 2.12 or later
- Common role (automatically included as dependency)
- Rust role (automatically included as dependency for cargo installations)
- Internet connectivity for package downloads
The following variables can be set in defaults/main.yml:
# Cargo packages to install
cargo_packages:
- bat # Cat with syntax highlighting
- eza # Modern ls replacement
- fd-find # Modern find replacement
- ripgrep # Fast grep replacement
- starship # Cross-shell prompt
- zoxide # Smart cd replacement
- bottom # System monitor
- dust # Disk usage analyzer
# System packages to install
system_packages:
- helix # Modern text editor
- fzf # Fuzzy finder
# GitHub release downloads
github_releases:
- name: lazydocker
repo: jesseduffield/lazydocker
version: "{{ lazydocker_version }}"
asset_pattern: "Linux_x86_64.tar.gz"
binary_name: lazydocker
install_path: "/usr/local/bin"
# User configuration
target_user: "{{ ansible_user }}"cargo_packages: List of Rust packages to install via cargosystem_packages: List of packages to install via system package managergithub_releases: Configuration for tools installed from GitHub releasestarget_user: User for which tools are being configured
common: Base system setup and essential packagesrust: Rust toolchain for cargo package installations
---
- hosts: servers
become: yes
roles:
- common
- rust
- cli_tools- bat: A cat clone with syntax highlighting and Git integration
- eza: A modern replacement for ls with colors and Git integration
- fd-find: A simple, fast alternative to find
- ripgrep: A line-oriented search tool that recursively searches directories
- starship: A minimal, fast, and customizable prompt for any shell
- zoxide: A smarter cd command that learns your habits
- bottom: A graphical process/system monitor
- dust: A more intuitive version of du written in Rust
- helix: A post-modern modal text editor
- fzf: A general-purpose command-line fuzzy finder
- lazydocker: A simple terminal UI for Docker and Docker Compose
- Multiple Installation Methods: Supports cargo, apt, and GitHub releases
- Version Management: Centralized version control via group variables
- Security: Checksum validation for downloaded binaries
- User Integration: Configures tools for specified user
- Shell Integration: Prepares tools for Fish shell integration
Enhanced cat with syntax highlighting, Git integration, and automatic paging.
bat file.py # Syntax highlighted outputModern ls replacement with colors, icons, and Git status integration.
eza -la # Long format with all files
eza --tree # Tree viewFast and user-friendly alternative to find.
fd pattern # Find files matching pattern
fd -e py # Find Python filesFast grep alternative optimized for searching code.
rg "pattern" # Search for pattern in current directory
rg -t py # Search only Python filesCross-shell prompt with intelligent context awareness.
# Automatically shows Git status, language versions, etc.Smart cd that learns from your usage patterns.
z project # Jump to frequently used project directoryModal text editor inspired by Kakoune with built-in LSP support.
hx file.py # Edit Python file with LSP integrationFuzzy finder for files, command history, and more.
fzf # Interactive file finder
history | fzf # Search command historyTools are configured through the configs role, which deploys:
- Starship prompt configuration
- Helix editor settings
- Shell integrations for Fish
You can customize the installation by overriding variables:
# Add additional cargo packages
cargo_packages:
- bat
- eza
- tokei # Code statistics tool
- hyperfine # Benchmarking tool
# Modify GitHub releases
github_releases:
- name: your-tool
repo: owner/repo
version: "v1.0.0"
asset_pattern: "linux-x86_64.tar.gz"MIT
Development Team - Internal Use