cli icon indicating copy to clipboard operation
cli copied to clipboard

Unclear usage of `asyncapi start`

Open Lazzaretti opened this issue 1 year ago • 12 comments
trafficstars

Describe the bug

To me it is unclear how you use asyncapi start.

How to Reproduce

  1. Run command asyncapi
  2. you see the command explanation start Start asyncapi studio
  3. Run command asyncapi start
  4. You get a help text.
Start asyncapi studio

USAGE
  $ asyncapi start

DESCRIPTION
  Start asyncapi studio

COMMANDS
  start studio  starts a new local instance of Studio

Expected behavior

"Start asyncapi studio" - as described in the help text.

Probably related to https://github.com/asyncapi/cli/issues/551

Lazzaretti avatar Jan 25 '24 10:01 Lazzaretti

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Jan 25 '24 10:01 github-actions[bot]

Hi @Lazzaretti Totally agree with the unclear usage of asyncapi start 👍 . Actually this is gonna be included as part of new UI/UX improvements for the CLI: https://github.com/asyncapi/cli/issues/1214.

Could you please remove the "bug" label since we should consider this issue as an improvement or enhancement instead? Thank you for reporting :)

peter-rr avatar Mar 13 '24 10:03 peter-rr

Hi @peter-rr, cool that you want to change this :)

Unfortunately, I can't remove the bug label; I think this can only be done by a contributor (my name is only there because on creation, you can select "bug").

Lazzaretti avatar Mar 13 '24 19:03 Lazzaretti

@Lazzaretti I guess that can only be changed by the repository maintainers. Let me ping them.

@derberg @Souvikns @magicmatatjahu Could you change this issue's label from bug to enhancement? Thanks!

peter-rr avatar Mar 20 '24 17:03 peter-rr

@Souvikns @peter-rr I am bit confused here, do we need to start studio instead of generating this text.Start asyncapi studio ?

USAGE
  $ asyncapi start

DESCRIPTION
  Start asyncapi studio

COMMANDS
  start studio  starts a new local instance of Studio

AayushSaini101 avatar May 23 '24 09:05 AayushSaini101

@AayushSaini101 According to how it's implemented the start command currently, when we run asyncapi start we're just executing the index.ts subcommand, showing the "help" section. To start a new studio instance we need to run: asyncapi start studio -f <specFile_path>.

I agree it's not very DX friendly, though 🤔

peter-rr avatar May 23 '24 11:05 peter-rr

@AayushSaini101 According to how it's implemented the start command currently, when we run asyncapi start we're just executing the index.ts subcommand, showing the "help" section. To start a new studio instance we need to run: asyncapi start studio -f specFile_path.

I agree it's not very DX friendly, though 🤔

@peter-rr @Amzani I am willing to work on it

AayushSaini101 avatar May 23 '24 11:05 AayushSaini101

@AayushSaini101 According to how it's implemented the start command currently, when we run asyncapi start we're just executing the index.ts subcommand, showing the "help" section. To start a new studio instance we need to run: asyncapi start studio -f <specFile_path>.

I agree it's not very DX friendly, though 🤔

@peter-rr Why we cannot remove the asyncapi start command and use only asyncapi start studio, because the description of the asyncapi start is Start asyncapi studio🤔

AayushSaini101 avatar May 24 '24 10:05 AayushSaini101

@peter-rr Why we cannot remove the asyncapi start command and use only asyncapi start studio, because the description of the asyncapi start is Start asyncapi studio🤔

Yeah, that was something we already discussed on https://github.com/asyncapi/cli/issues/551. I guess the asyncapi start command was designed originally for other purposes, to "start" different processes like studio, for instance. That's why index.ts is located under start folder. But no more subcommands have been added so far, so I don't think this makes sense anymore.

I believe we should rid off this index.ts file and just keep studio.ts. Also we could rename the command as simply asyncapi studio, which would be more DX friendly from my point of view. Any thoughts on that? @Souvikns @Shurtu-gal @Amzani

peter-rr avatar May 24 '24 12:05 peter-rr

@AayushSaini101 Please take a look at my comment on this PR, maybe that change can justify the use of index.ts for asyncapi start 🤔

peter-rr avatar May 24 '24 17:05 peter-rr

We can just change the help text @peter-rr, As mentioned https://github.com/asyncapi/cli?tab=readme-ov-file#command-structure-and-patterns this command might evolve in the future depending on:

  • Do we add more sub-commands to studio, for example synchronization then it will make sense to add a studio noun, and then we will have: asyncapi studio start and asyncapi studio sync
  • Do we add an API as mentioned in https://github.com/asyncapi/cli/pull/1200, then we will have asyncapi start api

Amzani avatar Jun 03 '24 12:06 Amzani

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Oct 02 '24 00:10 github-actions[bot]