File jobs for AI coding agents
Ask a coding agent to merge two PDFs or shrink a folder of photos, and it often writes a small Python script, installs a library, runs it, and fixes what broke. Deft turns each of those jobs into one command.
What goes wrong with a throwaway script
A script for a file job looks short, but the agent pays for every step around it:
- It has to pick a library, and the right one depends on the file type: pypdf for PDFs, Pillow for images, python-docx for Word, openpyxl or pandas for spreadsheets.
- The library may not be installed, so the agent installs it, sometimes into the wrong environment.
- Real files have quirks: encrypted PDFs, phone photos turned sideways by EXIF, CSV files in odd encodings. Each quirk is another round of reading an error and editing the script.
- The agent reads all of that output, and every line costs tokens and time.
The same jobs with deft
Deft is one binary with commands for PDF, images, Word and ODT documents, slides, spreadsheets, Markdown, HTML, e-books, JSON, YAML, TOML and QR codes. Every command has the same shape:
deft <group> <command> [inputs] -o <output> [--options]
| Job | Command |
|---|---|
| Merge PDFs | deft pdf merge report.pdf appendix.pdf -o all.pdf |
| Shrink a PDF | deft pdf compress report.pdf --level strong -o small.pdf |
| Reorder pages | deft pdf select three-pages.pdf --pages 3,1-2 -o reordered.pdf |
| Resize a photo | deft image resize photo.jpg --size 800x -o small.jpg |
| Photos into one PDF | deft image to-pdf photo-1.jpg photo-2.jpg -o album.pdf |
| Markdown to PDF | deft md to-pdf notes.md -o notes.pdf |
| Word to Markdown | deft doc to-md letter.docx -o letter.md |
| CSV to Excel | deft sheet convert people.csv --to xlsx -o table.xlsx |
Each command prints one line: what it read, what it wrote and the result, or an error with a stable code and a hint. That is all the agent has to read.
Finding the right command
The agent does not need to know the command names. It can search by intent:
$ deft find "shrink pdf"
pdf compress pdf -> pdf Make smaller: --level, --target-size 2MB
When no command fits, deft find says no command does this, and the agent knows to use another tool instead of guessing.
Safe by default
- Deft never overwrites an input.
- Writes are atomic: a failed job leaves no half-written file.
- The deft program collects no usage data.
When a script is still the right call
Deft covers common jobs, not every job. If the task needs custom logic, such as pulling particular fields out of hundreds of invoices or a chart built from your own rules, a script is the better tool. The point is to stop writing one for the jobs that are already solved.
Next
- Install deft for Claude Code and Codex
- Deft or a Python script, job by job
- Every command's test cases, with input, command and output