cli-reference

A reference for the Claude Code command-line interface, which lets you use Claude from a terminal or automation script. It covers commands, options, sessions, headless mode, and MCP configuration.

In plain words
What is it for?
Use it to look up CLI flags, automate Claude in scripts or CI jobs, process files and logs, configure connected tools, or start and resume sessions.
Why use it?
It provides the exact command patterns for continuing sessions, resuming named sessions, processing piped input, and running Claude without an interactive terminal.

Skill for Claude CodeCodex

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 skills/parcadei/continuous-claude-v3/cli-reference
Any agent
npx skills add parcadei/Continuous-Claude-v3 --skill cli-reference
Clone the repo
git clone --depth 1 https://github.com/parcadei/Continuous-Claude-v3

Made for: Claude Code, Codex.

Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,084 The whole file, excluding the scripts and references it only reads on demand.
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.00017 $0.02084
Opus 5 $0.00009 $0.01042
Sonnet 5 $0.00003 $0.00417
Haiku 4.5 $0.00002 $0.00208

Measured 3d ago against content hash 1eadb0d903aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-reference 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 3d 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/skills/cli-reference/SKILL.md · 228 lines

How it starts

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

CLI Reference

Complete reference for Claude Code command-line interface.

When to Use

  • "What CLI flags are available?"
  • "How do I use headless mode?"
  • "Claude in automation/CI/CD"
  • "Output format options"
  • "System prompt via CLI"
  • "How do I spawn agents properly?"

Core Commands

Command Description Example
claude Start interactive REPL claude
claude "query" REPL with initial prompt claude "explain this project"
claude -p "query" Headless mode (SDK) claude -p "explain function"
cat file | claude -p Process piped content cat logs.txt | claude -p "explain"
claude -c Continue most recent claude -c
claude -c -p "query" Continue via SDK claude -c -p "check types"
claude -r "id" "query" Resume session claude -r "auth" "finish PR"
claude update Update version claude update
claude mcp Configure MCP servers See MCP docs

Session Control

Flag Description Example
--continue, -c Load most recent conversation claude --continue
--resume, -r Resume session by ID/name claude --resume auth-refactor
--session-id Use specific UUID claude --session-id "550e8400-..."
--fork-session Create new session on resume claude --resume abc --fork-session

Headless Mode (Critical for Agents)

Flag Description Example
--print, -p Non-interactive, exit after claude -p "query"
--output-format text, json, stream-json claude -p --output-format json
--max-turns Limit agentic turns claude -p --max-turns 100 "query"
--verbose Full turn-by-turn output claude --verbose
--dangerously-skip-permissions Skip permission prompts claude -p --dangerously-skip-permissions
--include-partial-messages Include streaming events claude -p --output-format stream-json --include-partial-messages
--input-format Input format (text/stream-json) claude -p --input-format stream-json

Read the full file on GitHub · 228 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. 3d ago First seen · 228 lines · 17 tokens per session scan A 1eadb0d903aa

Subscribe to this mod's changes

cli-reference is a skill published in the GitHub repository parcadei/Continuous-Claude-v3 (3,934 stars, last pushed 7mo ago), licensed MIT. It adds 17 tokens to every session and 2,084 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

fizzy-workflow

Use for guided Fizzy.do workflows: "set up Fizzy", "configure Fizzy for this project", "sync my work to Fizzy", "review my Fizzy progress", "end of session cleanup". Provides step-by-step guidance for common operations.

keskinonur/claude-plugin-fizzy · 57 tokens

ai-meeting

Run structured AI meetings for plans, product ideas, technical designs, business decisions, feature proposals, and strategy choices. Use when the user wants an AI meeting, AI roundtable, multi-agent discussion, debate, proposal review, plan review, decision review, or wants Codex, Claude Code, and other CLI agents to…

ccplugins/awesome-claude-code-plugins · 120 tokens

fastapi-app

Bootstrap a new FastAPI backend with async SQLAlchemy 2.0, asyncpg, Alembic, Pydantic v2, and no deprecated APIs. Use when the user wants to start, scaffold, or set up a new FastAPI service, a Python REST API, an async backend, or asks to "create a new fastapi app" or "new python backend". Handles JWT auth, layered…

ccplugins/awesome-claude-code-plugins · 103 tokens

flutter-app

Bootstrap a new Flutter mobile app with clean architecture, Riverpod, FVM-pinned SDK, current packages, and no deprecated APIs. Use when the user wants to start, scaffold, or set up a new Flutter app, a cross-platform mobile app, an Android or iOS app in Dart, or asks to "create a new flutter app". Handles BYOK LLM…

ccplugins/awesome-claude-code-plugins · 96 tokens

link-ticket-to-session

Link the current Claude Code session to a ticket (Linear, Jira, GitHub Issues, or GitHub Pull Requests) and cache its title/status in karma. Use when the user explicitly asks to link, attach, associate, or connect this session to a ticket, issue, or PR — e.g. "/link-ticket-to-session ABC-123", "link this session to…

JayantDevkar/claude-code-karma · 91 tokens

market-pulse

Summarize what's moving in the market right now using the AlphaAI MCP. Use when the user asks "what's moving?", "what's the big story today?", "anything breaking?", "market pulse", or wants a fast read on the current tape rather than one specific ticker.

ccplugins/awesome-claude-code-plugins · 61 tokens