Documentation
Using RepoGo
Env sources
An env source is a .env file on one of your environments, saved under a name (its handle). An action in a project's actions.json loads it by that name, so the secrets stay out of the repo and the same action works on every environment you use. A handle is unique across your environments: it always means the same file.
Add one#
- Open Settings → Env Sources → Add Env Source.
- Choose the environment that has the file. It has to be connected.
- Pick the
.envfile. It has to be inside your home folder. - Give it a handle, such as
api-secrets.
Settings → Env Sources lists the sources on every environment. Swipe one to pull it again or delete it.
Saving also keeps a copy on your iPhone, so you can share the secrets while that computer is off.
Use it in an action#
Name the handle in the action's envFrom. env sets plain values next to it:
{
"actions": [
{
"name": "dev",
"cmd": "bun dev",
"detach": true,
"envFrom": ["api-secrets"],
"env": { "PORT": "3000" }
}
]
}When handles name the same variable, the later one wins, and env wins over all of them.
When the action runs#
Tapping the action is the go-ahead; nothing else is asked.
- If the environment running it has the env source, it reads the file itself.
- Otherwise your iPhone reads the file from the environment that has it, or uses the copy it keeps in its Keychain when that environment is offline, and sends the values with the tap.
- A handle with neither is left out, and the action runs without it.
The environment only takes handles the action's envFrom names. The values go into the action's process only; they are never written to disk on the environment that runs it, and they pass end to end encrypted through RepoGo's relay.