You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli.md
+17-23Lines changed: 17 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,57 +1,51 @@
1
1
# CLI Usage
2
2
3
-
We recommend adding the following alias to your .bashrc file:
3
+
For project installs, alias `dep`:
4
4
5
5
```bash
6
6
alias dep='vendor/bin/dep'
7
7
```
8
8
9
-
It is also recommended to install the completion script for Deployer. Completion supports:
10
-
11
-
- tasks,
12
-
- options,
13
-
- host names,
14
-
- and configs.
15
-
16
-
For example, on macOS run the following commands:
9
+
Install shell completion for tasks, options, host names, and configs. On macOS:
17
10
18
11
```bash
19
12
brew install bash-completion
20
13
dep completion bash > /usr/local/etc/bash_completion.d/deployer
21
14
```
22
15
16
+
See [installation](installation.md#autocomplete-support) for zsh and fish.
17
+
23
18
## Overriding configuration options
24
19
25
-
For example, if your _deploy.php_ file contains this configuration:
20
+
Use `-o` to override any config value at the command line. Given this in `deploy.php`:
26
21
27
22
```php
28
23
set('ssh_multiplexing', false);
29
24
```
30
25
31
-
And you want to enable [ssh multiplexing](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing)without modifying the recipe, you can pass the `-o` option to the `dep` command:
26
+
Re-enable [ssh multiplexing](https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Multiplexing)for one run:
32
27
33
28
```
34
29
dep deploy -o ssh_multiplexing=true
35
30
```
36
31
37
-
To override multiple config options, you can pass multiple `-o` args:
32
+
Pass `-o` multiple times to override more than one value:
38
33
39
34
```
40
35
dep deploy -o ssh_multiplexing=true -o branch=master
41
36
```
42
37
43
38
## Running arbitrary commands
44
39
45
-
Run any command on one or more hosts:
40
+
Run an ad-hoc command on the selected hosts:
46
41
47
42
```
48
43
dep run 'uptime -p'
49
44
```
50
45
51
46
## Tree command
52
47
53
-
Deployer supports [task grouping](tasks.md#task-grouping) and [before/after hooks](tasks.md#addbefore).
54
-
To visualize the task hierarchy, use the **dep tree** command.
48
+
`dep tree <task>` visualizes [task grouping](tasks.md#task-grouping) and [before/after hooks](tasks.md#addbefore):
55
49
56
50
```
57
51
$ dep tree deploy
@@ -81,8 +75,8 @@ The task-tree for deploy:
81
75
82
76
## Execution plan
83
77
84
-
Before executing tasks, Deployer needs to flatten the task tree and decide in which order it will be executing tasks
85
-
on which hosts. Use the `--plan` option to output a table with tasks/hosts:
78
+
Deployer flattens the task tree and decides task order per host before running. `--plan` prints the table without
0 commit comments