Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-227] add docs CLI command #236

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jameskim0987
Copy link

@jameskim0987 jameskim0987 commented Oct 28, 2024

Description
Implemented docs CLI command for displaying the 3 available documentation page as clickable links.

Tests
Manual testing. Output:

$ ./main docs
Here are the available documentation links:

Superchain Interop Specs
Optimism Documentation
Supersim Documentation

Additional context
N/A

Metadata
Resolves #227

@jameskim0987 jameskim0987 marked this pull request as ready for review October 28, 2024 20:27
@jameskim0987 jameskim0987 requested a review from a team as a code owner October 28, 2024 20:27
@jameskim0987 jameskim0987 changed the title [WIP][ISSUE-227] add --docs CLI flag [ISSUE-227] add --docs CLI flag Oct 28, 2024
@jameskim0987
Copy link
Author

Hi @fainashalts, this PR is ready for review.

I wasn't sure about the exact output format or the output strings so I kept them minimal to start with. Let me know if it needs to be reformatted/reworded!

Copy link
Contributor

@jakim929 jakim929 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! Mostly looks good - a few suggested changes.

Also, high level, wdyt about making this a command instead of flag? supersim docs instead of supersim --docs. Think it might be better as a command but will leave that up to you

config/cli.go Outdated Show resolved Hide resolved
config/cli.go Outdated Show resolved Hide resolved
@jameskim0987
Copy link
Author

Thank you for your contribution! Mostly looks good - a few suggested changes.

Also, high level, wdyt about making this a command instead of flag? supersim docs instead of supersim --docs. Think it might be better as a command but will leave that up to you

Thank you for the suggestions! I reflected your suggested change from docs flag to a command as it makes more sense to me as well.

Regarding exit steps after printing the links -- in addition to invoking closeApp, I have followed up with os.Exit(0) since without the exit call the app outputs supersim logs which is not necessary for the docs command.

$ ./main docs
Here are the available documentation links:

Superchain Interop Specs
Optimism Documentation
Supersim Documentation
INFO [11-01|19:32:20.788] starting supersim
WARN [11-01|19:32:20.791] err piping stderr to log file            role=anvil name=Local chain.id=900 err="read |0: file already closed"
t=2024-11-01T19:32:20-0400 lvl=crit msg="Application Failed" err="failed to start: orchestrator failed to start: l1 chain Local failed to start: failed to start anvil: context canceled\ncontext canceled"

Let me know how it looks!

@jameskim0987 jameskim0987 changed the title [ISSUE-227] add --docs CLI flag [ISSUE-227] add docs CLI command Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CLI command to display interop spec & optimism docs in Supersim flow
2 participants