Skip to content

Commit 6cbe45f

Browse files
authored
docs: improve README first contact (#27)
1 parent 4015b0b commit 6cbe45f

1 file changed

Lines changed: 86 additions & 10 deletions

File tree

README.md

Lines changed: 86 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,104 @@
22

33
Run a command inside a small, explicit profile.
44

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.
78

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
1261

1362
Command routing is based on the first command token:
1463

1564
- `runseal <cmd>` runs an external command inside the profile.
1665
- `runseal :<cmd>` runs a profile wrapper.
1766
- `runseal @<cmd>` runs a read-only runseal internal command.
1867

19-
## Usage
68+
For example:
2069

2170
```bash
22-
runseal --profile ./runseal.toml bash -- -lc 'echo "$RUNSEAL_PROFILE_PATH"'
71+
runseal --profile ./runseal.toml bash -lc 'echo "$RUNSEAL_PROFILE_PATH"'
2372
```
2473

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+
25103
## Install
26104

27105
Unix:
@@ -188,8 +266,6 @@ Internal commands are read-only and do not run profile injections.
188266
- `@wrappers` lists the effective wrappers visible to the current profile.
189267
- `@which :<name>` prints the wrapper file that `:<name>` resolves to.
190268

191-
Use `runseal profile` without `@` to run an external command named `profile`.
192-
193269
YAML and JSON profiles use the same structure:
194270

195271
```yaml

0 commit comments

Comments
 (0)