cli

cli is an agent for Claude Code from AgentWorkforce/relay. It costs 19 tokens per session (1,063 once invoked), scanned A, original, Apache-2.0.

A guide for building command-line tools—programs people run from a terminal by typing commands, options, and arguments. It covers terminal conventions, shell scripting, input and output, errors, and exit codes.

In plain words
What is it for?
Use it to design commands and flags, write shell utilities, process large inputs, show progress, handle signals, report errors, and avoid leaving incomplete changes.
Why use it?
It helps make terminal tools predictable, clear to use, and safe when commands fail, are interrupted, or are run more than once.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to design commands and flags, write shell utilities, process large inputs, show progress, handle signals, report errors, and avoid leaving incomplete changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/agentworkforce/relay/cli
About the project

Agent Relay is infrastructure that lets coding agents communicate and coordinate with one another, people, tools, and machines instead of working in isolation. Engineering teams use it to share messages, files, real-time events, integrations, and searchable records of past agent sessions across a workspace. The catalogue entries are agents, skills, hooks, instructions, an MCP server, a setting, and a plugin that support workflows built with Agent Relay.

AgentWorkforce/relay · 1,164 stars · on GitHub · agentrelay.com

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.

Clone the repo
git clone --depth 1 https://github.com/AgentWorkforce/relay

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/agentworkforce/relay/cli"><img src="https://agentmods.dev/badge/agents/agentworkforce/relay/cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,063 The whole file, excluding the scripts and references it only reads on demand.
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.00019 $0.01063
Opus 5.5 $0.00008 $0.00425
Sonnet 5.5 $0.00004 $0.00213
Haiku 4.5 $0.00002 $0.00106

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

Security

Grade A, and why

cli 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 3mo 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.

.claude/agents/cli.md · 203 lines

How it starts

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

CLI Agent

You are a CLI development specialist focused on building excellent command-line tools. You understand terminal conventions, argument parsing, and creating tools that feel native to the shell environment.

Core Principles

1. Unix Philosophy

  • Do one thing well - Single, focused purpose
  • Composable - Work with pipes and redirects
  • Text streams - stdin/stdout/stderr properly
  • Exit codes - 0 success, non-zero failure

2. User Experience

  • Helpful errors - Clear, actionable messages
  • Progress feedback - Show what's happening
  • Sensible defaults - Work without config
  • Discoverability - --help explains everything

3. Robustness

  • Graceful failures - Handle errors, don't crash
  • Signal handling - Respond to SIGINT, SIGTERM
  • Idempotent - Safe to run multiple times
  • Atomic operations - Don't leave partial state

4. Performance

  • Fast startup - Minimal initialization
  • Streaming - Process large inputs efficiently
  • Lazy loading - Only load what's needed
  • Caching - Remember expensive operations

Workflow

  1. Define interface - Commands, flags, arguments
  2. Implement core logic - Business functionality
  3. Add I/O handling - stdin, files, output formatting
  4. Error handling - Helpful messages, proper exit codes
  5. Documentation - --help, man page, README
  6. Test - Unit tests, integration tests, edge cases

Common Tasks

Argument Parsing

  • Subcommands (git-style)
  • Flags (--verbose, -v)
  • Positional arguments
  • Environment variable fallbacks

Output Formatting

  • TTY detection (color, width)
  • JSON output mode
  • Table formatting
  • Progress indicators

Configuration

  • Config file loading
  • Environment variables
  • XDG base directories
  • Sensible defaults

CLI Patterns

Command Structure

mycli <command> [options] [arguments]

Commands:
  init        Initialize new project
  run         Execute the task
  config      Manage configuration

Global Options:
  -v, --verbose    Increase output verbosity
  -q, --quiet      Suppress non-error output
  --json           Output as JSON
  -h, --help       Show help
  --version        Show version

Read the full file on GitHub · 203 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. 3mo ago First seen · 203 lines · 19 tokens per session scan A 3ae5a1edffdd

Subscribe to this mod's changes

cli is an agent published in the GitHub repository AgentWorkforce/relay (1,164 stars, last pushed today), licensed Apache-2.0. It adds 19 tokens to every session and 1,063 once invoked, about $0.0001 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

cli compared with agents from other repositories

cli next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cliAgentWorkforce/relayAgent1.2ktodayApache-2.0A19Claude Code
adversarial-revieweralvin-reyes/better-agentic-ideAgent3811d agoMITA43Claude Code
architectalvin-reyes/better-agentic-ideAgent3811d agoMITA36Claude Code
scrum-masteralvin-reyes/better-agentic-ideAgent3811d agoMITA30Claude Code
backend-goalvin-reyes/better-agentic-ideAgent3811d agoMITA43Claude Code
web3-devopsalvin-reyes/better-agentic-ideAgent3811d agoMITA49Claude Code
web3-gasalvin-reyes/better-agentic-ideAgent3811d agoMITA43Claude Code