spacelift-io / spacectl

Spacelift client and CLI
MIT License
131 stars 35 forks source link

Feature request: `spacectl browse` to open current stack in browser #191

Closed alexjurkiewicz closed 12 months ago

alexjurkiewicz commented 12 months ago

I use hub a lot, and a favourite feature is git browse, to open the current repo in my web browser. I'd like a similar feature for spacectl. Running spacectl browse should open the current stack in a web browser.

It can identify the current stack by:

  1. Repository name matches
  2. If required, project root matches (eg for monorepos)
  3. If there are still many matching stacks, either open the browser to show all matching stacks in a filtered stack listing, or ask the user in a web terminal to select one
tomasmik commented 12 months ago

Doesn't spacectl stack open already do that?

➜  spacectl stack open --help
NAME:
   spacectl stack open - Open a stack in your browser

USAGE:
   spacectl stack open [command options] COMMAND

CATEGORY:
   Stack management

OPTIONS:
   --ignore-subdir   [Optional] Indicate whetever open command should ignore the current subdir and only use the repository to search for a stack (default: false)
   --current-branch  [Optional] Indicate whetever to search a stack by the current branch you're on (default: false)
   --count value     [Optional] Indicate the maximum count of elements returned when searching stacks (default: 30)
tomasmik commented 12 months ago

Also --id parameter in all stack commands is optional and can be inferred by the same logic

   --id ID               [Optional] User-facing ID (slug) of the stack, if not provided stack search is used lookup the stack ID by the current directory and repository name
alexjurkiewicz commented 12 months ago

Wow, I totally missed that, thanks! 😱