Skip to content

vi-is-ramen/wrapcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wrapcli

Wrap a CLI tool and rewrite its output to masquerade as another tool.

Crates.io Docs.rs CI

Quick start

Add to your project:

cargo add wrapcli

Then use it:

use wrapcli::{run_streaming, WrapConfig};

fn main() -> std::io::Result<()> {
    let cfg = WrapConfig {
        orig_name: "rustc".into(),
        fake_name: "dustc".into(),
        fake_ver: "2.0.0".into(),
        save_orig: true,
    };

    let args: Vec<String> = std::env::args().skip(1).collect();
    let status = run_streaming(&cfg, args)?;
    std::process::exit(status.code().unwrap_or(1));
}

Documentation

Full documentation is available in the WrapCLI Book.

License

MIT OR Apache-2.0


Made with ❤️ for the Rust community

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors