Rewrite README with install, config, and usage examples
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
36c648d599
commit
b4da7f14f6
1 file changed
+34
-12
@@ -1,28 +1,50 @@
|
||||
# csc : Cluster SSH Command
|
||||
# csc — Cluster SSH Command
|
||||
|
||||
Launch command over SSH on cluster hosts with "dialog" DEBIAN_FRONTEND.
|
||||
Run a command over SSH on a group of hosts, with colored per-host output and progress tracking.
|
||||
|
||||
## Tree
|
||||
## Install
|
||||
|
||||
Copy `csc` somewhere in your `$PATH` and make it executable:
|
||||
|
||||
```bash
|
||||
$ tree
|
||||
.
|
||||
├── csc
|
||||
└── README.md
|
||||
cp csc ~/.local/bin/csc
|
||||
chmod +x ~/.local/bin/csc
|
||||
```
|
||||
|
||||
0 directories, 2 files
|
||||
## Configuration
|
||||
|
||||
Host groups are plain text files under `~/.config/csc/` (one hostname per line, `#` comments supported):
|
||||
|
||||
```
|
||||
# ~/.config/csc/webservers
|
||||
web01.example.com
|
||||
web02.example.com
|
||||
# web03.example.com (disabled)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
$ csc -h
|
||||
```
|
||||
Usage: csc [OPTION]... [COMMAND]
|
||||
-h show help
|
||||
-v enable verbose mode
|
||||
-c specify config dir, default is /home/flo/.config/csc
|
||||
-c specify config dir, default is ~/.config/csc
|
||||
-g specify group
|
||||
-d enable dry run mode
|
||||
```
|
||||
|
||||
Host group file must exists under config dir, one host per line.
|
||||
```bash
|
||||
csc -g webservers uptime
|
||||
csc -g webservers -d "apt-get upgrade -y" # dry run: shows commands, no ssh
|
||||
csc -g webservers -v df -h # verbose
|
||||
csc -g webservers -c /etc/csc uptime # custom config dir
|
||||
```
|
||||
|
||||
## Output
|
||||
|
||||
```
|
||||
[1/2] "uptime" on web01 → ssh -t web01 "TERM=xterm DEBIAN_FRONTEND=dialog uptime"
|
||||
✓ ok
|
||||
[2/2] "uptime" on web02 → ...
|
||||
✗ failed (exit 255)
|
||||
```
|
||||
Reference in new issue
Block a user