Change pinecone binary to pc, style auth redirect landing pages - #25
Conversation
…cone'y css styles
… this as the cli, also add a symlink to 'pinecone' in the brew install step so we can throw a warning about removal of 'pinecone'
pinecone binary to pc, style auth redirect landing pages
There was a problem hiding this comment.
Pull Request Overview
This PR renames the CLI command from pinecone to pc and styles the authentication redirect landing pages with improved branding and visual design. It implements backward compatibility through symlinks and deprecation warnings.
- Updates CLI command name from
pineconetopcacross all files and documentation - Enhances authentication redirect pages with custom CSS styling, colors, and Pinecone branding
- Maintains backward compatibility by creating symlinks and showing deprecation warnings
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/pc/main.go | New main entry point with deprecation warning for old command name |
| cmd/pinecone/main.go | Removed old main entry point |
| .goreleaser.yaml | Updated build configuration to use "pc" binary name with brew symlink |
| internal/pkg/cli/command/login/assets/* | Enhanced HTML templates with modern CSS styling and branding |
| internal/pkg/cli/command/login/login.go | Added SVG logo embedding and template replacement |
| internal/pkg/cli/command/root/root.go | Updated root command configuration from "pinecone" to "pc" |
| Multiple command files | Updated all command references and help text to use "pc" instead of "pinecone" |
| README.md, CONTRIBUTING.md | Updated documentation to reflect new command name |
| retention-days: 7 | ||
| compression-level: 0 | ||
| overwrite: true | ||
| tests: |
There was a problem hiding this comment.
There's not actually that much changing in these workflow files, there was just extra indention I wanted to back out.
…ing replacement, extract helper function
|
Claude finished @austin-denoble's task —— View job PR Review: Change
|
Problem
I kept the custom redirect landing pages for authentication pretty basic in the CLI. We'd like to add some branding and color to these so they pop a bit more.
We've also had requests to change the
pineconecommand topcso the user would go from callingpinecone loginto callingpc login. This requires updating how the binaries are built through goreleaser, and making sure anyone currently usingpineconeisn't immediately broken upon upgrading.Solution
Redirect Pages
Thanks @cboltt for pointing out specific spots I should be looking. Most of these styles are lifted from the management console.
redirect_succes.htmlandredirect_error.html.pinecone-logo.svgto assets and embed within the build like we do for the html pages.login.gowe add the svg via simple text replacement when rendering the HTML.pinecone->pcrenameRenaming the command name and executable took a bit of finessing. I needed to update our
.goreleaser.yamlconfig to handle building the binaries as "pc" rather than "pinecone". The goal here was to not break or change the brew installation flow, so the name "pinecone" is still how you interact with the CLI via brew..goreleaser.yamlto updateproject_nameand binary name to "pc".project_nameneeds to be updated as well because there's a limitation in goreleaseruniversal_binarieswhere it uses the project_name rather than the binary name when stitching things together, and we want to keep the naming consistent across all the executables, etc (I think).brewinstall step in.goreleaser.yamlto create a symlink of "pinecone"->"pc". This is primarily to keep this update from hard-breaking anyone that might be using the CLI already, which is maybe unlikely, but this is an easy convenience.Type of Change
Test Plan
To test locally, you'll need to pull this branch down and run goreleaser, and then run off the executable directly. It will be "pc" rather than "pinecone":
I tested locally by manually building the
pinecone.rbfile for brew, and then installing from source. This required updating thepinecone.rbfile to point to the local binary rather than remote, and updating the checksum:urlfield to local file reference:url "https://github.com/pinecone-io/cli/releases/download/v0.0.54/pc_Darwin_all.tar.gz"->url "file://#{Dir.pwd}/dist/pc_Darwin_all.tar.gz"I then tested the
pc<->pineconesymlink, and the warning output. It seems like this upgrade flow works fine from within brew, and you could test the above yourself if you wanted.For testing the auth redirect page, initiate
pc loginand take a look at the success page after you auth.