
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.
bods extracts text and sends the PDF as a document.
- Thinking / Reasoning: Support for thinking capabilities (
-k or --think) for Claude 3.7 and later models.
- Text Editor Tool: Allow Claude to view and modify files directly (
-e or --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 3.7 Sonnet (
anthropic.claude-3-7-sonnet-20250219-v1:0)
- Claude 3.5 Sonnet (
anthropic.claude-3-5-sonnet-20240620-v1:0 & v2)
- Claude 3.5 Haiku
- Claude 4.5 (Sonnet, Haiku, Opus)
- 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
--budget int Budget for the max nr of tokens Claude 3.7+ may use for thinking (default=1024)
--cross-region-inference Automatically select cross-region inference profile if available (default true)
-f, --format In prompt ask for the response formatting in markdown unless disabled. (default true)
-h, --help help for bods
-i, --images string List of images (e.g. file://image.png)
-r, --metaprompt-mode 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-3-5-sonnet)
-P, --pasteboard Get content (text, image, PDF) from pasteboard (clipboard)
-p, --prompt string The prompt name (template) to use
-S, --show-config 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 Enable text editor tool for Claude to view and modify files
-k, --think Enable thinking feature for Claude 3.7+ models (ignored for other models)
-t, --tokens int The maximum number of tokens to generate before stopping (default=2048)
-v, --variable-input string Variable input mapping. If provided input will not be asked for interactively.
--version 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.
$ bods "Explain the solution to the Riemann Hypothesis" -k --budget 4000
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.

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
MIT
Acknowledgments
Inspiration
Similar projects