| Crates.io | uncrx-rs |
| lib.rs | uncrx-rs |
| version | 0.2.3 |
| created_at | 2024-01-14 09:28:44.796966+00 |
| updated_at | 2025-12-31 14:44:00.360416+00 |
| description | Uncrx is a library that helps you convert a CRX Extension to a zip file that can be easily extracted. |
| homepage | |
| repository | https://github.com/iltumio/uncrx-rs |
| max_upload_size | |
| id | 1099312 |
| size | 129,267 |
A Rust library and command-line tool for converting Chrome CRX extension files to ZIP archives that can be easily extracted.
Uncrx-rs provides both a library and a CLI tool to help you convert CRX (Chrome Extension) files to ZIP format. CRX files are Chrome's packaged extension format, which contains a header with metadata and a ZIP archive. This tool extracts the ZIP portion, making it easy to inspect, modify, or extract Chrome extensions.
uncrx-rs as a library in your Rust projectsAdd uncrx-rs to your Cargo.toml:
[dependencies]
uncrx-rs = "0.2.3"
Or use cargo add:
cargo add uncrx-rs
cargo install uncrx-rs
brew install uncrx-rs
git clone https://github.com/iltumio/uncrx-rs.git
cd uncrx-rs
cargo build --release
The binary will be available at target/release/uncrx.
Extract a CRX file to a directory:
uncrx extension.crx
This will extract the extension to out/extension/ by default.
Specify a custom output directory:
uncrx extension.crx -o my-output-dir
# or
uncrx extension.crx --output-dir my-output-dir
Launch the interactive terminal user interface:
uncrx
The TUI allows you to:
j/krq or EscTUI Controls:
↑/↓ or j/k: Navigate files and directoriesEnter: Open directory or extract CRX fileR: Refresh file listQ or Esc: Quituse std::fs;
use uncrx_rs::uncrx::helpers::parse_crx;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Read the CRX file
let data = fs::read("extension.crx")?;
// Parse the CRX file
let extension = parse_crx(&data)?;
// Access the extracted ZIP data
let zip_data = &extension.zip;
// Access metadata
println!("Version: {}", extension.version);
println!("Public key length: {} bytes", extension.public_key.len());
// Save the ZIP to a file
fs::write("extension.zip", zip_data)?;
Ok(())
}
The parse_crx function returns a CrxExtension struct containing:
version: The CRX format versionpublic_key: The extension's public keysignature: The extension signature (if present)zip: The ZIP archive dataContributions are welcome! Feel free to open issues and send pull requests. We'll evaluate them together in the comment section.
This project is licensed under the MIT License.