README
¶
bods
Like mods, but for Anthropic's Claude models on Amazon Bedrock
Claude for the command line, with support
for Unix like piping (|) and file redirecting (<).
- PDF Support: Pipe PDFs directly or read from pasteboard. With citations enabled, Claude performs visual analysis of charts, tables, images, and layouts — not just text extraction. Use
-Cto display citation sources for both PDFs and text content. - Thinking / Reasoning: Support for thinking capabilities (
-kor--think) for Claude 3.7 and later models. For Opus 4.6/4.7/4.8, Opus 5/5.5, Sonnet 5/5.5, Haiku 5.5, and Fable 5/5.2, use--effortto control adaptive thinking. On Opus 5.5 thinking is always on and--effortis the only control; omitting it runs atmedium, so pass--effort high(orxhigh/max) for deeper reasoning. Sonnet 5.5 thinks by default and runs athighwhen--effortis omitted. Haiku 5.5 thinks by default too and runs atmediumwhen--effortis omitted; use--effort lowfor fast, high-volume tasks. Fable 5.2 always thinks and runs athighwhen--effortis omitted. - Text Editor Tool: Allow Claude to view and modify files directly (
-eor--text-editor). - Images & Pasteboard: Include pasteboard content (images, text, PDFs) in prompt (
-P). - Autocomplete: Enabled for flags, params, and prompts (hit
<TAB><TAB>). - Pre-configured Prompts: See bods.yaml.
- Supported Models:
- Claude Sonnet 5.5 (default)
- Claude Opus 5.5
- Claude Haiku 5.5
- Claude Fable 5.2
- Claude Sonnet 5
- Claude Opus 5
- Claude Fable 5
- Claude Opus 4.8
- Claude Opus 4.7
- Claude Opus 4.6
- Claude Sonnet 4.6
- Claude 4.5 (Sonnet, Haiku, Opus)
- Claude 3.7 Sonnet
- Claude 3.5 (Sonnet, Haiku)
- Legacy models: Claude 3 (Opus, Sonnet, Haiku), Claude 2.x
Usage
$ bods --help
Usage:
bods [flags]
Flags:
-a, --assistant string The message for the assistant role
-b, --budget int Thinking token budget for Claude 3.7-4.5; ignored for Opus 4.6/4.7/4.8, Opus 5/5.5, Sonnet 5/5.5, Haiku 5.5, and Fable 5/5.2, use --effort instead (default=1024)
-C, --citations[=true|false] Enable citations for text content and display citation sources in output
-c, --cross-region-inference[=true|false] Automatically select cross-region inference profile if available for selected model. (default true)
-E, --effort string Effort level (max, xhigh, high, medium, low). 'xhigh' is Opus 4.7/4.8, Opus 5/5.5, Sonnet 5/5.5, Haiku 5.5, and Fable 5/5.2; 'max' is Opus 4.6/4.7/4.8, Opus 5/5.5, Sonnet 5/5.5, Haiku 5.5, and Fable 5/5.2. Opus 5.5 and Haiku 5.5 run at 'medium' when unset.
-f, --format[=true|false] In prompt ask for the response formatting in markdown unless disabled. (default true)
-h, --help[=true|false] help for bods
-i, --images string
-r, --metaprompt-mode[=true|false] Treat metaprompt input variable like {$CUSTOMER} like Go templates an interactively ask for input.
-m, --model string The specific foundation model to use (default is claude-sonnet-5-5)
-P, --pasteboard[=true|false] Get image form pasteboard (clipboard)
-p, --prompt string The prompt name (template) to use
-S, --show-config[=true|false] Print the bods.yaml settings
-s, --system string The system prompt to use; if given will overwrite template system prompt
-x, --tag-content string Write output content within this XML tag name in file <tag name>.txt.
-e, --text-editor[=true|false] Enable text editor tool for Claude to view and modify files
-k, --think[=true|false] Enable thinking (extended for 3.7-4.5, adaptive for Opus 4.6/4.7/4.8, Opus 5/5.5, Sonnet 4.6, Sonnet 5/5.5, Haiku 5.5, and Fable 5/5.2)
-t, --tokens int The maximum number of tokens to generate before stopping (default: the most the model allows, e.g. 128000 for Opus 5.5)
-v, --variable-input string Variable input mapping. If provided input will not be asked for interactively. Currently only for metamode e.g. RUBRIC="software developer",RESUME=file://input.txt
--version[=true|false] version for bods
Install Bods
Pre-requisites
- An AWS account and credentials specified (e.g. via environment variables
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN,AWS_REGION); for details see AWS SDK for Go V2 - Specifying Credentials - You need access to Anthropic's Claude models granted in Bedrock, see Amazon Bedrock - Model access
Installation
brew install rollwagen/tap/bods
OR
go install github.com/rollwagen/bods@latest
OR
Download [releases]: https://github.com/rollwagen/bods/releases
Enable CLI completion
- when installed with
brew, autocompletion is installed and enabled for zsh and bash per default. - to enable manually (e.g. during development): ZSH example:
__BODS_CMP_ENABLED=1 bods completion zsh > b_cmp.sh; source b_cmp.sh; rm b_cmp.sh
Features & Examples
Zero-Shot
$ bods "Print a CLI shell command that uses curl to check the cluster health of an OpenSearch endpoint listening on port 9200"
curl -XGET 'http://localhost:9200/_cluster/health?pretty'
Thinking / Reasoning (Claude 3.7+)
Enable extended thinking capabilities for supported models (Claude 3.7 and later) to solve complex problems.
# Extended thinking for Claude 3.7-4.5
$ bods "Explain the solution to the Riemann Hypothesis" -k --budget 4000
# Adaptive thinking for Opus 4.8 via effort level
$ bods "Explain the solution to the Riemann Hypothesis" --effort xhigh
# Opus 5 accepts the full effort ladder (low, medium, high, xhigh, max)
$ bods "Explain the solution to the Riemann Hypothesis" -m anthropic.claude-opus-5 --effort max
# Opus 5.5 always thinks; without --effort it runs at 'medium'
$ bods "Explain the solution to the Riemann Hypothesis" -m anthropic.claude-opus-5-5 --effort max
# Sonnet 5.5 (the default) runs at 'high' when --effort is omitted
$ bods "Explain the solution to the Riemann Hypothesis" --effort xhigh
# Haiku 5.5 runs at 'medium' when --effort is omitted; 'low' suits classification and extraction
$ cat ticket.txt | bods "Classify this support ticket as bug, feature request, or question" -m anthropic.claude-haiku-5-5 --effort low
# Fable 5.2 runs at 'high' when --effort is omitted. Bedrock serves it only through an inference
# profile; bods picks one for you (-c, on by default), or pass -m global.anthropic.claude-fable-5-2
# (or us.). With -c=false, or if no profile is found, bods stops early with an error naming the fix
$ bods "Explain the solution to the Riemann Hypothesis" -m anthropic.claude-fable-5-2 --effort xhigh
Text Editor Tool
Allow Claude to view and modify files in your current directory. Useful for refactoring or fixing bugs.
$ bods "Fix the syntax error in main.go" -e
PDF Support
Pipe PDFs directly into bods or use the pasteboard flag -P if you have a PDF copied.
# Pipe a PDF
$ cat paper.pdf | bods "Summarize the key findings"
# Use PDF from clipboard
$ bods "What is this document about?" -P
Piping & Multimodal
Summarize a YouTube video: get a YouTube transcript with ytt and pipe to bods.
ytt "https://youtube.com/..." | bods -p summarize
Explain what specific source code does.
Built-in Metaprompt
Use Anthropic's Metaprompt to generate high-quality prompts.
bods --prompt metaprompt --format=false --tag-content Instructions -t 4096
bods will interactively ask you to enter the task.
For input variables in the generated prompt:
cat Instructions.txt | bods --metaprompt-mode --variable-input CUSTOMER_COMPLAINT=file://complaint_email.txt
Configuration (bods.yaml)
Define your own prompts and defaults in ~/.config/bods/bods.yaml (or macOS: ~/Library/Application Support/bods/bods.yaml).
prompts:
demo:
max_tokens: 1000
user: |
USER PROMPT TEXT from 'demo'
system: |
SYSTEM PROMPT TEXT from 'demo'
Debugging
Dump constructed prompt
$ DUMP_PROMPT=1 bods "hello"
Debug log
$ DEBUG=1 bods "hello"
# Log written to temp directory (e.g. /tmp/bods.log)
License
Acknowledgments
Inspiration
Similar projects
Documentation
¶
There is no documentation for this package.