Skip to content

feat: fleet cli ux#100

Merged
davideast merged 2 commits intomainfrom
fleet-cli-ux
Feb 26, 2026
Merged

feat: fleet cli ux#100
davideast merged 2 commits intomainfrom
fleet-cli-ux

Conversation

@davideast
Copy link
Collaborator

Overhauls the @google/jules-fleet CLI with an event-driven rendering architecture, an interactive init wizard, and a conflict-resistant file structure.

Init Wizard (jules-fleet init)

  • Interactive mode (TTY): Guided @clack/prompts wizard — repo detection, auth selection, secrets upload, confirmation
  • Non-interactive mode (--non-interactive): All inputs via flags/env vars with actionable errors for missing values
  • Dry run (--dry-run): Preview files without creating a PR
  • Secrets upload: Optional upload of JULES_API_KEY and GitHub App credentials to GitHub Actions secrets via NaCl sealed-box encryption

New flags: --non-interactive, --dry-run, --auth, --app-id, --installation-id, --upload-secrets

Event-Driven Rendering

  • Typed event system with per-domain event files (events/init.ts, events/merge.ts, etc.)
  • FleetEmitter function replaces direct logging in all handlers
  • RenderContext abstraction decouples domain logic from output format

Bug Fix: Init All-Files-Exist Guard

  • jules-fleet init on an already-initialized repo now returns a clear ALREADY_INITIALIZED error with a suggestion to use configure instead, rather than failing with a cryptic GitHub API error

Architecture

shared/
├── events/
│   ├── init.ts          # 16 event types
│   ├── configure.ts     # 6 event types
│   ├── analyze.ts       # 8 event types
│   ├── dispatch.ts      # 7 event types
│   ├── merge.ts         # 18 event types
│   └── error.ts         # 1 event type
├── ui/
│   ├── spec.ts          # FleetRenderer + RenderContext interfaces
│   ├── interactive.ts   # Thin shell → delegates to render/*
│   ├── plain.ts         # Thin shell → delegates to render/*
│   └── render/
│       ├── init.ts      # Domain-specific render function
│       ├── configure.ts
│       ├── analyze.ts
│       ├── dispatch.ts
│       ├── merge.ts
│       └── error.ts
init/
├── wizard/
│   ├── types.ts         # InitWizardResult, InitArgs
│   ├── interactive.ts   # @clack/prompts wizard flow
│   ├── headless.ts      # Flag/env validation for CI/agents
│   └── index.ts         # Barrel re-exports
├── ops/
│   └── upload-secrets.ts # NaCl encryption + GitHub Secrets API

@davideast davideast changed the title Fleet cli ux feat: fleet cli ux Feb 26, 2026
@davideast davideast merged commit 6ab64ed into main Feb 26, 2026
3 checks passed
@davideast davideast deleted the fleet-cli-ux branch February 26, 2026 11:53
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.

1 participant