cloudhop 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +22 -4
  2. package/dist/cli.js +1525 -752
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -21,8 +21,11 @@
21
21
 
22
22
  ```bash
23
23
  npm install --global cloudhop
24
- cloudhop setup # add your SSO portal, sign in, pick accounts
25
- hop acme-prod s3 ls # runs `aws s3 ls` as that account, role and region
24
+ cloudhop add # sign in to your SSO portal, pick accounts, name aliases
25
+ cloudhop shell # set up your terminal once: `cloudhop use`, prompt label (Starship too)
26
+
27
+ cloudhop use acme-prod # switch this terminal to an account (acme-prod: your alias)
28
+ aws s3 ls # plain aws, as acme-prod: signs you in when needed
26
29
  ```
27
30
 
28
31
  ## Why cloudhop
@@ -47,9 +50,25 @@ copying access keys, editing `~/.aws/config` by hand and running
47
50
 
48
51
  ## Everyday use
49
52
 
53
+ Switch the terminal to an account and type the `aws` commands you know:
54
+
55
+ ```bash
56
+ cloudhop use acme-dev # this terminal is acme-dev; your prompt can show it
57
+ aws ecs list-clusters # expired session? the browser opens, then it runs
58
+ cloudhop use acme-prod # switch accounts (production asks before changes)
59
+ cloudhop use acme-dev --save # pin it to this project in .cloudhoprc: `cd` switches for you
60
+ ```
61
+
62
+ Why `cloudhop shell`? A program can't change the terminal that started it;
63
+ only the shell can, so it needs one line in your shell's startup file.
64
+ Without it, `cloudhop use` opens a new shell, and everything below still works.
65
+
50
66
  | You want to | Run |
51
67
  | --- | --- |
52
- | Run any `aws` command as an alias | `hop acme-prod ec2 describe-instances` |
68
+ | Switch this terminal to an alias | `cloudhop use acme-dev` |
69
+ | Pin an alias to a project folder | `cloudhop use acme-dev --save` |
70
+ | Trust a cloned project's `.cloudhoprc` | `cloudhop allow` |
71
+ | Run one command in another account | `hop acme-prod ec2 describe-instances` |
53
72
  | Check who you are | `hop acme-prod` |
54
73
  | Use another region once | `hop acme-prod s3 ls --region eu-west-1` |
55
74
  | Give any tool temporary credentials | `cloudhop exec acme-prod -- terraform plan` |
@@ -63,7 +82,6 @@ copying access keys, editing `~/.aws/config` by hand and running
63
82
  | Pick the alias from a list | `hop` |
64
83
  | Mark an alias as production (asks before changes) | `cloudhop prod acme-prod` |
65
84
  | Run one command in many accounts | `cloudhop each 'acme-*' -- s3 ls` |
66
- | Use an alias in this shell (`aws`, Terraform...) | `cloudhop use acme-dev` |
67
85
  | Rename an alias | `cloudhop mv acme-dev dev` |
68
86
  | Share your setup with your team | `cloudhop team export` |
69
87
  | Do all of it from the browser | `cloudhop ui` |