cli GEMINI.md

Repository instructions for a Rust command-line tool that connects the Model Context Protocol, a standard way for AI agents to call tools, to InboxAPI over the web. InboxAPI provides email-related operations.

In plain words
What is it for?
Starting the proxy, signing in, checking the current account, sending emails, retrieving emails, and searching the mailbox.
Why use it?
It explains how to build, test, format, authenticate, and run the proxy instead of requiring developers to infer the workflow from the source code.

Instructions file for Gemini CLI

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/inboxapi/cli/gemini-md
Clone the repo
git clone --depth 1 https://github.com/inboxapi/cli

Made for: Gemini CLI.

Per session 1,107 This file is loaded in full into every session.
When invoked 1,107 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01107 $0.01107
Opus 5 $0.00553 $0.00553
Sonnet 5 $0.00221 $0.00221
Haiku 4.5 $0.00111 $0.00111

Measured yesterday against content hash f532fa6721f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli GEMINI.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 yesterday.

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.

- Pass arguments as arrays to `execFileSync` — never use string interpolation with `execSync` (shell injection risk)
GEMINI.md · 93 lines

How it starts

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

InboxAPI CLI — Gemini Agent Context

Overview

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.

Technology Stack

  • Language: Rust (Tokio async runtime, reqwest HTTP client, eventsource-client SSE)
  • 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)

Commands

cargo build          # Build binary
cargo test           # Run tests
cargo fmt            # Format code
cargo run -- proxy   # Start STDIO proxy (default)
cargo run -- login   # Authenticate and store credentials
cargo run -- whoami  # Show current account

# CLI subcommands
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

Prefer --body-file and --html-body-file for complex HTML, templates, or large generated content. File-backed bodies are validated as UTF-8 text, normalized to \n, and capped at 20 MiB.

Development Workflow

  • Single Rust source file (src/main.rs) containing all proxy, auth, and CLI logic
  • index.js is the npm entry point — resolves platform binary or falls back to cargo run
  • Tags (v*.*.*) trigger CI builds and npm publishing

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

Read the full file on GitHub · 93 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. yesterday First seen · 93 lines · 1,107 tokens per session scan A f532fa6721f5

Subscribe to this mod's changes

cli GEMINI.md is an instructions file published in the GitHub repository inboxapi/cli (12 stars, last pushed 2mo ago), licensed MIT. It adds 1,107 tokens to every session, about $0.0055 per session on Opus 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.