Skip to content

feat: add CLI with admin install/uninstall/analyze subcommands - #141

Closed
ralphbean wants to merge 13 commits into
mainfrom
agent-admin-cli-subcommands
Closed

feat: add CLI with admin install/uninstall/analyze subcommands#141
ralphbean wants to merge 13 commits into
mainfrom
agent-admin-cli-subcommands

Conversation

@ralphbean

Copy link
Copy Markdown
Member

Summary

  • Adds Cobra-based root CLI command with version support
  • Implements fullsend admin {install,uninstall,analyze} <org> subcommands
  • Layer-based installation model with forge-agnostic client interface
  • Token resolution from GH_TOKEN, GITHUB_TOKEN, or gh CLI
  • Org name validation, dry-run mode, confirmation prompts
  • Full test coverage for command structure, flags, and input validation

Details

Replaces the placeholder root.go with a proper Cobra CLI and adds the admin subcommand group:

  • install: Creates GitHub Apps, discovers repos, builds layer stack (config-repo, workflows, secrets, enrollment), runs InstallAll
  • uninstall: Confirmation prompt, UninstallAll in reverse order, manual app deletion hints
  • analyze: AnalyzeAll with per-layer status reporting (installed/degraded/not installed)

All forge operations flow through the forge.Client interface, keeping the CLI forge-agnostic.

ralphbean added 13 commits April 2, 2026 03:03
Assisted-by: OpenCode claude-opus-4-6@default
Assisted-by: OpenCode claude-opus-4-6@default
Add the ui.Printer type with lipgloss-styled methods for consistent
terminal output across the CLI: banner, headers, step indicators,
key-value pairs, summary/error boxes, and PR links. Includes full
test coverage for all 12 methods.

Assisted-by: OpenCode claude-opus-4-6@default
The forge.Client interface abstracts all git forge operations, enabling
future support for GitHub, GitLab, and Forgejo.

Assisted-by: OpenCode claude-opus-4-6@default
Implements all forge.Client methods against the GitHub REST API including
repo management, file operations, secret encryption, and workflow queries.
Includes GitHub-specific types for App configuration with role-based presets.

Assisted-by: OpenCode claude-opus-4-6@default
Handles OrgConfig types, YAML marshal/unmarshal, validation, and
helper methods for accessing enabled repos and agent slugs.

Assisted-by: OpenCode claude-opus-4-6@default
Layers represent discrete installation concerns processed in order for
install, reverse order for uninstall, and assessed individually for analyze.

Assisted-by: OpenCode claude-opus-4-6@default
Handles creation, configuration, and teardown of the org-level
.fullsend configuration repository. The layer creates the repo
(private or public based on org capability), writes config.yaml,
and provides analysis of existing installation state.

Assisted-by: OpenCode claude-opus-4-6@default
Manages reusable agent dispatch workflow, onboarding workflow, and
CODEOWNERS in the .fullsend config repo.

Assisted-by: OpenCode claude-opus-4-6@default
Stores agent app private keys as repo secrets and app IDs as repo
variables in the .fullsend config repo.

Assisted-by: OpenCode claude-opus-4-6@default
Creates enrollment PRs with shim workflow files for enabled repos
that are not yet connected to the fullsend agent pipeline.

Assisted-by: OpenCode claude-opus-4-6@default
Handles creating and installing per-role GitHub Apps using the
manifest flow, with support for reusing existing apps.

Assisted-by: OpenCode claude-opus-4-6@default
Implements fullsend admin {install,uninstall,analyze} <org> with
layer-based installation model and forge-agnostic client interface.

- Root command with Cobra, version support, and silence flags
- Admin subcommand grouping install, uninstall, and analyze
- Install: app setup, repo discovery, layer stack creation and execution
- Uninstall: confirmation prompt, layer teardown, manual cleanup hints
- Analyze: layer-by-layer status assessment with actionable reporting
- Token resolution from GH_TOKEN, GITHUB_TOKEN, or gh CLI
- Org name validation
- Dry-run mode for install preview

Assisted-by: OpenCode claude-opus-4-6@default
@ralphbean

Copy link
Copy Markdown
Member Author

Closing this in favor of #142

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