Commit 23990b3
authored
feat: first-run UX with built-in agent profiles (#10)
* feat: Add first-run UX with built-in agent profiles
When a known agent (claude, opencode, etc.) is run without a template,
prompt the user to apply recommended filesystem defaults. Each agent is
a self-contained file under internal/profiles/agents/ that
self-registers via init(), so adding a new agent requires zero changes
elsewhere.
* feat: add toolchain profiles and trim AdHocCommands to basic unix utilities
Move toolchain commands (npm, uv, cargo, docker, etc.) out of the
ad-hoc command set into their own profiles under internal/profiles/toolchains/.
Each toolchain is a self-contained file with filesystem paths from
the agent-safehouse analysis. Toolchain profiles are not merged with
BaseProfile() since they only need their own config/cache directories.
* feat: improve first-run UX, add --template composability, update README
First-run prompt redesign:
- Explain that the command is being sandboxed and a profile is available
- Show full allow/deny paths with ~/ prefixes for clarity
- Add [e] Edit first option with $EDITOR and re-validate loop
- Use [s] Skip / [n] Don't ask again instead of [n] / [never]
- Add (recommended) and (restrictive) hints on options
- ANSI colors when output is a terminal, respects NO_COLOR
Template composability:
- --template now accepts comma-separated names (e.g. --template claude,python)
- Each name resolves: saved template on disk > built-in profile
- templates list shows combo usage example
README: add Agent profiles section with first-run and --template examples.
* docs: fix README prompt example to match current UX
Update paths to show ~/ prefix and use current option keys
([s] Skip, [n] Don't ask again, (recommended) hint).
* feat: add --auto-profile flag for non-interactive profile selection
When set, silently applies the built-in profile (or saved template) for
known agents without prompting. Useful for CI/scripts where there is no
terminal. In non-interactive mode, a hint about --auto-profile is now
shown when a built-in profile is available but not applied.
* refactor: rename --template to --profile, templates subcommand to profiles
Unify terminology: everything is now "profiles" in the CLI and user-facing
messages. The old --template flag and "templates" subcommand are kept as
hidden aliases for backwards compatibility.
* fix: resolve lint errors (errcheck, gosec, gofumpt, unused)
* feat: add macOS-specific paths to built-in profiles
Profiles previously only included XDG/Linux paths. On macOS, agents and
toolchains store config, cache, and state under ~/Library/ and /Library/
which were missing entirely.
Add runtime.GOOS == "darwin" checks to conditionally include:
- Base: keychain paths, user preferences
- Agents: Claude Desktop config, Codex plists, Cursor/Cline/Kilo VS Code
globalStorage, Goose/Gemini Library paths, Pi metadata
- Toolchains: Playwright/Cypress caches (node), JVM paths (java),
system Ruby, OrbStack/Colima/Rancher Desktop (containers)
* fix: use cross-platform terminal detection instead of Linux-only TCGETS1 parent 3925d67 commit 23990b3
File tree
37 files changed
+1869
-97
lines changed- cmd/greywall
- internal
- profiles
- agents
- toolchains
- sandbox
37 files changed
+1869
-97
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
102 | 136 | | |
103 | 137 | | |
104 | | - | |
| 138 | + | |
105 | 139 | | |
106 | 140 | | |
107 | 141 | | |
108 | 142 | | |
109 | 143 | | |
110 | | - | |
111 | | - | |
| 144 | + | |
| 145 | + | |
112 | 146 | | |
113 | | - | |
114 | | - | |
| 147 | + | |
| 148 | + | |
115 | 149 | | |
116 | | - | |
| 150 | + | |
117 | 151 | | |
118 | 152 | | |
119 | 153 | | |
| |||
0 commit comments