A peek inside CLI tools - Ben's Bites

Source: original

A peek inside CLI tools

No more funny videos at OpenAI

Mar 26, 2026

Agents are LLMs with tool-use. They don’t just respond to you, they can go and do things for you. But what does ‘tool-use’ actually mean? What tools?

The most common tools are in the form of CLI. Agents communicate in text, CLIs are text in/text out, so it’s a natural fit. A CLI is a text-based way to control software. You type a command, something happens.

Here’s a simple example - organising files, using the bash tool.

"Rename all 400 product photos to match our SKU format, resize them to 1200x1200, and sort them into folders by category."

First the agent lists files to understand what it’s working with.

COMMAND: ls ./product-photos/

OUTPUT: file_1.jpg file_2.jpg file_3.jpg ... (400 files)

Then creates the folder structure

COMMAND: mkdir -p ./output/{shoes,bags,jackets,hats}

OUPUT: output/ ├── shoes/ ├── bags/ ├── jackets/ └── hats/

Then resizes the images

COMMAND: mogrify -resize 1200x1200 ./product-photos/*.jpg

OUTPUT: 400 images resized ✓

Then renames and sorts each file

COMMAND: mv IMG_0291.jpg ./output/shoes/SKU-1042-BLK.jpg mv IMG_0292.jpg ./output/bags/SKU-2187-TAN.jpg mv IMG_0293.jpg ./output/jackets/SKU-3301-NVY.jpg ... repeats for all 400 files

OUTPUT: 400 files renamed and sorted ✓

Then it verifies the result before sending back to you

COMMAND: ls -R ./output/ | head -20

output/shoes/ SKU-1042-BLK.jpg SKU-1043-WHT.jpg SKU-1044-RED.jpg ...(112 files) output/bags/ SKU-2187-TAN.jpg SKU-2188-BLK.jpg ...(89 files)

It does all this in seconds. It would take you a couple of hours manually.

This is one CLI, called bash, the general-purpose command line that comes with your computer. But there are purpose-built CLIs for specific jobs too:

Each of these is a separate tool an agent can use. The file organising example used one tool (bash). But give an agent the Stripe CLI too and now it can pull your revenue numbers. Add Playwright and it can browse the web. Add Vercel and it can deploy what it builds.

That’s what “tool use” means. The more CLIs you give an agent access to, the more it can do. Your job is to make sure it has the right ones for the task.

It all sounds a bit technical, and it is, but you’d only see those raw commands if you’re using a terminal or watching them fly by in tools like Claude Code. They’re present even when you don’t see them.

If an agent like Cowork is doing a task, you can click to expand what it ran and see the detail — like this example listing files to find recent fund updates.

Every agent is running commands like this under the hood. The interface just hides and abstracts them away.

Headlines

My feed

Afters

Ben Tossell@bentossellmerch gifts have gone up a level ty @OpenAI 1:12 PM · Mar 26, 2026 · 620 Views6 Replies · 5 Likesmaria@maria_rcksSince we all know that terminals are made for complex UIs... I decided to make T1Code (1T, because a terminal is all you need). I know @theo really likes this kind of complex UI right on the terminal... so lets hope he likes it! 9:53 PM · Mar 25, 2026 · 105K Views53 Replies · 26 Reposts · 812 LikesCursor@cursor_aiCursor cloud agents can now run on your infrastructure. Get the same cloud agent harness and experience, but keep your code and tool execution entirely in your own network. cursor.comRun cloud agents in your own infrastructure · Cursor6:32 PM · Mar 25, 2026 · 121K Views92 Replies · 113 Reposts · 1.76K LikesSam Altman@samaAI will help discover new science, such as cures for diseases, which is perhaps the most important way to increase quality of life long-term. AI will also present new threats to society that we have to address. No company can sufficiently mitigate these on their own; we will5:01 PM · Mar 24, 2026 · 913K Views1.67K Replies · 554 Reposts · 6.62K LikesAiden Bai@aidenybaiIntroducing Expect Let agents test your code in a real browser 1. Run Claude Code / Codex to QA your app 2. Watch a video of every bug found 3. Fix and repeat until passing Run as a CLI or agent skill. Fully open source 4:06 PM · Mar 25, 2026 · 407K Views162 Replies · 216 Reposts · 3.26K LikesSawyer Hood@sawyerhoodIntroducing the new dev-browser cli. The fastest way for an agent to use a browser is to let it write code. Just npm i -g dev-browser and tell your agent to "use dev-browser" 4:27 PM · Mar 25, 2026 · 463K Views94 Replies · 176 Reposts · 1.87K Likesdotta@dottaAnnouncing [companies.sh](http://companies.sh) - the open standard for Agent Companies Import and run entire companies with a single command Just run npx [companies.sh](http://companies.sh) add <repo/company> More 👇 4:12 PM · Mar 25, 2026 · 130K Views108 Replies · 114 Reposts · 1.16K LikesDaniel Griesser@DanielGriI updated my interactive subagents to free up the main agent to be interactive as well (basically /btw but just a normal continuation) and the subagent asynchronously returns its result to the starting session [github.com/hazat/pi-inter…](https://github.com/hazat/pi-interactive-subagents) 10:50 AM · Mar 24, 2026 · 27.2K Views12 Replies · 15 Reposts · 225 Likes

Loading...

* sponsors who make this newsletter possible :)
Email us atshanice@bensbites.com or k@bensbites.com

PreviousNext