fix: rename binary to ssm

This commit is contained in:
2026-07-19 21:23:44 +08:00
parent fcaef77aea
commit fee5c34218
10 changed files with 56 additions and 56 deletions

View File

@ -17,10 +17,10 @@ A CLI for surfing the internet scientifically, written in Go.
```bash
git clone ssh://git@gitea.epss.net.cn:2223/klesh/ss.git
cd ss
go build -o ss ./cmd/ss
go build -o ssm ./cmd/ssm
```
This produces a single `ss` (or `ss.exe` on Windows) binary with no runtime dependencies — templates and hook scripts are embedded in the binary.
This produces a single `ssm` (or `ssm.exe` on Windows) binary with no runtime dependencies — templates and hook scripts are embedded in the binary.
### 2. Add the binary to your system PATH
@ -29,72 +29,72 @@ This produces a single `ss` (or `ss.exe` on Windows) binary with no runtime depe
### Subscription Management
```bash
# add a subscription
ss subscription add <name> <clash-rss-subscription-url>
ssm subscription add <name> <clash-rss-subscription-url>
# refresh a subscription (with optional backup)
ss subscription refresh <name> [--backup]
ssm subscription refresh <name> [--backup]
# delete a subscription
ss subscription rm <name>
ssm subscription rm <name>
# rename a subscription
ss subscription rename <name> <new-name>
ssm subscription rename <name> <new-name>
# update subscription URL
ss subscription set-url <name> <new-url>
ssm subscription set-url <name> <new-url>
# show the URL for a subscription
ss subscription get-url <name>
ssm subscription get-url <name>
# activate a subscription
ss subscription activate <name>
ssm subscription activate <name>
# list all subscriptions
ss subscription list
ssm subscription list
# show storage information
ss subscription storage
ssm subscription storage
```
### Hook Management
```bash
# initialize hooks directory with template scripts
ss hook init
ssm hook init
# show hooks directory location and list all scripts
ss hook list
ssm hook list
# edit a hook script with system editor
ss hook edit <script-name>
ssm hook edit <script-name>
# remove a hook script
ss hook rm <script-name>
ssm hook rm <script-name>
```
### Core Configuration Management
```bash
# import configuration from file
ss config import <file-path> [--config-file <config.yaml>]
ssm config import <file-path> [--config-file <config.yaml>]
# export configuration to file
ss config export <file-path> [--config-file <config.yaml>]
ssm config export <file-path> [--config-file <config.yaml>]
# edit configuration with system editor
ss config edit [--config-file <config.yaml>]
ssm config edit [--config-file <config.yaml>]
# reset configuration to default values
ss config reset [--config-file <config.yaml>]
ssm config reset [--config-file <config.yaml>]
# show current configuration
ss config show [--config-file <config.yaml>]
ssm config show [--config-file <config.yaml>]
# apply subscription to generate final config (with advanced options)
ss config apply \
ssm config apply \
[--config-file <config.yaml>] \
[--output-file <output.yaml>] \
[--subscription <subscription-name>]
```
**Options** (available on every `ss config` subcommand):
**Options** (available on every `ssm config` subcommand):
- `--config-file <config.yaml>`: Use a custom config file instead of the default.
- `--output-file <output.yaml>`: Specify the output path for the generated config file.
- `--subscription <subscription-name>`: Use a specific subscription (not just the active one) for config generation.
@ -102,24 +102,24 @@ ss config apply \
### Core Management
```bash
# update mihomo core binary
ss core update [--version <version>] [--force]
ssm core update [--version <version>] [--force]
```
### Service Management
```bash
ss service install [--name <name>] [--description <description>]
ss service uninstall [--name <name>]
ss service start [--name <name>]
ss service stop [--name <name>]
ss service restart [--name <name>]
ss service reload [--name <name>] # reload config via mihomo's API, no restart
ss service status [--name <name>]
ssm service install [--name <name>] [--description <description>]
ssm service uninstall [--name <name>]
ssm service start [--name <name>]
ssm service stop [--name <name>]
ssm service restart [--name <name>]
ssm service reload [--name <name>] # reload config via mihomo's API, no restart
ssm service status [--name <name>]
```
`install`/`uninstall`/`start`/`stop`/`restart` need root/admin privileges:
- **Linux / macOS**: just run the command directly — `ss` re-execs itself under `sudo` automatically, prompting for your password if needed.
- **Windows**: run from an elevated/Administrator shell — `ss.exe service install`.
- **Linux / macOS**: just run the command directly — `ssm` re-execs itself under `sudo` automatically, prompting for your password if needed.
- **Windows**: run from an elevated/Administrator shell — `ssm.exe service install`.
## Development