hey-cli: Instructions file for Codex

AGENTS.md

hey-cli AGENTS.md is an instructions file for Codex, OpenCode from basecamp/hey-cli. It costs 3,814 tokens per session, scanned A, original, MIT.

Repository instructions for hey-cli, a Go command-line and terminal interface for HEY email, calendars, boxes, and journal entries.

In plain words
What is it for?
Use them when changing HEY email or calendar features, the command-line interface, terminal interface, tests, builds, or Git history.
Why use it?
They explain the project layout, development commands, and rule that branches must be updated by rebasing instead of merging.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is basecamp/hey-cli's own configuration. It tells Codex and OpenCode how to work on hey-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hey-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to basecamp/hey-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/basecamp/hey-cli/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/basecamp/hey-cli

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hey-cli AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/basecamp/hey-cli/agents-md/github.svg)](https://agentmods.dev/instructions/basecamp/hey-cli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/basecamp/hey-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/basecamp/hey-cli/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hey-cli AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/basecamp/hey-cli/agents-md"><img src="https://agentmods.dev/badge/instructions/basecamp/hey-cli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,814 This file is loaded in full into every session.
When invoked 3,814 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.03814 $0.03814
Opus 5.5 $0.01526 $0.01526
Sonnet 5.5 $0.00763 $0.00763
Haiku 4.5 $0.00381 $0.00381

Measured 19d ago against content hash 4042e9ce250b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 19d 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.

AGENTS.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 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

internal/auth/ manages four methods: browser OAuth with PKCE (hey auth login, the primary one), a stored bearer token (--token), a browser session cookie (--cookie), and the HEY_TOKEN environment variable. The Manager refreshes tokens with a 5-minute buffer, and the SDK reaches it through the bridge in internal/cmd/sdk.go.

Every data-access command calls requireAuth() before it makes an API call. Logged out, it exits 3 with Run: hey auth login, or offers to sign in at an interactive terminal with styled output. HEY_NONINTERACTIVE=1 turns the offer off. The auth subcommands, hey login/hey logout, hey setup and hey doctor work without authentication.

Read the full file on GitHub · 268 lines

Changes

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.

  1. 19d ago Changed · -696 lines · -12,940 tokens per session 4042e9ce250b
  2. 1mo ago Changed · +25 lines · +465 tokens per session 2e9fdd2ee0c5
  3. 1mo ago Changed · +9 lines · +183 tokens per session bab3ee2a9959
  4. 1mo ago Changed · +23 lines · +504 tokens per session bf7c1a38849b
  5. 1mo ago Changed · +4 lines · +93 tokens per session 7d6b7d48eff7
  6. 1mo ago Changed · +6 lines · +99 tokens per session 0b9a34afb57f
  7. 1mo ago Changed · -2 tokens per session c87db63b4bf6
  8. 2mo ago Changed · +16 lines · +296 tokens per session 935e2691682e
  9. 2mo ago First seen · 881 lines · 15,116 tokens per session scan A cccb80ecf1cd

Subscribe to this mod's changes

hey-cli AGENTS.md is an instructions file published in the GitHub repository basecamp/hey-cli (423 stars, last pushed yesterday), licensed MIT. It adds 3,814 tokens to every session, about $0.0153 per session on Opus 5.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.

Related

hey-cli AGENTS.md compared with instructions from other repositories

hey-cli AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hey-cli AGENTS.mdbasecamp/hey-cliInstructions file423yesterdayMITA3,814Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode