Skip to content

Commit 4ea0719

Browse files
feat(CLI): document new behavior of variable (#440)
1 parent 49f0c3b commit 4ea0719

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

src/users/cli.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,31 @@ To get help on subcommands, use `deis help [subcommand]`:
5151

5252
## Support for Multiple Profiles
5353

54-
The CLI reads from the default `client` profile which is located on your
54+
The CLI reads from the default `client` profile, which is located on your
5555
workstation at `$HOME/.deis/client.json`.
5656

5757
Easily switch between multiple Deis Workflow installations or users by setting
58-
the `$DEIS_PROFILE` environment variable.
58+
the `$DEIS_PROFILE` environment variable or by using the `-c` flag.
5959

60-
$ cat ~/.deis/production.json && echo
61-
{"username":"deis","controller":"http://deis-prod.example.com","token":"37de3...8776"}
62-
$ DEIS_PROFILE=production deis whoami
63-
You are deis at http://deis-prod.example.com
60+
There are two ways to set the `$DEIS_PROFILE` option.
6461

65-
$ cat ~/.deis/staging.json && echo
66-
{"username":"deis","controller":"http://deis-prod.example.com","token":"67bdc...196a"}
67-
$ DEIS_PROFILE=staging deis whoami
68-
You are deis at http://deis-staging.example.com
62+
1. Path to a json configuration file.
63+
2. Profile name. If you set profile to just a name, it will be saved alongside the default profile,
64+
in `$HOME/.deis/<name>.json`.
65+
66+
Examples:
67+
68+
$ DEIS_PROFILE=production deis login deis.production.com
69+
...
70+
Configuration saved to /home/testuser/.deis/production.json
71+
$ DEIS_PROFILE=~/config.json deis login deis.example.com
72+
...
73+
Configuration saved to /home/testuser/config.json
74+
75+
The configuration flag works identically to and overrides `$DEIS_PROFILE`:
76+
77+
$ deis whoami -c ~/config.json
78+
You are deis at deis.example.com
6979

7080
## Proxy Support
7181

0 commit comments

Comments
 (0)