cli: Instructions file for Codex

AGENTS.md

cli AGENTS.md is an instructions file for Codex, OpenCode from inboxapi/cli. It costs 1,436 tokens per session, scanned A, original, MIT.

Repository instructions for the inboxapi CLI, a command-line tool whose project includes JavaScript/Node.js code, an MCP connection, packaging, and agent installation logic.

In plain words
What is it for?
Use them when changing the CLI, its Node.js subprocess handling, Rust build and test workflow, npm packaging, or agent-installation code.
Why use it?
They call out safety and reliability issues such as shell injection, lost buffered input, hanging I/O, and incorrectly parsed streamed data.

Instructions file for CodexOpenCode

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

This is inboxapi/cli's own configuration. It tells Codex and OpenCode how to work on 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 cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to inboxapi/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/inboxapi/cli/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/inboxapi/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 cli AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/inboxapi/cli/agents-md/github.svg)](https://agentmods.dev/instructions/inboxapi/cli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/inboxapi/cli/agents-md"><img src="https://agentmods.dev/badge/instructions/inboxapi/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 cli AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/inboxapi/cli/agents-md"><img src="https://agentmods.dev/badge/instructions/inboxapi/cli/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,436 This file is loaded in full into every session.
When invoked 1,436 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01436 $0.01436
Opus 5.5 $0.00574 $0.00574
Sonnet 5.5 $0.00287 $0.00287
Haiku 4.5 $0.00144 $0.00144

Measured 1mo ago against content hash 1923fefdff9f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cli AGENTS.md scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Never use `execSync` / `execFileSync` with string interpolation — pass arguments as arrays to avoid shell injection
AGENTS.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI Agent Stub

Rust STDIO proxy that bridges JSON-RPC (MCP protocol) over STDIO to the remote InboxAPI MCP service over Streamable HTTP/SSE. Distributed as @inboxapi/cli on npm with platform-specific binary packages.

Overview

  • Technology: Rust (Tokio async runtime, reqwest HTTP client, manual SSE parsing over bytes_stream())
  • Protocol: JSON-RPC over STDIO (MCP standard)
  • Transport: HTTP POST + SSE to remote endpoint
  • Distribution: npm with platform-specific optional dependencies
  • CI: GitHub Actions (5-platform cross-build, GitHub Releases, npm publish)

Canonical workflow lives in ../AGENTS.md.

Key Files

  • src/main.rs — Proxy loop, token injection, login flow, hashcash proof-of-work
  • index.js — npm binary resolver (platform package → local build → cargo run)
  • package.json — Root npm package with optionalDependencies for 5 platforms
  • npm/cli-*/package.json — Platform-specific package manifests (os/cpu fields)
  • .github/workflows/release.yml — Cross-build, GitHub Release, npm publish pipeline
  • Cargo.toml — Rust project configuration and dependencies
  • tests/mcp_integration_test.rs — Integration tests

CLI Commands

cargo run -- proxy   # Start STDIO proxy (default)
cargo run -- login   # Authenticate and store credentials
cargo run -- whoami  # Show current account

# Email operations
cargo run -- send-email --to [email protected] --subject "Hi" --body "Hello"
cargo run -- send-email --to [email protected] --subject "Newsletter" --body-file ./body.txt --html-body-file ./newsletter.html
cargo run -- get-emails --limit 5
cargo run -- get-email "<message-id>"
cargo run -- search-emails --subject "keyword"
cargo run -- get-attachment <id> --output ./file.pdf
cargo run -- send-reply --message-id "<id>" --body "Reply"
cargo run -- send-reply --message-id "<id>" --body-file ./reply.txt --html-body-file ./reply.html
cargo run -- forward-email --message-id "<id>" --to [email protected]
cargo run -- help

Read the full file on GitHub · 120 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. 1mo ago Changed · +80 lines · +891 tokens per session 1923fefdff9f
  2. 2mo ago First seen · 40 lines · 545 tokens per session scan A f368cc4f5e4a

Subscribe to this mod's changes

cli AGENTS.md is an instructions file published in the GitHub repository inboxapi/cli (13 stars, last pushed 1mo ago), licensed MIT. It adds 1,436 tokens to every session, about $0.0057 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

cli AGENTS.md compared with instructions from other repositories

cli AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cli AGENTS.mdinboxapi/cliInstructions file131mo agoMITA1,436Codex, 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