Developer CLI for the Javabin platform, written in Go.
main.go Entrypoint — calls cmd.Execute()
cmd/
root.go Cobra root command, registers subcommands
init.go Interactive app scaffolding wizard
register.go Interactive team registration wizard
status.go Project status (costs, ECS services)
whoami.go Show AWS + GitHub identity
internal/
aws/aws.go AWS SDK helpers (STS, Cost Explorer, ECS)
config/config.go Config directory (~/.javabin/)
github/github.go GitHub API client (token, branches, PRs)
github.com/spf13/cobra— CLI frameworkgithub.com/aws/aws-sdk-go-v2— AWS SDK (STS, Cost Explorer, ECS)- Go 1.22+
- GitHub: Uses
gh auth token(gh CLI) first, then falls back toGITHUB_TOKEN/GH_TOKENenvironment variables - AWS: Standard credential chain via
aws-sdk-go-v2/config(env vars,~/.aws/credentials, SSO). Region defaults toeu-central-1. - Cognito: TODO — will add device flow auth against internal Cognito pool when Identity (Phase 1) is implemented. Token will be cached at
~/.javabin/token.
| Command | What it does |
|---|---|
javabin register-team |
Interactive wizard — prompts for team name, description, members (google + github), and budget; creates a team registration PR against javaBin/registry (teams/{name}.yaml) |
javabin init |
Interactive wizard — scaffolds a new app repo from javaBin/app-template, writes app.yaml, Dockerfile, and deploy workflow, then prints next steps for adding the repo to a GitHub team |
javabin status |
Shows month-to-date cost (Cost Explorer) and ECS service status. Infers project from git remote or accepts --project flag |
javabin whoami |
Shows AWS identity (STS GetCallerIdentity) and GitHub user (gh API) |
go build -o javabin .
./javabin --helpNo tests yet. When adding tests, use standard go test ./....
Releases are built with GoReleaser on semver tags. Binaries go to GitHub Releases and the Homebrew tap (javaBin/tap/javabin).
- No deploy/plan/apply commands — those run exclusively in CI. The CLI is for registration and status only.
- No infrastructure management — use
app.yamland let the platform handle it. - GitHub API directly (not
go-githublibrary) — keeps dependencies minimal for a simple REST client.
- javaBin/platform — infrastructure the CLI queries
- javaBin/registry — where
javabin register-teamcreates PRs