cmd/frontcli/: CLI entrypointinternal/: implementationcmd/: command routing (kong CLI framework, 27+ commands)api/: Front API clientauth/: OAuth2 flow + keyring + certificate handlingconfig/: configuration + accounts + credentialsmarkdown/: HTML-to-Markdown converterui/: UI componentsoutput/: table rendering + time formattingerrfmt/: error formatting
bin/: build outputs
make build: compile tobin/frontclimake front -- <args>ormake frontcli: build + runmake fmt/make lint/make test/make ci: format, lint, test, full local gatemake tools: install pinned dev tools into.tools/make clean: remove bin/ and .tools/
- Formatting:
make fmt(goimports local prefixgithub.com/dedene/frontapp-cli+ gofumpt) - Output: keep stdout parseable (
--json); send human hints/progress to stderr - Linting: golangci-lint with project config
- Unit tests: stdlib
testing(files:*_test.gonext to code) - Coverage areas: conversations, credentials, config, output (table/time), API (idprefix/client), errfmt
- 7 test files total
- OAuth2: golang.org/x/oauth2 for authentication flow
- Keyring: 99designs/keyring for token storage
- Cert handling: custom certificate support for API connections
- Credential caching: tokens cached for performance
- Multi-account: supports multiple Front accounts
conversations: list/manage conversationsdrafts: handle draft messagestags,teammates,templates,inboxes,messages,contacts,channels: domain operationsauth: authentication management
- Conventional Commits:
feat|fix|refactor|build|ci|chore|docs|style|perf|test - Group related changes; avoid bundling unrelated refactors
- PR review: use
gh pr view/gh pr diff; don't switch branches
- Never commit OAuth client credentials or tokens
- Prefer OS keychain backends for credential storage
- Certificate files should not be committed to repository