wenget - Wen Package Manager

A cross-platform package manager for GitHub binaries, written in Rust.
wenget simplifies the installation and management of command-line tools and applications distributed through GitHub Releases. It automatically detects your platform, downloads the appropriate binaries, and manages them in an organized directory structure.
Features
- š One-line Installation: Remote installation scripts for quick setup
- š Auto-update: Always checks for latest releases from GitHub Releases
- š¦ Bucket System: Organize packages and scripts using bucket manifests
- š Script Support: Install and manage PowerShell, Batch, Bash, and Python scripts from buckets
- š Cross-platform: Windows, macOS, Linux (multiple architectures)
- š Organized Storage: Packages stored under
~/.wenget/apps/ with shims/symlinks in ~/.local/bin/
- š Checksum Verification: SHA-256 validation against the manifest
checksum or published release checksums; mismatches and failed lookups abort (--skip-checksum overrides a failed lookup)
- ā” Stage-and-Swap Installs: Atomic extractions prevent partial or broken installations
- ⬠Resumable Downloads: Large files download over parallel connections, and interrupted downloads resume instead of restarting, even on the next run
- š Smart Search: Fuzzy, ranked search across all configured buckets ā prefixes, typos, abbreviations (
rgp ā ripgrep), and description keywords
- šÆ Platform Detection: Automatically selects the correct binary for your system
- š§ Smart Command Naming: Automatically removes platform suffixes from executable names
Quick Install
Method 1: Winget (Windows, Recommended)
winget install wenget
After installation, run initialization:
wenget init
Method 2: Installation Script
Windows (PowerShell)
irm https://raw.githubusercontent.com/superyngo/wenget/main/install.ps1 | iex
Linux/macOS (Bash)
curl -fsSL https://raw.githubusercontent.com/superyngo/wenget/main/install.sh | bash
System-Level Installation
The install scripts automatically detect elevated privileges and switch to system-level paths:
| Mode | Platform | App Directory | Bin Directory |
|---|
| User | Linux/macOS | ~/.wenget/apps | ~/.local/bin |
| User | Windows | %USERPROFILE%\.wenget\apps | %USERPROFILE%\.local\bin |
| Root/Admin | Linux/macOS | /opt/wenget/apps | /usr/local/bin (symlinks) |
| Root/Admin | Windows | %ProgramW6432%\wenget\apps | %ProgramW6432%\wenget\bin |
When to use Administrator/Root:
- When you want packages available to all users on the system
- When installing to system directories like
/usr/local/bin or %ProgramW6432%
Linux/macOS (as root):
sudo curl -fsSL https://raw.githubusercontent.com/superyngo/wenget/main/install.sh | sudo bash
Windows (as Administrator):
# Run PowerShell as Administrator, then:
irm https://raw.githubusercontent.com/superyngo/wenget/main/install.ps1 | iex
Method 3: Manual Installation
Download the latest release from GitHub Releases and place it in your PATH, or build from source:
git clone https://github.com/superyngo/wenget.git
cd wenget
cargo build --release
The binary will be at target/release/wenget (or wenget.exe on Windows).
Quick Start
# Initialize wenget (done automatically with install scripts)
wenget init
# Add the official wenget bucket (if not added during init)
wenget bucket add wenget https://raw.githubusercontent.com/superyngo/wenget/refs/heads/main/bucket/manifest.json
# Search for packages
wenget search ripgrep
# Install a package
wenget add ripgrep
# List installed packages
wenget list
# Update installed packages (always checks for a wenget update first)
wenget update
# Delete a package
wenget del ripgrep
Commands
Package Management
wenget add ... (aliases: install, a) - Install packages (from bucket, GitHub repository URL, script, or local file)
-c, --command - Custom command name (overrides default executable name)
-v, --ver - Specify version to install (e.g., v1.0.0, 1.0.0)
-p, --platform - Specify target platform (e.g., windows-x64, linux-x64, darwin-arm64)
--variant - Install a specific variant (e.g., --variant baseline)
--no-suffix - Don't append variant suffix to command name
--skip-checksum - Install unverified when the checksum lookup fails on the network (a mismatch still aborts)
-y, --yes - Skip confirmation prompts
wenget info ... (alias: i) - Show package information from buckets or GitHub repository
wenget del ... (aliases: remove, rm, uninstall) - Uninstall packages
-f, --force - Allow deleting the wenget package itself (refused otherwise); does not skip the confirmation prompt
--variant - Specify variant to delete (e.g., baseline, profile)
-y, --yes - Skip confirmation prompts
wenget del self - Uninstall wenget itself and its files; removes only the PATH entries wenget init added (recorded in ~/.wenget/path.json). Without -y, a menu lets you choose which parts to remove
wenget list (alias: ls) - List installed packages (with source and description)
-a, --all - Show all available packages from buckets
wenget search ... (alias: s) - Search available packages (case-insensitive fuzzy match on names, plus description/repo keywords; * globs supported)
wenget update [name]... (alias: up) - Update installed packages (always checks for a wenget update first)
-p, --platform - Update for a specific platform (overrides preferred_platform)
--skip-checksum - Install unverified when the checksum lookup fails on the network (a mismatch still aborts)
-y, --yes - Skip confirmation prompts
Bucket Management
wenget bucket add - Add a bucket manifest URL
wenget bucket del ... - Remove buckets
wenget bucket list - List all configured buckets
wenget bucket refresh - Rebuild package cache from all enabled buckets
wenget bucket create - Generate a bucket manifest from source files or direct URLs
add, update, and info automatically send GITHUB_TOKEN when set, raising the GitHub API limit
from 60 to 5,000 requests per hour.
Bucket Manifest Generator
The bucket create command generates bucket manifests from GitHub repositories and scripts:
# Generate manifest from source files
wenget bucket create -r sources_repos.txt -s sources_scripts.txt -o manifest.json
# Use with GitHub token for higher API rate limit (5000/hour vs 60/hour)
wenget bucket create -r repos.txt -o manifest.json -t YOUR_TOKEN
# Or use GITHUB_TOKEN environment variable
export GITHUB_TOKEN=your_token
wenget bucket create -r repos.txt -o manifest.json
# Update modes (when manifest.json already exists)
wenget bucket create -r repos.txt -o manifest.json -u overwrite # Replace entire file
wenget bucket create -r repos.txt -o manifest.json -u incremental # Merge with existing
# Add direct URLs
wenget bucket create -d https://github.com/user/repo,https://gist.github.com/user/id
Options:
-r, --repos-src - Source file(s) with GitHub repo URLs (comma-separated or multiple)
-s, --scripts-src - Source file(s) with Gist/script URLs (comma-separated or multiple)
-d, --direct - Direct URLs (comma-separated)
-o, --output - Output file (default: manifest.json)
-t, --token - GitHub personal access token
-u, --update-mode - How to handle existing file: overwrite or incremental
System
wenget init - Initialize wenget directories and configuration
-y, --yes - Skip confirmation prompts
wenget config (alias: c) - Edit user preferences (config.toml) with default editor
wenget rename [new] (aliases: mv, rn) - Rename an installed command
wenget repair - Check and repair wenget's state: corrupt package records (quarantined), untracked or duplicate app directories, missing or orphaned launchers, leftovers from interrupted installs (.staging/, *.old-*), and corrupted buckets.json / manifest-cache.json
-f, --force - Apply every fix without prompting and rebuild the configuration files even when they are not corrupted
wenget --version - Show version information
wenget --help - Show help message
Global Options
--verbose - Enable verbose logging (global; long form only; -y/--yes is a per-command option on add, del, update, and init)
Directory Structure
User-Level Installation (default)
~/.wenget/
āāā apps/ # Installed applications
ā āāā wenget/ # wenget itself
ā āāā / # Each installed package
ā āāā .wenget/
ā āāā package.json # This package's record (version, source, commands)
āāā cache/
ā āāā downloads/ # Download cache (keeps `.part` of interrupted downloads)
āāā manifest-cache.json # Cached package list from buckets
āāā config.toml # User preferences (platform, paths, etc.)
āāā buckets.json # Bucket configuration
āāā path.json # PATH entries added by `wenget init` (removed by `del self`)
~/.local/bin/ # Symlinks/shims (added to PATH; %USERPROFILE%\.local\bin on Windows)
āāā wenget # wenget symlink (Unix) / shim (Windows)
āāā # Package symlinks / shims
System-Level Installation (root/Administrator)
Linux/macOS:
/opt/wenget/
āāā apps/ # Installed applications
ā āāā wenget/
ā āāā /
āāā cache/
ā āāā downloads/
āāā manifest-cache.json
āāā buckets.json
/usr/local/bin/ # Symlinks to binaries
āāā wenget -> /opt/wenget/apps/wenget/wenget
āāā -> ...
Windows:
%ProgramW6432%\wenget\
āāā apps\ # Installed applications
ā āāā wenget\
ā āāā \
āāā bin\ # Launcher shims (added to system PATH)
ā āāā wenget.cmd
ā āāā .cmd
āāā cache\
ā āāā downloads\
āāā manifest-cache.json
āāā buckets.json
Configuration
wenget supports user preferences via ~/.wenget/config.toml. Edit with:
wenget config
Available Settings
Preferred Platform - Override automatic platform detection:
preferred_platform = "x86_64-unknown-linux-musl"
Common platform identifiers:
- Linux x86_64 (glibc):
x86_64-unknown-linux-gnu
- Linux x86_64 (musl):
x86_64-unknown-linux-musl
- Linux ARM64:
aarch64-unknown-linux-gnu
- macOS Intel:
x86_64-apple-darwin
- macOS Apple Silicon:
aarch64-apple-darwin
- Windows x86_64:
x86_64-pc-windows-msvc
- Windows ARM64:
aarch64-pc-windows-msvc
preferred_platform is applied by both wenget add and wenget update. It also
accepts internal identifiers (e.g. linux-aarch64-musl). When a libc/compiler
variant such as musl is requested, it is preferred when available and falls
back to a compatible build otherwise. A -p/--platform flag overrides it.
Custom Bin Directory - Override default bin location:
custom_bin_path = "/usr/local/bin"
Useful for custom PATH setups or when ~/.local/bin cannot be added to PATH.
Download Connections - Parallel connections for one large file (1-16, default 4):
download_connections = 8
Files of 16 MiB or more on servers that support range requests (GitHub releases do) are
downloaded as 8 MiB segments over this many connections. Set 1 to always use a single
connection. A connection that drops or stalls for 30 seconds is retried, and interrupted transfers
resume from where they stopped instead of restarting, also across runs: a failed or interrupted
download keeps .part (plus a .part.json record) in ~/.wenget/cache/downloads/, and
running the same command again continues it. Leftovers older than 7 days are removed
automatically.
Environment Variables
WENGET_ROOT - Override wenget root and bin directories (e.g., env WENGET_ROOT=/tmp/test wenget ...). Sets both application data and binary links under the specified directory; useful for testing and sandboxing without touching ~/.wenget/.
GITHUB_TOKEN - GitHub personal access token. Raises the GitHub API limit from 60 to 5,000 requests/hour; automatically honored by add, update, info, and bucket create.
RUST_LOG - Log filter for env_logger (e.g. RUST_LOG=debug); takes precedence over --verbose.
Bucket System
Buckets are collections of package and script manifests hosted online. The official wenget bucket provides curated open-source tools.
Official Bucket
wenget bucket add wenget https://raw.githubusercontent.com/superyngo/wenget/refs/heads/main/bucket/manifest.json
Creating Your Own Bucket
You can create custom buckets to distribute your own package and script collections. See the official wenget bucket for a complete example.
Bucket Structure
Create a manifest.json with the following structure:
{
"packages": [
{
"name": "my-tool",
"repo": "https://github.com/username/repo",
"description": "Tool description",
"homepage": "https://example.com",
"license": "MIT",
"version": "1.0.0",
"platforms": {
"windows-x86_64": [
{
"url": "https://github.com/username/repo/releases/download/v1.0.0/tool-windows-x64.zip",
"size": 1234567,
"asset_name": "tool-windows-x64.zip"
}
],
"linux-x86_64": [
{
"url": "https://github.com/username/repo/releases/download/v1.0.0/tool-linux-x64.tar.gz",
"size": 1234567,
"asset_name": "tool-linux-x64.tar.gz"
}
]
}
}
],
"scripts": [
{
"name": "my-script",
"description": "Useful script",
"repo": "https://github.com/username/repo",
"homepage": "https://example.com",
"license": "MIT",
"platforms": {
"powershell": {
"url": "https://raw.githubusercontent.com/username/repo/main/script.ps1"
},
"bash": {
"url": "https://raw.githubusercontent.com/username/repo/main/script.sh"
}
}
}
]
}
Required Fields
For Packages:
name: Package name (used in commands)
repo: GitHub repository URL
description: Brief package description
platforms: Platform-specific binary entries as a map of platform identifiers (windows-x86_64, linux-x86_64-musl, macos-aarch64, etc.) to arrays of binary objects:
url: Download URL for the binary
size: File size in bytes
asset_name: Original asset filename from the release
For Scripts:
name: Script name (used in commands)
description: Brief script description
repo: Repository URL (for reference, e.g. Gist URL)
platforms: Map of script type (powershell, bash, batch, python) to platform info:
url: Direct URL to the script file
Optional Fields
homepage: Project homepage URL (packages and scripts)
license: Package or script license (packages and scripts)
version: Package version string (packages)
checksum: SHA-256 digest (`` or sha256:) verified against the download on PlatformBinary entries; takes precedence over probing release checksum files
Hosting Your Bucket
GitHub (Recommended):
# Create a new repository
# Add manifest.json to the repository
# Use raw.githubusercontent.com URL
wenget bucket add my-bucket https://raw.githubusercontent.com/username/my-bucket/main/manifest.json
Other Hosting:
- Any web server that serves JSON with HTTPS
- GitHub Gists
- CDN services
Example: Official wenget Bucket
The official bucket is maintained at: https://github.com/superyngo/wenget/tree/main/bucket
It includes curated packages with:
- Verified working binaries across platforms
- Updated package metadata
- Categorized by tool type
- Regular updates and maintenance
You can use it as a template for creating your own bucket:
# Clone the wenget repo and use its bucket directory as a template
git clone https://github.com/superyngo/wenget my-bucket-template
cd my-bucket-template/bucket
# Copy manifest.json into your own repository and edit it with your packages
Testing Your Bucket
# Add your bucket locally
wenget bucket add test-bucket https://example.com/manifest.json
# Verify packages are listed
wenget search
# Test installation
wenget add
wenget supports the following platforms:
| Platform | Architecture | Status |
|---|
| Windows | x86_64 (64-bit) | ā
Supported |
| Windows | i686 (32-bit) | ā
Supported |
| Windows | aarch64 (ARM64) | ā
Supported |
| Linux | x86_64 | ā
Supported |
| Linux | i686 | ā
Supported |
| Linux | aarch64 (ARM64) | ā
Supported |
| Linux | armv7 | ā
Supported |
| macOS | x86_64 (Intel) | ā
Supported |
| macOS | aarch64 (Apple Silicon) | ā
Supported |
How It Works
- Platform Detection: wenget automatically detects your OS and architecture
- Package Resolution: Searches buckets for the requested package
- Binary Selection: Identifies the appropriate binary from GitHub Releases
- Download & Checksum: Downloads the asset (in parallel segments for large files, resuming interrupted transfers; see Download Connections) and verifies its SHA-256 against the manifest
checksum, or else against checksums published next to the release asset (.sha256, checksums.txt, SHA256SUMS). A mismatch always aborts; a lookup that fails on the network aborts unless --skip-checksum is given; an asset with no published checksum installs unverified.
- Stage & Swap: Extracts the archive into
.staging/ before atomically swapping into ~/.wenget/apps//, ensuring interrupted runs never leave corrupted installs
- Launcher Creation: Creates shims (Windows) or symlinks (Unix) in
~/.local/bin/ (or configured bin directory) for immediate command access
If a package in a multi-package install fails, wenget reports it, continues with the remaining packages, and exits with a non-zero exit code (1) once the batch finishes.
GitHub API Rate Limits
wenget uses the GitHub API to fetch package information and download binaries. Be aware of GitHub's API rate limits:
Rate Limit Overview
| Authentication | Rate Limit | Impact |
|---|
| Unauthenticated | 60 requests/hour | Limits installs, updates, and info lookups |
Authenticated (GITHUB_TOKEN) | 5,000 requests/hour | Sufficient for normal usage |
Setting GITHUB_TOKEN in your environment (or passing -t/--token to wenget bucket create) automatically enables authenticated requests with 5,000 requests/hour.
Impact on wenget Operations
Operations that consume API calls:
wenget add - 1 call per package (fetches latest release from GitHub API, reusing cached bucket metadata)
wenget add - 2 calls per URL (when installing from GitHub repository URL: repo info + release)
wenget info - 2 calls per URL (querying GitHub repository directly)
wenget info - 1 call per bucket package (checks the latest release version)
wenget update - 1 call per installed package checked via GitHub API
Operations that don't consume API calls:
wenget info for bucket scripts - Uses cached bucket data (0 API calls)
wenget search - Uses cached bucket data (0 API calls)
wenget list - Local only
wenget del - Local only
wenget bucket (list, add, del, refresh) - Local configuration / HTTP manifest downloads only
Recommendations
- Use Buckets: The bucket system caches package metadata, keeping installs down to a single release fetch
- Set
GITHUB_TOKEN: For heavy usage or CI environments, export GITHUB_TOKEN=... in your shell configuration
- Rate limit exceeded? Wait an hour or use authenticated requests with
GITHUB_TOKEN
The official wenget bucket is updated regularly, so most users won't need to worry about rate limits when using bucket-based package management.
Examples
# Modern alternatives to classic Unix tools
wenget add ripgrep fd bat
# Fuzzy finder and JSON processor
wenget add fzf jq
# System monitoring
wenget add bottom btop
# Terminal file manager
wenget add yazi
Manage Packages
# Search for a tool
wenget search rust
# Refresh package metadata and install
wenget bucket refresh
wenget add jq
# List what's installed
wenget list
# Remove a package
wenget del jq
Important Disclaimer
ā ļø NO WARRANTIES OR GUARANTEES
wenget is a package manager that facilitates downloading and installing applications from GitHub Releases. wenget DOES NOT:
- ā Verify the authenticity or safety of packages
- ā Maintain or update the applications themselves
- ā Provide usage information or support for installed applications
- ā Guarantee the security, stability, or functionality of any package
- ā Take responsibility for any damage caused by installed applications
Users are responsible for:
- ā
Verifying the trustworthiness of package sources
- ā
Understanding what each package does before installing
- ā
Reviewing the source repositories and releases
- ā
Accepting all risks associated with installing third-party software
By using wenget, you acknowledge that you install packages at your own risk.
wenget acts only as a convenience tool for downloading and organizing binaries. The responsibility for verifying, securing, and using applications rests entirely with the user.
Uninstallation
Using wenget
wenget del self
This will:
- Remove the PATH entries
wenget init added
- Remove launchers in
~/.local/bin (or your configured bin directory) that point into
~/.wenget, including the wenget launcher; other files there are left alone
- Delete the wenget directory (
~/.wenget) with all installed packages
- Remove the wenget executable itself
Without -y, a menu lets you choose which of these to remove; launchers go with "Apps & data".
Manual Uninstallation
Windows:
# Remove from PATH, then delete (also remove wenget.cmd and package shims from %USERPROFILE%\.local\bin):
Remove-Item -Recurse -Force "$env:USERPROFILE\.wenget"
Linux/macOS:
# Remove from PATH, then delete (also remove wenget and package symlinks from ~/.local/bin):
rm -rf ~/.wenget
Development
Building from Source
git clone https://github.com/superyngo/wenget.git
cd wenget
cargo build --release
Running Tests
cargo test
Project Structure
wenget/
āāā src/
ā āāā cli.rs # CLI interface
ā āāā commands/ # Command implementations
ā āāā core/ # Core functionality (config, buckets, manifest cache, installed store)
ā āāā downloader/ # Download logic
ā āāā installer/ # Installation logic
ā āāā main.rs # Entry point
ā āāā package_resolver.rs # Package and script resolution
ā āāā providers/ # GitHub API integration
ā āāā utils/ # Utilities (HTTP client, prompts)
āāā install.ps1 # Windows installer
āāā install.sh # Unix installer
For architecture and documentation structure, see CONTEXT.md.
Troubleshooting
PATH Not Updated
After installation, you may need to restart your terminal or run:
Windows:
refreshenv
Linux/macOS:
source ~/.bashrc # or ~/.zshrc, ~/.profile
Package Not Found
# Refresh package metadata from all buckets
wenget bucket refresh
# Check available buckets
wenget bucket list
Permission Errors (Linux/macOS)
# Ensure ~/.local/bin is in PATH and has correct permissions
chmod +x ~/.local/bin/*
Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License
MIT License - Copyright (c) 2025 wen
See LICENSE for details.
Credits
Inspired by:
Links
Changelog
See CHANGELOG.md for detailed release notes and version history.