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

Kp/adds root pulumi ai command #13808

Merged
merged 4 commits into from
Sep 6, 2023
Merged

Kp/adds root pulumi ai command #13808

merged 4 commits into from
Sep 6, 2023

Conversation

kpitzen
Copy link
Contributor

@kpitzen kpitzen commented Aug 28, 2023

Description

This PR is intended to add the beginnings of a set of pulumi ai commands to the Pulumi CLI. The first implementation is relatively straightforward - we want to be able to open the Pulumi AI app from the CLI while providing a simple set of operations for users - pre-filling the AI prompt, and optionally not running that prompt when the page is opened. The CLI should open the appropriate URL in the user's default browser, and the app should take over from there.

This was implemented as a subcommand for pulumi ai as we intend to add more features both as siblings and at the parent pulumi ai command in the future, as this current functionality does not represent the "final default" experience we'd like users to have when running pulumi ai.

Fixes https://github.com/pulumi/pulumi.ai/issues/126

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Aug 28, 2023

Changelog

[uncommitted] (2023-08-30)

Features

  • [cli] Adds Pulumi AI and Pulumi AI Web commands
    #13808

@kpitzen kpitzen marked this pull request as ready for review August 29, 2023 16:32
@abhinav
Copy link
Contributor

abhinav commented Aug 30, 2023

@kpitzen a PR description, related issues, and other information would be appreciated.

@kpitzen kpitzen requested review from justinvp and removed request for abhinav August 31, 2023 19:34
Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

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

One question about subcommand vs. prompt. LGTM otherwise.

},
),
}
cmd.AddCommand(newAIWebCommand())
Copy link
Member

Choose a reason for hiding this comment

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

Are we still planning to rework this into a flag rather than subcommand?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so for this specific command, no. I wanted to keep the interface here as simple as possible, and making pulumi ai behave entirely differently between its future state (pprint/tui) and when --web --prompt 'some-ai-prompt' are provided feels... not ideal from a UX perspective. I'd rather we separate its interface from the above pulumi ai command. The other commands, like in org search are purely a boolean flag which doesn't modify the underlying interface so simply passing --web makes sense there.

@kpitzen kpitzen added this pull request to the merge queue Sep 5, 2023
Merged via the queue into master with commit 00e8fb6 Sep 6, 2023
44 checks passed
@kpitzen kpitzen deleted the KP/AddsRootPulumiAICommand branch September 6, 2023 00:01
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.

None yet

5 participants