Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/basecamp/hey-cli/agents-mdgit clone --depth 1 https://github.com/basecamp/hey-cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.15116 | $0.15116 |
| Opus 5 | $0.07558 | $0.07558 |
| Sonnet 5 | $0.03023 | $0.03023 |
| Haiku 4.5 | $0.01512 | $0.01512 |
Grade A, and why
hey-cli AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 881 lines — stays where its author put it; the contents beside it link to each section on GitHub.
hey-cli
This file provides guidance to AI coding agents working with this repository.
What is hey-cli?
hey-cli is a CLI and TUI interface for HEY. It allows users to read and send emails, manage their boxes, manage their calendars and journal entries. The TUI is primarily intended for human use, while the CLI is primarily intended for use by AI agents and for scripting.
Development commands
This project uses make. make help covers most targets -- though not all of them:
install, check-toolchain and help itself are defined but unlisted.
make build # Builds ./bin/hey
make test # Runs the tests
make lint # Lints the code
make install # Installs the binary to /usr/local/bin/hey (not shown by make help)
Git
History is linear: merge commits are disallowed in this repository. Bring a branch up to date by rebasing it onto main, never by merging main into it.
Architecture Overview
This is a Go project that uses:
- spf13/cobra for the CLI interface
- [charm.land/bubbletea/v2] for the TUI interface along with bubbles/v2 and lipgloss/v2 (these are new versions that recently came out and differ from the v1 versions!)
All API interactions go through the HEY SDK (hey-sdk/go), with typed service methods accessed via internal/cmd/sdk.go (e.g., sdk.Boxes().List, sdk.Messages().Create, sdk.Calendars().GetRecordings). Authentication and token refresh are handled via internal/auth/.
Authentication
Authentication supports four methods, all managed through internal/auth/:
- Browser-based OAuth with PKCE (primary) —
hey auth loginopens a browser for OAuth authentication against HEY's own OAuth server (/oauth/authorizations/new), using PKCE (S256) for security. A local callback server on an ephemeral127.0.0.1port (RFC 8252 §7.3) receives the authorization code, which is exchanged for access and refresh tokens at/oauth/tokens. - Pre-generated bearer token —
hey auth login --token TOKENstores a token directly. - Browser session cookie —
hey auth login --cookie COOKIEuses an existing HEY.com session. - Environment variable — Set
HEY_TOKENto use a token without storing it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 881 lines · 15,116 tokens per session scan A cccb80ecf1cd
hey-cli AGENTS.md is an instructions file published in the GitHub repository basecamp/hey-cli (239 stars, last pushed 2d ago), licensed MIT. It adds 15,116 tokens to every session, about $0.0756 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
omamail AGENTS.md
Instructions for huacnlee/omamail, covering repository working agreements, colors, layout, javascript libraries and entry points.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
buildNext
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.