Skip to content

Commit 560e817

Browse files
Polish sandbox process UX and remove skills command
1 parent f19daba commit 560e817

9 files changed

Lines changed: 165 additions & 142 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ private helper, test-only — is **not** a shared surface, so skip the mesh for
5353
cmd/
5454
auth/ login, logout, whoami commands
5555
projects/ projects subcommands (list, get, delete)
56-
skills/ skills subcommands (catalog, purchased)
5756
root/ app wiring, Before hook, default action
5857
internal/
5958
api/ resty client, types, all API methods
6059
config/ token storage (~/.createos/.token)
6160
intro/ ASCII banner
62-
ui/ interactive TUI components (skills catalog)
61+
ui/ interactive TUI components
6362
main.go entry point — error display only
6463
```
6564

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Your intelligent infrastructure CLI
1111
```
1212

13-
The official command-line interface for [CreateOS](https://createos.nodeops.network?utm_source=createos-cli) — manage your projects and skills from the terminal.
13+
The official command-line interface for [CreateOS](https://createos.nodeops.network?utm_source=createos-cli) — manage your projects from the terminal.
1414

1515
## Installation
1616

@@ -338,7 +338,7 @@ Use `sandbox exec` for quick non-interactive one-shot commands. Use `sandbox she
338338
| `createos sandbox process start <sb> -- <cmd>` | Start a managed command and print its process ID |
339339
| `createos sandbox process shell <sb>` | Start a persistent shell session that can be reattached |
340340
| `createos sandbox process attach <sb> <proc>` | Reconnect to process output or a shell session |
341-
| `createos sandbox process attach <sb>` | Pick a running shell session and attach/switch to it |
341+
| `createos sandbox process attach <sb>` | Pick a running process or shell session and attach to it |
342342
| `createos sandbox process list <sb>` | List managed processes and shell sessions |
343343
| `createos sandbox process get <sb> <proc>` | Show details for one managed process |
344344
| `createos sandbox process input <sb> <proc>` | Write input to a process or shell session |
@@ -348,7 +348,7 @@ Use `sandbox exec` for quick non-interactive one-shot commands. Use `sandbox she
348348
| `createos sandbox process wait <sb> <proc>` | Wait for a managed process to exit |
349349
| `createos sandbox process stop <sb> <proc>` | Stop a process and anything it started |
350350

351-
Managed shell attach shortcuts are fixed: `Ctrl-]` detaches, `Ctrl-N` creates a new shell and switches to it, and `Ctrl-P` picks another running shell session.
351+
Interactive attach without a process ID shows running managed processes. Pick a PTY shell for an interactive terminal, or pick a pipe process to follow its stdout/stderr output. Managed shell shortcuts are fixed: `Ctrl-]` detaches, `Ctrl-N` creates a new shell and switches to it, and `Ctrl-P` opens the process picker.
352352

353353
**Sandbox sub-resource commands:**
354354

@@ -386,13 +386,6 @@ Managed shell attach shortcuts are fixed: `Ctrl-]` detaches, `Ctrl-N` creates a
386386
| `createos webhooks suspend` | Suspend a webhook endpoint |
387387
| `createos webhooks resume` | Resume a suspended webhook endpoint|
388388

389-
### Skills
390-
391-
| Command | Description |
392-
| --------------------------- | -------------------------- |
393-
| `createos skills catalog` | Browse the skills catalog |
394-
| `createos skills purchased` | List your purchased skills |
395-
396389
### Quick Actions
397390

398391
| Command | Description |
@@ -520,15 +513,15 @@ createos sandbox process run my-box -- npm test
520513
createos sandbox process start my-box -- python -m http.server 8000
521514
createos sandbox process shell my-box
522515
createos sandbox process attach my-box proc_abc123
523-
createos sandbox process attach my-box # pick a running shell session
516+
createos sandbox process attach my-box # pick a running process or shell session
524517
createos sandbox process ps my-box
525518
createos sandbox process input my-box proc_abc123 --text "hello\n"
526519
createos sandbox process signal my-box proc_abc123 SIGINT
527520
createos sandbox process wait my-box proc_abc123 --all
528521
createos sandbox process stop my-box proc_abc123 --grace 1s
529522
# Inside a managed shell session, the fixed bottom bar shows active shortcuts.
530523
# detach closes the local attach; new creates a shell and switches;
531-
# switch picks another shell; `exit` closes the current shell.
524+
# switch opens the process picker; `exit` closes the current shell.
532525
createos sandbox push my-box ./script.py /root/script.py
533526
createos sandbox pull my-box /root/output.csv ./output.csv
534527
createos sandbox tunnel my-box --local 8080 --remote 8000
@@ -638,7 +631,7 @@ createos environments list --project <id> -o json
638631
| `--output, -o <fmt>` | Output format: `json` or `table` (default). Auto-json when piped. |
639632
| `--debug, -d` | Print HTTP request/response details (token is masked) |
640633
| `--api-url` | Override the API base URL |
641-
| `--sandbox-api-url` | Override the sandbox (fc-spawn) base URL |
634+
| `--sandbox-api-url` | Override the sandbox API base URL |
642635
| `--sandbox-gateway` | SSH gateway address (`host:port`) used by `sandbox shell --ssh` |
643636

644637
## Security

cmd/ask/agent.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Use the `bash` tool to run `createos` commands on behalf of the user. Always run
2323
- `createos vms` — Deploy, list, get, resize, ssh, reboot, terminate VM instances (`--vm <id>`)
2424
- `createos oauth-clients` — List, create, get instructions, delete OAuth clients (`--client <id>`)
2525
- `createos me` — List and revoke OAuth consents (`--client <id>`)
26-
- `createos skills` — Browse and list purchased skills
2726
- `createos init` — Link the current directory to a project
2827
- `createos status` — Show a project's health and deployment status
2928
- `createos open` — Open a project's live URL in the browser

cmd/root/root.go

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/NodeOps-app/createos-cli/cmd/projects"
2323
"github.com/NodeOps-app/createos-cli/cmd/sandbox"
2424
"github.com/NodeOps-app/createos-cli/cmd/scale"
25-
"github.com/NodeOps-app/createos-cli/cmd/skills"
2625
"github.com/NodeOps-app/createos-cli/cmd/status"
2726
"github.com/NodeOps-app/createos-cli/cmd/templates"
2827
"github.com/NodeOps-app/createos-cli/cmd/upgrade"
@@ -62,7 +61,7 @@ func NewApp() *cli.App {
6261
},
6362
&cli.StringFlag{
6463
Name: "sandbox-api-url",
65-
Usage: "Override the sandbox (fc-spawn) base URL",
64+
Usage: "Override the sandbox API base URL",
6665
EnvVars: []string{"CREATEOS_SANDBOX_URL"},
6766
Value: api.DefaultSandboxBaseURL,
6867
},
@@ -182,7 +181,6 @@ func NewApp() *cli.App {
182181
fmt.Println(" projects Manage projects")
183182
fmt.Println(" sandbox Manage sandboxes")
184183
fmt.Println(" scale Adjust replicas and resources")
185-
fmt.Println(" skills Manage skills")
186184
fmt.Println(" status Show project health and deployment status")
187185
fmt.Println(" templates Browse and scaffold from project templates")
188186
fmt.Println(" vms Manage VM terminal instances")
@@ -219,7 +217,6 @@ func NewApp() *cli.App {
219217
projects.NewProjectsCommand(),
220218
sandbox.NewSandboxCommand(),
221219
scale.NewScaleCommand(),
222-
skills.NewSkillsCommand(),
223220
status.NewStatusCommand(),
224221
templates.NewTemplatesCommand(),
225222
upgrade.NewUpgradeCommand(),
@@ -230,10 +227,38 @@ func NewApp() *cli.App {
230227
versioncmd.NewVersionCommand(),
231228
},
232229
}
230+
installTrailingHelpGuards(app.Commands)
233231

234232
return app
235233
}
236234

235+
func installTrailingHelpGuards(commands []*cli.Command) {
236+
for _, cmd := range commands {
237+
if cmd == nil {
238+
continue
239+
}
240+
if cmd.Action != nil {
241+
original := cmd.Action
242+
cmd.Action = func(c *cli.Context) error {
243+
if argsRequestHelp(c) {
244+
return cli.ShowSubcommandHelp(c)
245+
}
246+
return original(c)
247+
}
248+
}
249+
installTrailingHelpGuards(cmd.Subcommands)
250+
}
251+
}
252+
253+
func argsRequestHelp(c *cli.Context) bool {
254+
for _, arg := range c.Args().Slice() {
255+
if arg == "-h" || arg == "--help" || arg == "help" {
256+
return true
257+
}
258+
}
259+
return false
260+
}
261+
237262
// refreshOAuthSession exchanges the session's refresh token for a new
238263
// access token, updates the session in place, and persists it to
239264
// ~/.createos/.oauth. It returns the new access token. This is shared by

cmd/sandbox/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func newCreateCommand() *cli.Command {
1919
Aliases: []string{"c"},
2020
Usage: "Create a new sandbox",
2121
ArgsUsage: " ",
22-
Description: `Create a new sandbox on fc-spawn.
22+
Description: `Create a new sandbox.
2323
2424
Examples:
2525
# Smallest possible sandbox

0 commit comments

Comments
 (0)