Easy-to-use command line tool to interact with Clash RESTful API.
```bash $ clashctl proxy list
Selector - SelectorGroup Direct - DIRECT Reject - REJECT URLTest - Auto-All Selector - All ShadowsocksR 19 SomeProxy-1 Vmess 177 SomeProxy-2 Vmess 137 SomeProxy-3 Shadowsocks 143 SomeProxy-4
```
Since the project is not published yet, you can clone and compile from source manually:
You will need rust environment to compile and install
bash
$ git clone https://github.com/George-Miao/clashctl.git
$ cd clashctl
$ cargo install --features cli --path .
Minimum supported rust version is 1.56.0
Test with cargo-msrv
``` clashctl 0.1.0
George Miao gm@miao.dev
CLI used to interact with Clash RESTful API
USAGE:
clashctl [OPTIONS]
OPTIONS:
-h, --help Print help information
-t, --timeout
SUBCOMMANDS: completion Generate auto-completion scripts help Print this message or the help of the given subcommand(s) proxy Interacting with proxies server Interacting with servers ```
```toml
[dependencies] clashctl = { version = "0.1.0", git = "https://github.com/George-Miao/clashctl.git" } ```
Then in your project:
```rust use clashctl::Clash;
async fn test() { let clash = Clash::builder("http://example.com:9090").unwrap().build(); println!("Clash version is {:?}", clash.get_version().await.unwrap()) } ```