Skip to content

psacc/hey-cli

Repository files navigation

hey-cli

CLI tool to interact with Hey.com email via Playwright browser automation.

Uses the accessibility tree for data extraction — more stable than DOM scraping.

Note: This project is not affiliated with, endorsed by, or associated with 37signals or Hey.com. It is an independent experiment to enable AI agents to help manage Hey email until official tooling (e.g. WebMCP or a public API) is available. Use at your own risk — you are responsible for all activity on your own account per 37signals' Terms of Service. This tool automates your own browser session and does not bypass authentication or access other users' data.

Requirements

  • Node.js >= 20
  • A Hey.com account

Install

git clone https://github.com/psacc/hey-cli.git
cd hey-cli
npm install
npx playwright install chromium

Login

node hey.js login

Opens a Chromium browser — log in to Hey manually, then close the window. The session persists in ~/.hey-cli/browser-data/.

To clear the session:

node hey.js logout

Usage

Read commands

node hey.js inbox [--json]                 # List Imbox emails
node hey.js read <topic-id> [--json]       # Read a single email thread
node hey.js search <query> [--json]        # Search emails
node hey.js feed [--json]                  # List The Feed
node hey.js screened [--json]              # List Screened Out
node hey.js reply-later [--json]           # List Reply Later queue
node hey.js set-aside [--json]             # List Set Aside pile
node hey.js screen [--json]               # List senders pending screening

Action commands

node hey.js mark-read <topic-id> [--json]         # Mark email as read
node hey.js screen approve <email> [--json]        # Approve a screened sender
node hey.js screen reject <email> [--json]         # Reject a screened sender
node hey.js reply-later add <topic-id> [--json]    # Add to Reply Later
node hey.js reply-later remove <topic-id> [--json] # Remove from Reply Later
node hey.js set-aside add <topic-id> [--json]      # Add to Set Aside
node hey.js set-aside remove <topic-id> [--json]   # Remove from Set Aside

Use --json for structured output suitable for scripts and AI agents.

Claude Code skill

hey-cli ships with a Claude Code skill at .claude/skills/hey-email/SKILL.md. To install it globally so you can manage email from any project:

ln -s /path/to/hey-cli/.claude/skills/hey-email ~/.claude/skills/hey-email

Then use natural language in any Claude Code session: "check my email", "read email 1951386058", "screen this sender", etc.

How it works

hey-cli launches a headless Chromium browser with a persistent session, navigates to Hey.com, and extracts data from the accessibility tree. Action commands use keyboard shortcuts (l for Reply Later, a for Set Aside) or button clicks (screening).

Each command starts a browser, performs the operation, and exits. There is no persistent daemon.

Testing

npm test

Unit tests use node:test with aria snapshot fixtures in test/fixtures/.

Contributing

Contributions welcome! Please open an issue first to discuss what you'd like to change.

git clone https://github.com/psacc/hey-cli.git
cd hey-cli
npm install
npx playwright install chromium
npm test

To re-record test fixtures against your own Hey account:

node hey.js login
node scripts/record-fixtures.js

License

MIT

About

CLI tool to interact with Hey.com email via Playwright browser automation

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors