Add platform integration: login, link, push, and status commands#6
Open
marwaneltoukhy wants to merge 1 commit intomainfrom
Open
Add platform integration: login, link, push, and status commands#6marwaneltoukhy wants to merge 1 commit intomainfrom
marwaneltoukhy wants to merge 1 commit intomainfrom
Conversation
Browser-based OAuth login flow (cf login) that obtains a long-lived cfk_live_ API key via PKCE and localhost callback. New commands: - cf login/logout/whoami -- authenticate with the ChipFoundry platform - cf link/unlink -- connect local projects to platform projects - cf push -- extended to create/link platform projects on first push - cf status -- extended with platform project panel, --all, --json flags New modules: api.py (PlatformAPI client), auth.py (browser OAuth flow). Updated utils.py with API key and platform project ID helpers. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cf login): Opens Cognito hosted UI, captures auth code via localhost callback with PKCE, exchanges for a long-livedcfk_live_API key stored in~/.chipfoundry-cli/config.tomlcf logout,cf whoami,cf link,cf unlinkfor authentication and project association managementcf push: On first push, prompts to create a new platform project, link to an existing one, or skip. Supports--create-project,--shuttle,--link-project,--skip-platformflags for CI/non-interactive usecf status: Shows platform project status panel (name, status, shuttle, design type, review notes),--allflag to list all projects,--jsonfor machine-readable output, graceful degradation when offlineNew files
chipfoundry_cli/api.pyPlatformAPIHTTP client -- wraps all backend REST calls with API key authchipfoundry_cli/auth.pyModified files
chipfoundry_cli/main.pychipfoundry_cli/utils.pyDependencies
Requires chipignite-backend-services#13 for the
/auth/cli/and portal OAuth callback endpoints.Test plan
cf login-- browser opens, authenticate, key saved to config.tomlcf whoami-- displays user info panelcf logout/cf logout --revoke-- removes key locally / revokes on servercf init-- remains local-only, shows platform hintcf push(first push) -- prompts to create/link/skip platform projectcf push --create-project --shuttle <slug>-- non-interactive creationcf push --skip-platform-- SFTP onlycf link/cf link --id <uuid>/cf link --name <name>-- links local projectcf unlink-- removes platform_project_id from project.jsoncf status-- shows platform panel + SFTP statuscf status --all-- lists all platform projects in tablecf status --json-- JSON outputcf status(logged out) -- graceful degradation, no crashMade with Cursor