Back to README
git clone https://github.com/automagik-dev/workit.git
cd workit
makeRun:
./bin/wk --helpwk --helpshows top-level command groups.- Drill down with
wk <group> --help(and deeper subcommands). - For the full expanded command list:
WK_HELP=full wk --help. - Make shortcut:
make wk -- --help(ormake wk -- gmail --help). make wk-helpshows CLI help (note:make wk --helpis Make's own help; use--).- Version:
wk --versionorwk version.
curl -fsSL https://raw.githubusercontent.com/automagik-dev/workit/main/scripts/install.sh | bashwk updateAfter cloning, install tools:
make toolsPinned tools (installed into .tools/):
| Target | Description |
|---|---|
make / make build |
Build bin/wk |
make tools |
Install pinned dev tools into .tools/ |
make fmt |
Format code (goimports + gofumpt) |
make lint |
Lint code (golangci-lint) |
make test |
Run tests |
make ci |
Full local gate: format checks + lint + test |
Build and run in one step:
make wk auth add you@gmail.comFor clean stdout when scripting:
- Use
--when the first arg is a flag:make wk -- --json gmail search "from:me" | jq .
Standard Go testing package (and httptest where needed). Tests live next to the code in *_test.go files.
make testOpt-in tests that hit real Google APIs using your stored wk credentials/tokens.
# Optional: override which account to use
export WK_IT_ACCOUNT=you@gmail.com
export WK_CLIENT=work
go test -tags=integration ./...Tip: if you want to avoid macOS Keychain prompts during these runs, set WK_KEYRING_BACKEND=file and WK_KEYRING_PASSWORD=... (uses encrypted on-disk keyring).
Fast end-to-end smoke checks against live APIs:
scripts/live-test.sh --fast
scripts/live-test.sh --account you@gmail.com --skip groups,keep,calendar-enterprise
scripts/live-test.sh --client work --account you@company.comScript toggles:
--auth all,groupsto re-auth before running--client <name>to select OAuth client credentials--strictto fail on optional features (groups/keep/enterprise)--allow-nontestto override the test-account guardrail
Go test wrapper (opt-in):
WK_LIVE=1 go test -tags=integration ./internal/integration -run LiveOptional env:
| Variable | Description |
|---|---|
WK_LIVE_FAST=1 |
Fast mode |
WK_LIVE_SKIP=groups,keep |
Skip specific services |
WK_LIVE_AUTH=all,groups |
Re-auth before running |
WK_LIVE_ALLOW_NONTEST=1 |
Override test-account guardrail |
WK_LIVE_EMAIL_TEST=you+wktest.com |
Test email address |
WK_LIVE_GROUP_EMAIL=group@domain |
Test group email |
WK_LIVE_CLASSROOM_COURSE=<courseId> |
Classroom course ID |
WK_LIVE_CLASSROOM_CREATE=1 |
Allow creating classroom courses |
WK_LIVE_CLASSROOM_ALLOW_STATE=1 |
Allow classroom state changes |
WK_LIVE_TRACK=1 |
Enable email tracking tests |
WK_LIVE_GMAIL_BATCH_DELETE=1 |
Enable batch delete tests |
WK_LIVE_GMAIL_FILTERS=1 |
Enable Gmail filter tests |
WK_LIVE_GMAIL_WATCH_TOPIC=projects/.../topics/... |
Pub/Sub topic for watch tests |
WK_LIVE_CALENDAR_RESPOND=1 |
Enable calendar respond tests |
WK_LIVE_CALENDAR_RECURRENCE=1 |
Enable recurrence tests |
WK_KEEP_SERVICE_ACCOUNT=/path/to/service-account.json |
Service account for Keep tests |
WK_KEEP_IMPERSONATE=user@workspace-domain |
User to impersonate for Keep tests |
CI runs format checks, tests, lint, deadcode, race, and coverage gates on push/PR.
Required checks for protected branches (main, dev) should include at least:
ci / testci / workerci / darwin-cgo-buildversion / version-artifact
- Require pull requests before merge.
- Require all required checks to pass.
- Restrict direct pushes to
main. - Use
devas the integration branch and mergedev -> mainfor release promotion.
wk --version
wk version --jsonSee docs/agent.md for the version artifact contract details and docs/RELEASING.md for release procedures.