cli icon indicating copy to clipboard operation
cli copied to clipboard

Integrate `cupid` in the CLI

Open arjungarg07 opened this issue 4 years ago • 17 comments

We are going to integrate app-relations-discovery functionalities into asyncapi cli which would allow users to access all the features of the library and get more work done from the terminal.

arjungarg07 avatar Aug 12 '21 03:08 arjungarg07

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 Aug 12 '21 03:08 github-actions[bot]

@arjungarg07 you definitely need to provide a description mate 😆

I know you mean asyncapi relations but others need to know more and also the capabilities we need to take into account

derberg avatar Aug 12 '21 07:08 derberg

@derberg My proposition for commands usage:

asyncapi relations --files {FILES_PATH} --plantUml  // For plantUML classDiagram syntax
asyncapi relations --files {FILES_PATH} --mermaid  // For mermaid flowchart syntax
asyncapi relations --files {FILES_PATH} --reactFlow  // For reactFlow nodes syntax

Users will provide the no. of file paths for which she wants to get the relations of in {FILES_PATH}

arjungarg07 avatar Aug 16 '21 13:08 arjungarg07

I think we can start with relations as we can refactor name easily. you might want to share your thoughts here https://github.com/asyncapi/cli/issues/37 . Just keep in mind we need to support --files and --contexts too. As for the types of outputs we need --type imho, so you have asyncapi relations --files {FILES_PATH} --type plantUML, and when you do asyncapi relations --files {FILES_PATH} you get default

Thoughts?

derberg avatar Aug 17 '21 12:08 derberg

Just keep in mind we need to support --files and --contexts too.

What role will the --contexts play here, I think relations command would be standalone and would not be affected by contexts 🤔

As for the types of outputs we need --type imho, so you have asyncapi relations --files {FILES_PATH} --type plantUML, and when you do asyncapi relations --files {FILES_PATH} you get default

Yeah, we can move forward with this 👍🏽

arjungarg07 avatar Aug 17 '21 12:08 arjungarg07

context is like a file reference, so you do not need to remember the file path

so you can create a number of contexts, called file1, file2, file3 so you can do asyncapi validate --context file1, so you should also be able to do asyncapi relations --contexts file1, file2, file3

imagine you are working on this project https://github.com/amadeus4dev/amadeus-async-flight-status. You work with it every day, you have 2 different AsyncAPI files there, would you like to pass filepath every single time?

derberg avatar Aug 17 '21 13:08 derberg

Got it! Super cool, so we have to support --files and --contexts too.

arjungarg07 avatar Aug 17 '21 14:08 arjungarg07

would be cool that once we render in terminal the marmaid and plantuml outputs, we also render a clickable URL, so user can open it up in respective editors. That would be nifty. Also explore available Ink components, maybe there is one already that can nicely display code snippets, would be useful for the output.

derberg avatar Aug 23 '21 09:08 derberg

This is something we can check for code snippets - https://github.com/vsashyn/ink-syntax-highlight This is for clickable URL - https://github.com/sindresorhus/ink-link

Souvikns avatar Aug 23 '21 10:08 Souvikns

Since the migration to Oclif is completed, I have started working on this.

arjungarg07 avatar Nov 11 '21 05:11 arjungarg07

Yeah sure go ahead, let me know if you need any help.

Souvikns avatar Nov 11 '21 05:11 Souvikns

Solution that we should consider for that issue https://github.com/asyncapi/community/issues/249 It's only an idea so please treat it as suggestion, not final approach. Feel free to comment :)

magicmatatjahu avatar Feb 01 '22 10:02 magicmatatjahu

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 Jun 02 '22 00:06 github-actions[bot]

it is still active, PR is pretty advanced, you can do it @arjungarg07 💪🏼

derberg avatar Jun 07 '22 11:06 derberg

@derberg am waiting for the structure of generate command to be implemented and finalized by https://github.com/asyncapi/cli/pull/221

arjungarg07 avatar Jun 07 '22 12:06 arjungarg07

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 06 '22 00:10 github-actions[bot]

@arjungarg07 generate fromTemplate is there, so you can add cupid now 😉

derberg avatar Oct 11 '22 10:10 derberg

Sure, would be integrating it soon.

arjungarg07 avatar Oct 26 '22 17:10 arjungarg07

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 Feb 24 '23 00:02 github-actions[bot]

wip https://github.com/asyncapi/cli/pull/143

derberg avatar Apr 03 '23 16:04 derberg

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 Aug 02 '23 00:08 github-actions[bot]

closing as there is no activity for very long

derberg avatar Oct 25 '23 10:10 derberg