gogcli
steipete/gogcli/AGENTS.md
AGENTS.md8.5k starsChanged 2 days ago
What's in it
- Repository Guidelines
- Project Structure
- Build, Test, and Development Commands
- Coding Style & Naming Conventions
- Testing Guidelines
- Commit & Pull Request Guidelines
- PR Workflow (Review vs Land)
- Security & Configuration Tips
# Repository Guidelines ## Project Structure - `cmd/gog/`: CLI entrypoint. - `internal/`: implementation (`cmd/`, Google API/OAuth, config/secrets, output/UI). - Tests: `*_test.go` next to code; opt-in integration suite in `internal/integration/` (build-tagged). - `bin/`: build outputs; `docs/`: specs/releasing; `scripts/`: release helpers. ## Build, Test, and Development Commands - `make` / `make build`: build `bin/gog`. - `make tools`: install pinned dev tools into `.tools/`. - `make fmt` / `make lint` / `make test` / `make ci`: format, lint, test, full local gate. - Run from source: `make gog -- …` builds and runs in one step. - Tracking worker: `pnpm -C internal/tracking/worker install --frozen-lockfile`, then `make worker-ci`. - Remote checks: after `crabbox warmup --keep --timing-json`, hydrate this repository with `crabbox actions hydrate --id <id> --github-runner`; its workflow uses Actions cache semantics that the local adapter does not support. Run `crabbox run --id <id> --timing-json --shell -- "make ci"`, reuse the lease across checks, and stop it when finished with `crabbox stop <id>`. - Hooks: `lefthook install` enables pre-commit/pre-push checks. ## Coding Style & Naming Conventions - Formatting: `make fmt` (`goimports` local prefix `github.com/openclaw/gogcli` + `gofumpt`). - Output: keep stdout parseable (`--json` / `--plain`); send human hints/progress to stderr. - Gmail labels: treat label IDs as case-sensitive opaque tokens; only case-fold label names for name lookup. ## Testing Guidelines - Unit tests: stdlib `testing` (and `httptest` where needed). - Integration tests (local only): - `GOG_IT_ACCOUNT=you@gmail.com go test -tags=integration ./internal/integration` - Requires OAuth client credentials + a stored refresh token in your keyring. ## Commit & Pull Request Guidelines - Create commits with `committer "<msg>" <file...>`; avoid manual staging. - Follow Conventional Commits + action-oriented subjects (e.g. `feat(cli): add --verbose to send`). - Group related changes; avoid bundling unrelated refactors. - PRs should summarize scope, note testing performed, and mention any user-facing changes or new flags. - PR review flow: when given a PR link, review via `gh pr view` / `gh pr diff` and do not change branches. - Maintain `CHANGELOG.md`: add user-visible changes to `Unreleased` as fixes and features land, with PR/issue references and contributor thanks. Finalize that section at release; do not put later work under an already published version. The release-time-only changelog exception for `openclaw/openclaw` does not apply to this repository. ### PR Workflow (Review vs Land) - **Review mode (PR link only):** read `gh pr view/diff`; do not switch branches; do not change code. - **Landing mode:** temp branch from `main`; bring in PR (squash default; rebase/merge when needed); fix; update `CHANGELOG.md` (PR #/issue + thanks); run `make ci`; final commit; merge to `main`; delete temp; end on `main`. - If landing contributor work, always add `Co-authored-by:` trailers for PR authors, even when we partially rewrite, group, or manually apply their changes; leave a PR comment with what landed + SHAs. - New contributor: thank in `CHANGELOG.md` (and update README contributors list if present). ## Security & Configuration Tips - Never commit OAuth client credential JSON files or tokens. - Prefer OS keychain backends; use `GOG_KEYRING_BACKEND=file` + `GOG_KEYRING_PASSWORD` only for headless environments.
More agent context in steipete/gogcli
32 other files this repository gives its agents.
Skill
- crabbox.agents/skills/crabbox/SKILL.md
- gog-admin.agents/skills/gog-admin/SKILL.md
- gog-adsense.agents/skills/gog-adsense/SKILL.md
- gog-analytics.agents/skills/gog-analytics/SKILL.md
- gog-appscript.agents/skills/gog-appscript/SKILL.md
- gog-calendar.agents/skills/gog-calendar/SKILL.md
- gog-chat.agents/skills/gog-chat/SKILL.md
- gog-classroom.agents/skills/gog-classroom/SKILL.md
- gog-contacts-cleanup.agents/skills/gog-contacts-cleanup/SKILL.md
- gog-contacts.agents/skills/gog-contacts/SKILL.md
- gog-docs.agents/skills/gog-docs/SKILL.md
- gog-drive-audit.agents/skills/gog-drive-audit/SKILL.md
- gog-drive.agents/skills/gog-drive/SKILL.md
- gog-forms.agents/skills/gog-forms/SKILL.md
- gog-gmail.agents/skills/gog-gmail/SKILL.md
- gog-groups.agents/skills/gog-groups/SKILL.md
- gog-inbox-triage.agents/skills/gog-inbox-triage/SKILL.md
- gog-keep.agents/skills/gog-keep/SKILL.md
- gog-maps.agents/skills/gog-maps/SKILL.md
- gog-meeting-prep.agents/skills/gog-meeting-prep/SKILL.md
- gog-meet.agents/skills/gog-meet/SKILL.md
- gog-people.agents/skills/gog-people/SKILL.md
- gog-photos.agents/skills/gog-photos/SKILL.md
- gog-save-attachments.agents/skills/gog-save-attachments/SKILL.md
- gog-searchconsole.agents/skills/gog-searchconsole/SKILL.md
- gog-sheets.agents/skills/gog-sheets/SKILL.md
- gog-sites.agents/skills/gog-sites/SKILL.md
- gog.agents/skills/gog/SKILL.md
- gog-slides.agents/skills/gog-slides/SKILL.md
- gog-tasks.agents/skills/gog-tasks/SKILL.md
- gog-weekly-digest.agents/skills/gog-weekly-digest/SKILL.md
- gog-youtube.agents/skills/gog-youtube/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

