shimexe
π The Modern Executable Shim Manager
Transform any executable into a smart, portable shim with HTTP download support
π δΈζζζ‘£ β’ π Quick Start β’ π¦ Installation β’ π§ Examples
π What is shimexe?
shimexe is a revolutionary executable shim manager that bridges the gap between local tools and cloud-distributed applications. Create lightweight, portable shims that can automatically download, extract, and execute tools from HTTP URLs - all while maintaining the simplicity of local executables.
π‘ Why shimexe?
- π Cloud-Native: Download tools directly from GitHub releases, CDNs, or any HTTP URL
- π¦ Archive Smart: Automatically extract zip files and discover executables
- π§ Zero Config: Smart defaults with powerful customization options
- π Portable: Shims work independently without requiring shimexe installation
- β‘ Fast: Efficient caching and smart re-download logic
- π Secure: Built with Rust and rustls-tls for secure HTTPS connections
β¨ Key Features
π Cloud-First Design
- HTTP URL Support: Download from GitHub, CDNs, any URL
- Archive Extraction: Auto-extract zip files and find executables
- Smart Caching: Efficient download and storage management
- Auto-Recovery: Re-download missing files automatically
π§ Developer Experience
- Zero Configuration: Works out of the box with smart defaults
- TOML Configuration: Human-readable, version-controllable configs
- Environment Variables: Powerful
${VAR:default}
expansion - Template System: Dynamic path and argument resolution
π Production Ready
- Cross-Platform: Windows, macOS, Linux support
- Static Linking: No runtime dependencies required
- Portable Shims: Work independently when distributed
- Secure: Built with Rust and rustls-tls
π¦ Integration Friendly
- Package Managers: Available on Crates.io, Chocolatey, Scoop
- API Library: Use
shimexe-core
in your own projects - Tool Managers: Perfect for vx, rye, and similar tools
- CI/CD Ready: Ideal for automated environments
π¦ Installation
π One-Line Install (Recommended)
π§ Unix/Linux/macOS
|
πͺ Windows (PowerShell)
irm https://raw.githubusercontent.com/loonghao/shimexe/main/scripts/install.ps1 | iex
π Specific Version
# Unix/Linux/macOS
SHIMEXE_VERSION="0.3.1" |
# Windows
$env:SHIMEXE_VERSION="0.3.1"; |
π¦ Package Managers
π¦ Cargo
πΊ Homebrew
# Add tap first
# Install shimexe
π« Chocolatey
choco install shimexe
π₯ Scoop
# Add bucket first
scoop bucket add loonghao https://github.com/loonghao/scoop-bucket
# Install shimexe
scoop install shimexe
π₯ Manual Download
Download pre-built binaries from GitHub Releases for your platform.
βοΈ PATH Configuration
Choose Your Approach
π§ Option 1: Auto-configure PATH (Recommended)
Add --add-system-path
when creating shims:
# Use directly
Benefits:
- β Use tools directly by name
- β Works like system-installed tools
- β Automatic PATH management
π Option 2: Use shimexe run
(No setup)
Run tools via shimexe command:
# Use via shimexe run
Benefits:
- β No PATH modification needed
- β Explicit tool execution
- β Works immediately
π Manual PATH Setup
If you prefer manual configuration, add ~/.shimexe
to your PATH:
Unix/Linux/macOS:
Windows (PowerShell):
$env:PATH = "$env:USERPROFILE\.shimexe;$env:PATH"
# Or add permanently via System Properties > Environment Variables
π Quick Start
Get Started in 30 Seconds!
Now available on all major package managers!
π Cloud Tools (The Magic!)
1. Download from GitHub Releases
# Download and create shim with PATH setup
# Now use it directly!
# Or without PATH setup, use shimexe run:
2. Auto-infer tool names
# Creates 'installer-analyzer' shim with PATH setup
# Use directly or via shimexe run
3. Archive extraction
# Extracts zip and finds all executables
# Creates multiple shims automatically!
# Use directly or via shimexe run
π§ Local Tools (Traditional)
1. Initialize with examples
2. Create local shims
# Rust compiler shim
# Python with custom args
3. Manage your shims
# List all shims
# Update existing shim
# Remove shim
π― Real-World Examples
# Popular tools you can install instantly (with PATH setup):
# Now use them anywhere!
# Or use via shimexe run (no PATH setup needed):
Configuration Format
Shims are configured using TOML files with the .shim.toml
extension:
Local Executable Configuration
[]
= "rust"
= "${RUST_HOME:~/.cargo/bin}/rustc${EXE_EXT:.exe}"
= ["--version"]
= "/optional/working/directory"
[]
= "info"
= "${CARGO_HOME:~/.cargo}"
[]
= "Rust compiler shim"
= "1.0.0"
= "Your Name"
= ["rust", "compiler"]
HTTP URL Configuration
[]
= "installer-analyzer"
= "/home/user/.shimexe/installer-analyzer/bin/installer-analyzer.exe"
= "https://github.com/loonghao/installer-analyzer/releases/download/v0.7.0/installer-analyzer.exe"
= "url"
= []
= ""
[]
# Optional environment variables
[]
= "Installer analyzer tool from GitHub"
= "0.7.0"
= "loonghao"
= ["installer", "analyzer", "tool"]
Archive Configuration (New!)
[]
= "release-plz"
= "/home/user/.shimexe/release-plz/bin/release-plz.exe"
= "https://github.com/release-plz/release-plz/releases/download/release-plz-v0.3.135/release-plz-x86_64-pc-windows-msvc.zip"
= "archive"
= []
# List of extracted executables from the archive
[[]]
= "release-plz"
= "release-plz.exe"
= "/home/user/.shimexe/release-plz/bin/release-plz.exe"
= true
[]
# Optional environment variables
[]
= "Release Please tool from archive"
= "0.3.135"
= "release-plz team"
= ["release", "automation", "tool"]
Note: When using HTTP URLs or archives, shimexe automatically downloads and extracts to ~/.shimexe/<app>/bin/
and updates the path to point to the local file(s).
Environment Variable Expansion
shimexe supports powerful environment variable expansion:
${VAR}
- Expand VAR, error if not found${VAR:default}
- Expand VAR, use default if not found- Built-in variables:
${EXE_EXT}
- Platform-specific executable extension (.exe
on Windows)${PATH_SEP}
- Platform-specific path separator${HOME}
- User home directory${CONFIG_DIR}
- User configuration directory
How Shims Work
shimexe creates standalone executable shims that can work independently when distributed:
Shim Architecture
-
Dual Configuration: Each shim consists of two files:
<name>.exe
- The executable shim (copy of shimexe binary)<name>.shim.toml
- The configuration file
-
Smart Configuration Lookup: When a shim runs, it searches for configuration in this order:
- Local: Same directory as the executable (for portable distribution)
- Default: User's shim directory (
~/.shimexe/
)
-
Portable Distribution: Shims can be copied to any location along with their
.shim.toml
files and will work independently without requiring shimexe to be installed on the target system.
Static Linking
shimexe is built with static linking to minimize runtime dependencies:
- Windows: Statically links MSVC runtime (
+crt-static
) - No External Dependencies: Shims work without requiring additional DLLs or runtime installations
Distribution Examples
# Create a shim
# Copy both files for distribution
# The shim now works independently in ./dist/
CLI Commands
# Add a new shim
# Remove a shim
# List all shims
# Update an existing shim
# Validate a shim configuration
# Initialize shimexe
HTTP URL and Archive Examples
# Download executable with explicit name
# Auto-infer name from URL (creates 'installer-analyzer' shim)
# Download and extract zip archive (creates shims for all executables found)
# Add arguments and environment variables
# Force overwrite existing shim
# Download to custom shim directory
# Archive with multiple executables (auto-detects and creates multiple shims)
# This might create: devtools-compiler, devtools-debugger, devtools-profiler shims
Using as a Library
Add to your Cargo.toml
:
[]
= "0.1"
Example usage:
use *;
// Load and run a shim
let runner = from_file?;
let exit_code = runner.execute?;
// Create a shim programmatically
let config = ShimConfig ;
config.to_file?;
HTTP URL Download Example
use ;
// Download and create shim programmatically
let downloader = new;
let url = "https://github.com/user/repo/releases/download/v1.0/tool.exe";
// Infer app name from URL
let app_name = infer_app_name_from_url.unwrap;
let filename = extract_filename_from_url.unwrap;
// Generate download path
let download_path = generate_download_path;
// Download the file
downloader.download_file.await?;
// Create shim configuration
let config = ShimConfig ;
Integration Examples
With vx
use ShimRunner;
// In your vx integration
let shim_path = format!;
let runner = from_file?;
runner.execute?;
With rye
use ;
// Create Python tool shims
let config = ShimConfig ;
Building with Icon
shimexe includes a beautiful custom icon that gets embedded into the Windows executable. The build process automatically handles icon generation:
- Automatic Generation: If you have ImageMagick installed, the build script will automatically convert
assets/icon.svg
toassets/icon.ico
- Manual Generation: You can also generate the icon manually:
# Install ImageMagick first # Generate icon
- CI/CD: GitHub Actions automatically installs ImageMagick and generates icons for all release builds
The icon represents shimexe's core concept: a central hub (the shim manager) connecting to multiple executables, with animated data flow indicators showing the dynamic nature of the tool.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE-MIT file for details.
Acknowledgments
Inspired by:
- Scoop - Windows package manager
- scoop-better-shimexe - Improved Scoop shim implementation
- vx - Version management tool
- rye - Python project management