|
2 | 2 |
|
3 | 3 | Run a command inside a small, explicit profile. |
4 | 4 |
|
5 | | -`runseal` currently supports three profile capabilities plus explicit wrapper |
6 | | -and internal command namespaces: |
| 5 | +Use `runseal` when a repository needs explicit local resources, named wrappers, |
| 6 | +and env/argv/symlink setup without becoming a task runner, secret manager, or |
| 7 | +deployment orchestrator. |
7 | 8 |
|
8 | | -- `env`: export environment variables and ordered env operations. |
9 | | -- `symlink`: create symlinks for the command lifecycle, then clean them up. |
10 | | -- `argv`: inject fixed arguments after a matching child command token. |
11 | | -- `resource://...`: resolve profile-local resource paths inside env values. |
| 9 | +It is designed for repos that carry private local paths such as `.local`, |
| 10 | +kubeconfig files, SSH config, tool directories, or wrapper scripts, and need |
| 11 | +one command to expose those paths to child tools predictably. |
| 12 | + |
| 13 | +## 30-second Example |
| 14 | + |
| 15 | +Declare profile-local resources: |
| 16 | + |
| 17 | +```toml |
| 18 | +[resources] |
| 19 | +root = ".local" |
| 20 | + |
| 21 | +[[injections]] |
| 22 | +type = "env" |
| 23 | + |
| 24 | +[injections.vars] |
| 25 | +APP_SSH_CONFIG = "resource://ssh/config" |
| 26 | +APP_SECRET_DIR = "resource://secrets" |
| 27 | +``` |
| 28 | + |
| 29 | +Inspect what runseal resolved: |
| 30 | + |
| 31 | +```bash |
| 32 | +runseal @profile |
| 33 | +runseal @resources |
| 34 | +runseal @resolve resource://ssh/config |
| 35 | +``` |
| 36 | + |
| 37 | +Run an external command or a named wrapper inside the profile: |
| 38 | + |
| 39 | +```bash |
| 40 | +runseal bash -lc 'echo "$APP_SSH_CONFIG"' |
| 41 | +runseal :ssh-run host |
| 42 | +``` |
| 43 | + |
| 44 | +## Inspect What Runseal Sees |
| 45 | + |
| 46 | +Internal commands are read-only and do not run profile injections: |
| 47 | + |
| 48 | +```bash |
| 49 | +runseal @profile |
| 50 | +runseal @resources |
| 51 | +runseal @resolve resource:// resource://ssh/config |
| 52 | +runseal @wrappers |
| 53 | +runseal @which :ssh-run |
| 54 | +``` |
| 55 | + |
| 56 | +These commands answer the first debugging questions: which profile was selected, |
| 57 | +where resources resolve, which wrappers are visible, and which wrapper file a |
| 58 | +`:name` command will execute. |
| 59 | + |
| 60 | +## Command Routing |
12 | 61 |
|
13 | 62 | Command routing is based on the first command token: |
14 | 63 |
|
15 | 64 | - `runseal <cmd>` runs an external command inside the profile. |
16 | 65 | - `runseal :<cmd>` runs a profile wrapper. |
17 | 66 | - `runseal @<cmd>` runs a read-only runseal internal command. |
18 | 67 |
|
19 | | -## Usage |
| 68 | +For example: |
20 | 69 |
|
21 | 70 | ```bash |
22 | | -runseal --profile ./runseal.toml bash -- -lc 'echo "$RUNSEAL_PROFILE_PATH"' |
| 71 | +runseal --profile ./runseal.toml bash -lc 'echo "$RUNSEAL_PROFILE_PATH"' |
23 | 72 | ``` |
24 | 73 |
|
| 74 | +Use `runseal profile` without `@` to run an external command named `profile`. |
| 75 | + |
| 76 | +## Fit |
| 77 | + |
| 78 | +Fits well: |
| 79 | + |
| 80 | +- repo-local private resources |
| 81 | +- explicit one-command execution environments |
| 82 | +- named wrappers with discoverability |
| 83 | +- passing profile-scoped paths to tools like `ssh`, `kubectl`, `uv`, or |
| 84 | + `terraform` |
| 85 | + |
| 86 | +Not trying to be: |
| 87 | + |
| 88 | +- a task dependency graph |
| 89 | +- a secret lifecycle manager |
| 90 | +- a deployment orchestrator |
| 91 | +- a shell auto-activation tool |
| 92 | + |
| 93 | +## Capabilities |
| 94 | + |
| 95 | +`runseal` currently supports three profile capabilities plus explicit wrapper |
| 96 | +and internal command namespaces: |
| 97 | + |
| 98 | +- `env`: export environment variables and ordered env operations. |
| 99 | +- `symlink`: create symlinks for the command lifecycle, then clean them up. |
| 100 | +- `argv`: inject fixed arguments after a matching child command token. |
| 101 | +- `resource://...`: resolve profile-local resource paths inside env values. |
| 102 | + |
25 | 103 | ## Install |
26 | 104 |
|
27 | 105 | Unix: |
@@ -188,8 +266,6 @@ Internal commands are read-only and do not run profile injections. |
188 | 266 | - `@wrappers` lists the effective wrappers visible to the current profile. |
189 | 267 | - `@which :<name>` prints the wrapper file that `:<name>` resolves to. |
190 | 268 |
|
191 | | -Use `runseal profile` without `@` to run an external command named `profile`. |
192 | | - |
193 | 269 | YAML and JSON profiles use the same structure: |
194 | 270 |
|
195 | 271 | ```yaml |
|
0 commit comments