Clashctl
About
Easy-to-use command line tool to interact with Clash RESTful API.
Getting Started
Features
- Change proxies
- Display proxies, with filter and sorting supported, in both plain and grouped mode
- Store and use multiple servers
- Generate completion script (by clap_generate)
- Manage multiple servers
TODO
- Manage servers
- Sort proxies
- Inspect rules
- Status panel (TUI)
Installing
Use Cargo
Compile from source
Prerequisites
You will need rust environment (Cargo & rustc) to compile and install
MSRV
Minimum supported rust version is 1.56.0
Test with cargo-msrv
Usage
Use the CLI
clashctl
George Miao <gm@miao.dev>
CLI used to interact with Clash RESTful API
USAGE:
clashctl [OPTIONS] <SUBCOMMAND>
OPTIONS:
-c, --config <CONFIG> Path of config file. Default to ~/.config/clashctl/config.ron
-h, --help Print help information
-t, --timeout <TIMEOUT> Timeout of requests, in ms [default: 2000]
-v, --verbose Verbosity. Default: INFO, -v DEBUG, -vv TRACE
-V, --version Print version information
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
Use as a crate
# cargo.toml
[]
= "*"
Then in your project:
use Clash;