Skip to content

Commit 99fa36c

Browse files
committed
Simplify docs
1 parent d07d410 commit 99fa36c

3 files changed

Lines changed: 118 additions & 109 deletions

File tree

docs/cli.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,62 @@ dep deploy -o ssh_multiplexing=true -o branch=master
3737

3838
## Running arbitrary commands
3939

40-
Run an ad-hoc command on the selected hosts:
40+
`dep run <command> [selector]` runs a one-off shell command on the selected hosts:
4141

4242
```
43-
dep run 'uptime -p'
43+
$ dep run 'uptime -p' all
44+
[prod01] up 3 weeks, 2 days, 4 hours
45+
[prod02] up 1 week, 6 days
4446
```
4547

48+
Useful flags:
49+
50+
- `-o key=value` — override config (same as deploy commands).
51+
- `-t, --timeout=<sec>` — command timeout (default 300).
52+
- `-r, --raw` — print stdout only, no `[host]` prefix.
53+
54+
## SSH into a host
55+
56+
`dep ssh [host]` opens an interactive SSH session using Deployer's host config (alias, port, identity file,
57+
`remote_user`, etc.).
58+
59+
```
60+
dep ssh # asks which host
61+
dep ssh deployer.org # connects directly
62+
```
63+
64+
After connecting, the working directory is `{{deploy_path}}` (or `{{current_path}}` if it exists).
65+
66+
## Inspect configuration
67+
68+
`dep config [selector]` prints resolved config for the selected hosts. Default format is MAML:
69+
70+
```
71+
dep config # asks which host
72+
dep config all # every host
73+
dep config --format=json
74+
dep config --format=maml
75+
```
76+
77+
Useful for debugging variable interpolation and seeing what callbacks resolve to.
78+
79+
## Rolling back
80+
81+
`dep rollback` re-points `current` at the most recent good release:
82+
83+
```
84+
dep rollback
85+
```
86+
87+
What it does:
88+
89+
1. Reads `releases/` and picks the most recent release before `current` that is not marked `BAD_RELEASE`.
90+
2. Re-symlinks `current → releases/<candidate>`.
91+
3. Writes a `BAD_RELEASE` file (with timestamp and user) into the previously-current release so it is skipped on
92+
future rollbacks.
93+
94+
Override the target release with `-o rollback_candidate=<release_id>`.
95+
4696
## Tree command
4797

4898
`dep tree <task>` visualizes [task grouping](tasks.md#task-grouping) and [before/after hooks](tasks.md#addbefore):

0 commit comments

Comments
 (0)