Config Management Commands
Manage individual stored configs after import.
These commands operate on config IDs from xrat list configs.
When to Use These Commands
| Command | Use when you want to |
|---|---|
add | Store one share link without creating a subscription source record |
show | Inspect one stored config |
enable | Include a config in normal filtered workflows |
disable | Keep a config stored but skip it in normal filtered workflows |
delete | Hide a config from normal lists while preserving history |
restore | Bring a soft-deleted config back |
Config State
active, enabled, and deleted are separate states.
| State | Meaning |
|---|---|
active | The config used by the current managed runtime session. |
enabled | Included in normal list, test, and rotation workflows. |
disabled | Stored but skipped by enabled-only workflows. |
deleted | Soft-deleted and hidden unless --deleted or --all used. |
Use xrat connect <id> when you want to start a proxy runtime. Use
xrat proxy start when you want the daemon to manage automatic rotation.
add
Add a single config URI directly to the database.
xrat add <input>
Arguments
| Argument | Description |
|---|---|
input | Config URI: vless://..., vmess://..., ss://..., trojan://..., hysteria2://..., etc. |
Examples
xrat add "vless://uuid@example.com:443?type=ws&security=tls#Node"
Unlike xrat import, xrat add does not create or update a subscription source
record.
show
Show details for one stored config.
xrat show <id> [flags]
Arguments
| Argument | Description |
|---|---|
id | Config ID to show |
Flags
| Flag | Description |
|---|---|
--json | Print the result as JSON |
Examples
xrat show 42
xrat show 42 --json
enable
Enable a config.
xrat enable <id>
Arguments
| Argument | Description |
|---|---|
id | Config ID to enable |
Enabled configs are included in normal enabled-only workflows, such as:
xrat list configs --enabled-only
xrat test --enabled-only
disable
Disable a config.
xrat disable <id>
Arguments
| Argument | Description |
|---|---|
id | Config ID to disable |
Disabled configs remain in the database but are excluded from enabled-only queries, tests, and rotation candidate selection.
delete
Soft-delete a config by default.
xrat delete <id> [flags]
Arguments
| Argument | Description |
|---|---|
id | Config ID to delete |
Flags
| Flag | Description |
|---|---|
--hard | Permanently delete the config |
Soft-deleted configs are hidden from normal lists but can still be viewed with:
xrat list configs --deleted
xrat list configs --all
Use --hard only when the row should be permanently removed.
restore
Restore a soft-deleted config.
xrat restore <id>
Arguments
| Argument | Description |
|---|---|
id | Config ID to restore |
restore only applies to soft-deleted configs. It does not recreate a config
that was removed with delete --hard.