Crates.io | swh |
lib.rs | swh |
version | 0.2.1 |
source | src |
created_at | 2023-01-08 09:14:36.46823 |
updated_at | 2023-05-20 01:18:15.518078 |
description | A CLI for Switch Hosts |
homepage | https://swh.zhenyuanlau.me |
repository | https://github.com/zhenyuanlau/swh |
max_upload_size | |
id | 753562 |
size | 84,461 |
A CLI for Switch Hosts.
$ swh open # default: ~/.config/swh/config.kdl
Config file example, syntax in KDL:
// ~/.config/swh/config.kdl
version "1.0"
env "local" enabled=true {
host "127.0.0.1" name="localhost" {
alias "localhost.domain"
}
host "255.255.255.255" name="broadcast.host"
}
include "dev" // support in the future
$ swh list
╭────┬──────────────┬──────────╮
│ # │ env │ enabled │
╞════╪══════════════╪══════════╡
│ 0 │ development │ true │
├────┼──────────────┼──────────┤
│ 1 │ staging │ false │
├────┼──────────────┼──────────┤
│ 2 │ production │ false │
╰────┴──────────────┴──────────╯
$ swh toggle production
$ swh show production
Using swh
instead of SwitchHosts.
MIT.