Skip to content
Blog

File Attachments ​

Attach images, PDFs, and text files to any prompt. ra detects the MIME type and sends the content in the right format for each provider.

CLI ​

Use the --file flag. Multiple files can be attached:

bash
ra --file screenshot.png "What's wrong with this UI?"
ra --file report.pdf --file data.csv "Summarize both files"
ra --file architecture.png --file spec.md "Does the implementation match the spec?"

REPL ​

Use /attach to add files to your next message:

› /attach architecture.png
› /attach requirements.md
› How should we refactor this?

Attached files are sent with the next message you type, then cleared.

Supported formats ​

ra detects the MIME type automatically and sends files in the format each provider expects.

FormatHow it's sentNotes
Images (PNG, JPG, GIF, WebP)Vision content blockRequires a vision-capable model
PDFsDocument content blockSent as base64
Text files (.ts, .md, .json, etc.)Inlined as textContent included directly in the message
OtherInlined as textBest-effort text extraction

Provider support ​

All providers support text file attachments. Image and PDF support varies:

ProviderImagesPDFs
AnthropicYesYes
OpenAIYesNo (inlined as text)
GoogleYesYes
AzureYesNo (inlined as text)
BedrockYesYes
OllamaDepends on modelNo

See also ​

Released under the MIT License.