feat(provider): add Google provider setup wizard with GCP automation#33
Open
qasim-nylas wants to merge 2 commits intomainfrom
Open
feat(provider): add Google provider setup wizard with GCP automation#33qasim-nylas wants to merge 2 commits intomainfrom
qasim-nylas wants to merge 2 commits intomainfrom
Conversation
Implement 'nylas provider setup google' — an interactive wizard that automates Google Cloud Platform integration with Nylas. Handles GCP project creation, API enablement, IAM configuration, Pub/Sub setup, and Nylas connector creation. - Add 3-phase wizard: automated GCP setup, browser OAuth config, Nylas connection - Add resume/checkpoint support with 24h expiry state persistence - Add 'nylas provider status google' verification command - Add GCP adapter layer (cloudresourcemanager, serviceusage, iam, pubsub) - Add comprehensive tests (75.9% CLI provider coverage, 100% mock coverage)
Collaborator
Author
|
Implemented all requested review fixes in commit 376f102. ✅ Fixed finding 1: project ID validation
✅ Fixed finding 2: connector verification by wrong key
✅ Fixed finding 3: resume flow can skip credentials incorrectly
Additional hardening
Verification
|
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
Implements
nylas provider setup google— an interactive wizard that fully automates Google Cloud Platform integration with Nylas. Reduces a 30+ minute manual setup process to a single guided command.Interactive wizard demo
Resume support — if interrupted mid-setup, re-running picks up where you left off:
Status command — verify everything is configured:
What it does
The wizard runs in three phases:
Phase 1 — Automated GCP Setup
support@nylas.comas project owner (with user confirmation)Phase 2 — Guided Browser Configuration
term.ReadPassword)Phase 3 — Nylas Connection
Additional features
~/.config/nylas/provider-setup-state.jsonafter each step. If interrupted, re-running the command offers to resume from where it left off. State expires after 24 hours.--freshflag to start over.nylas provider status google --project-id <id>checks the state of all GCP resources, IAM, and Nylas connector with a ✓/✗/? table.Architecture
Follows the project's hexagonal architecture:
internal/domain/gcloud.gointernal/ports/gcloud.goGCPClientinterface,IAMPolicyhelpersinternal/adapters/gcp/internal/cli/provider/Auth approach: Google Application Default Credentials (ADC) via
gcloud auth application-default login. The Google Go SDK picks up ADC automatically — zero token management code.Files added/modified
New files (25):
internal/domain/gcloud.go— Domain types and constantsinternal/ports/gcloud.go— GCPClient interface + IAMPolicy typesinternal/adapters/gcp/— client.go, projects.go, iam.go, pubsub.go, mock.gointernal/cli/provider/— provider.go, setup.go, google_cmd.go, google_setup.go, google_steps.go, google_state.go, google_helpers.go, status.goModified files (4):
cmd/nylas/main.go— Register provider commandinternal/domain/admin.go— AddTopicNameto ConnectorSettingsgo.mod/go.sum— Addgoogle.golang.org/apiSDKFlags
Test plan
go test ./internal/adapters/gcp/... ./internal/cli/provider/... ./internal/ports/... ./internal/domain/...)golangci-lint run)go test -race)make security)nylas provider setup google --helpshows flagsnylas provider status google --project-id <id>shows status table