Clashctl
About
Easy-to-use TUI & CLI to interact with Clash RESTful API.
Screenshots
Status panel
Proxies panel
Installing
From crates.io
Compile from source
Getting Started
Use command without subcommands defaults to open TUI:
# Equals
Or use a subcommand to use the cli:
Features
- Pretty terminal UI
- 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
Done & TODO
- Cli
- Manage servers
- Sort proxies
- More features
- TUI
- Status Panel
- Proxies Panel
- Update proxy
- Test latency
- Sort by {Original, LatencyAsc, LatencyDsc, NameAsc, NameDsc}
- Rules Panel
- Connections Panel
- Sort
- Log Panel
- Debug Panel
- Config Panel
- Update clash configs
- Update clashctl configs
- Search
- (Maybe?) mouse support
Prerequisites
You will need nightly rust environment (Cargo & rustc) to compile and install
Usage
Use the TUI
- Use the cli to config servers (for now)
- Use number to navigate between tabs
- Space to hold the list (and therefor move the list)
- Arrow key to move the list under Hold mode
- [^d] open debug panel
Use the CLI
)
Use as a crate
# cargo.toml
[]
= "*"
Then in your project:
use Clash;
Development
clashctl
comes with a justfile
to speed up your development.
Especially the command just dev
, managed to reproduce the hot reload function in front-end development, with cargo-watch
.
Just
commands
just dev
[ alias: d
]
Hot reload development, auto reload on cargo-check
approved changes, with all features enabled
just run {{ Args }}
[ alias: r
]
Run with feature cli & ui
just ui
Run UI only
just cli
Run CLI only
just build
[ alias: b
]
Build in release mode with feature cli & ui
just add
Add an optional dependency, requires cargo-edit
Project structure