Run a command and provide environment variables from an environment section in a 1Password item.
1Password's CLI tool op.
It can be installed somewhere on your PATH
or specified via op_path
in the config file.
The Makefile has an install target which will create the file ~/.cargo/bin/sedo
.
You will need to make sure that ~/.cargo/bin
is on your PATH
.
bash
make install
```txt sedo 0.2.2 Run a command with environment variables set from values in a 1Password item.
Environment values are set based on entries in a section called "environment".
Usage: sedo [COMMAND]
Commands: completion Generates completions for a given shell run Run a given command in a sedo environment help Print this message or the help of the given subcommand(s)
Options: -h, --help Print help -V, --version Print version ```
```text Run a given command in a sedo environment
Usage: sedo run [OPTIONS] [COMMAND]...
Arguments: [COMMAND]... The command to run
Options:
--config
Sample config ~/.config/sedo/conf.toml
:
```toml [sedo] defaultenv = "git" oppath = "/usr/local/bin/op"
[[sedo.environments]] name = "git" signinaddress = "my.1password.com" [[sedo.environments.items]] # GitLab vaultid = "1234567890asdfghjklqwertyu" itemid = "uytrewqlkjhgfdsa0987654321" [[sedo.environments.items]] # GitHub vaultid = "1234567890asdfghjklqwertyu" itemid = "asdfghjklqwertyuiop1234567"
[[sedo.environments]] name = "cloudflare" signinaddress = "my.1password.com" [[sedo.environments.items]] vaultid = "1234567890asdfghjklqwertyu" itemid = "7654321poiuytrewqlkjhgfdsa" ```