Tips, tricks, and lessons from building software.

Tips, tricks, and lessons from building software — a personal dev blog by Tommy.

Interactive vs Headless: claude vs claude -p

September 7, 2026· 2 min read·claude-codecliheadless

Learn when to use the interactive claude session and when to reach for the headless claude -p print-and-exit mode.

Piping Data into Claude Code

September 7, 2026· 2 min read·claude-codecliheadlessautomation

Feed files, command output, and logs straight into Claude Code by piping them into claude -p.

Continuing and Resuming Sessions from the CLI

September 7, 2026· 2 min read·claude-codeclisessions

Pick up where you left off with claude -c to continue the latest session or claude -r to resume a specific one.

Choosing Output Formats: text, json, stream-json

September 7, 2026· 2 min read·claude-codecliautomation

Control how claude -p prints results with --output-format text, json, or stream-json for scripts and pipelines.

Adding Extra Directories with --add-dir

September 7, 2026· 2 min read·claude-codecli

Give Claude Code access to folders outside your current project using the --add-dir flag.

Starting in a Permission Mode with --permission-mode

September 7, 2026· 2 min read·claude-codeclipermissions

Launch Claude Code straight into default, acceptEdits, plan, or bypassPermissions with the --permission-mode flag.