hey-cli AGENTS.md

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

Install

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.

agentmods
npx agentmods add instructions/basecamp/hey-cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/basecamp/hey-cli

Made for: Codex, OpenCode.

Per session 15,116 This file is loaded in full into every session.
When invoked 15,116 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.15116 $0.15116
Opus 5 $0.07558 $0.07558
Sonnet 5 $0.03023 $0.03023
Haiku 4.5 $0.01512 $0.01512

Measured 2d ago against content hash cccb80ecf1cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

AGENTS.md · 881 lines

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/:

  1. Browser-based OAuth with PKCE (primary) — hey auth login opens 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 ephemeral 127.0.0.1 port (RFC 8252 §7.3) receives the authorization code, which is exchanged for access and refresh tokens at /oauth/tokens.
  2. Pre-generated bearer tokenhey auth login --token TOKEN stores a token directly.
  3. Browser session cookiehey auth login --cookie COOKIE uses an existing HEY.com session.
  4. Environment variable — Set HEY_TOKEN to use a token without storing it.

Read the full file on GitHub · 881 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. 2d 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 (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.