Skip to content

feat: restructure CLI to object-action pattern#761

Merged
coffee-cup merged 9 commits intomasterfrom
jr/object-action-cli-structure
Jan 14, 2026
Merged

feat: restructure CLI to object-action pattern#761
coffee-cup merged 9 commits intomasterfrom
jr/object-action-cli-structure

Conversation

@coffee-cup
Copy link
Copy Markdown
Contributor

Migrates CLI to object action --flags pattern (like kubectl/docker) while maintaining full backwards compatibility.

  • service logs, service restart, service scale - delegates to existing commands
  • project list, project link, project delete - new project object
  • environment link - explicit link subcommand
  • variable list, variable set KEY=VALUE, variable delete KEY - restructured with subcommands
  • New VariableDelete GraphQL mutation

All existing root commands (logs, list, delete, variables, variables --set, etc.) continue to work unchanged.

- Add service subcommands: logs, restart, scale (delegates to existing commands)
- Add project object with list, link, delete subcommands
- Add environment link subcommand
- Restructure variable command with list, set, delete subcommands
- Add VariableDelete GraphQL mutation
- All existing commands continue to work via aliases for backwards compat
@coffee-cup coffee-cup added the release/minor Author minor release label Jan 13, 2026
@coffee-cup coffee-cup force-pushed the jr/object-action-cli-structure branch from ccb242c to c85d6a5 Compare January 13, 2026 22:41
# Conflicts:
#	src/commands/environment.rs
… order

- Add ServiceContext helper to dedupe project/env/service resolution
- delete_variable now requires service (consistent w/ list/set)
- scale.rs: position-based arg check prevents false triggers
- environment link: output after successful write()
- service.rs: remove dead code in link_command (duplicate args.service check)
- service.rs: add redeploy subcommand routing
- variable.rs: accept string for set cmd to support --stdin with key-only
- main.rs: add more CLI parsing tests
- service link: restore case-insensitive name/id matching
- variable set: support multiple KEY=val args
- use create_spinner_if helper for json mode
- add tests for multi-var set
Introduce FetchLogsParams struct to reduce argument count
@coffee-cup coffee-cup merged commit 7983dab into master Jan 14, 2026
6 checks passed
@coffee-cup coffee-cup deleted the jr/object-action-cli-structure branch January 14, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/minor Author minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant