| Crates.io | gist-cache-rs |
| lib.rs | gist-cache-rs |
| version | 0.8.7 |
| created_at | 2025-12-04 14:38:16.034788+00 |
| updated_at | 2025-12-18 11:16:44.651504+00 |
| description | Interactive CLI tool for caching, searching, and executing GitHub Gists, built with Rust. |
| homepage | |
| repository | https://github.com/7rikazhexde/gist-cache-rs |
| max_upload_size | |
| id | 1966542 |
| size | 691,965 |
A high-performance CLI tool written in Rust for efficiently caching, searching, and executing GitHub Gists.
Supported Platforms: Linux, macOS, Windows 10 or later
gh) - Authenticated with gh auth loginUsing Setup Script (Recommended):
# Linux / macOS
git clone https://github.com/7rikazhexde/gist-cache-rs.git
cd gist-cache-rs
./script/setup.sh install
# Windows
git clone https://github.com/7rikazhexde/gist-cache-rs.git
cd gist-cache-rs
.\script\setup.ps1 install
The setup script performs interactive prerequisite checks, builds, installs, and creates the initial cache.
Using Cargo:
cargo install gist-cache-rs
For more installation options, see the Installation Guide.
# Create initial cache (with progress display)
gist-cache-rs update
# Update cache with verbose output
gist-cache-rs update --verbose
# Search and execute a Gist
gist-cache-rs run backup bash
# Execute Python script with arguments
gist-cache-rs run data_analysis.py python3 input.csv
# Preview without execution
gist-cache-rs run --preview backup
# Interactive mode
gist-cache-rs run --interactive setup-wizard
# Download Gist to ~/Downloads
gist-cache-rs run --download backup bash
# Update cache and execute latest version
gist-cache-rs run --force backup bash
gist-cache-rs supports shell completions for Bash, Zsh, Fish, and PowerShell.
# Generate completion script for your shell
gist-cache-rs completions <SHELL>
# Example for Bash
gist-cache-rs completions bash > ~/.local/share/bash-completion/completions/gist-cache-rs
For detailed installation instructions, backup procedures, and shell-specific setup, see the Shell Completions Guide.
To update gist-cache-rs to the latest version, use cargo install:
cargo install gist-cache-rs
For local development builds, use:
cargo install --path .
📖 Full Documentation: https://7rikazhexde.github.io/gist-cache-rs/
# List cached Gists (human-readable format)
gist-cache-rs cache list
# List cached Gists in JSON format (for scripting)
gist-cache-rs cache list --format json
# Filter with jq (requires jq installed)
gist-cache-rs cache list --format json | jq '.[] | select(.description | contains("backup"))'
# Check cache size
gist-cache-rs cache size
# Clean old cache entries
gist-cache-rs cache clean --older-than 30 # Remove entries older than 30 days
gist-cache-rs cache clean --orphaned # Remove orphaned cache files
gist-cache-rs cache clean --dry-run --orphaned # Preview what would be deleted
# Clear all caches
gist-cache-rs cache clear
Customize default behavior with the config command:
# Interactive configuration (Recommended)
gist-cache-rs config setting
# Set default interpreter (simple)
gist-cache-rs config set defaults.interpreter python3
# Set per-extension interpreters (v0.8.6+)
gist-cache-rs config set defaults.interpreter.py python3
gist-cache-rs config set defaults.interpreter.rb ruby
gist-cache-rs config set defaults.interpreter.ts deno
gist-cache-rs config set defaults.interpreter."*" bash # Wildcard fallback
# Enable execution confirmation (for safety)
gist-cache-rs config set execution.confirm_before_run true
# Set cache retention period
gist-cache-rs config set cache.retention_days 30
# View current configuration
gist-cache-rs config show
# Get specific value
gist-cache-rs config get defaults.interpreter.py
# Edit config file directly
gist-cache-rs config edit
# Reset to defaults
gist-cache-rs config reset
When executing scripts, the interpreter is automatically detected using:
#!/usr/bin/env python3)Makefile → make)bash (lowest priority)For detailed configuration options, see the Configuration Guide.
git clone https://github.com/7rikazhexde/gist-cache-rs.git
cd gist-cache-rs
cargo build --release
cargo install --path .
cargo test
# Run all checks (format, lint, test)
just check
# Format code
just fmt
# Lint with clippy
just lint
Linux / macOS:
./script/setup.sh uninstall
# Or manually:
# cargo uninstall gist-cache-rs
# rm -rf ~/.cache/gist-cache/
# rm -rf ~/.config/gist-cache/
Windows:
.\script\setup.ps1 uninstall
# Or manually:
# cargo uninstall gist-cache-rs
# Remove-Item -Recurse -Force "$env:LOCALAPPDATA\gist-cache"
# Remove-Item -Recurse -Force "$env:APPDATA\gist-cache"
Contributions are welcome! Please see the Architecture Guide for project structure and design patterns.
MIT License - see LICENSE file for details