3 min read

Aict turns Unix tools into XML and JSON for agents

Aict reimplements 33 Unix-style tools with XML, JSON, and plain-text output, aiming to cut parsing work for agent-based workflows.

Image: Hacker News

Plaintext Unix output was built for humans. Aict takes the opposite approach: it reimplements 33 Unix tools so they emit structured XML or JSON by default for agent-driven workflows.

The pitch is simple: tools like ls, grep, and cat normally return human-readable text, forcing downstream systems to infer columns, file types, timestamps, and other metadata. Aict instead labels every field explicitly, uses absolute paths, stores timestamps as Unix integers, and can automatically detect language and MIME type.

The project ships tools across 6 categories, including file inspection, search and compare, path utilities, text processing, data and archives, and system utilities. The list includes cat, head, tail, file, stat, wc, ls, find, grep, diff, realpath, basename, dirname, pwd, sort, uniq, cut, tr, sed, awk, jq, tar, env, system, ps, df, du, md5sum, sha1sum, sha256sum, plus git subcommands, shell completions, and a doctor diagnostic tool.

MCP server and installation

Aict includes a built-in MCP server via aict mcp, exposed over stdio transport. The project documents configuration for Claude Desktop and Claude Code, where the binary can be registered as an MCP server and its tools called as native functions with typed arguments and structured JSON results.

Recommended reading

Signal tests Android phones as linked devices

Installation options include:

  • Homebrew on macOS via brew tap synseqack/aict and brew install aict
  • Go install with go install github.com/synseqack/aict@latest
  • Building from source with go build -o aict .

By default, output is XML. JSON is available with --json, while --plain switches back to traditional text output.

Token cost and performance benchmarks

The repository is unusually direct about tradeoffs. It says aict output costs 1.1–7.8× more tokens per task than terse GNU output, measured with tiktoken o200k_base. But the argument is that richer output reduces extra tool calls: for example, a directory listing with size, type, and language goes from 2 calls with GNU tools to 1 call with aict, while finding .go files with size and modification time drops from 4 calls to 1 call.

In a live opencode evaluation cited by the project, the aict-equipped setup produced about 46% fewer output tokens at the median—265 vs 487—and was correct 3/3, while the GNU-equipped setup produced a flawed report in one run after trusting file(1).

Speed is the other side of the trade. The project reports a startup cost of about 3.6 ms per invocation. Benchmarks from 5 runs on Linux/amd64 show notable overhead versus GNU tools: ls (1000 files) took 4.0 ms with GNU, 51 ms with --plain, and 70 ms with --xml; grep (100k lines) measured 1.3 ms for GNU, 119 ms for --plain, and 130 ms for --xml. The repo recommends --plain when raw content is all that’s needed.

Platform support is partial on Windows: tools such as ls, cat, stat, wc, find, diff, grep, head, tail, sort, uniq, cut, tr, sed, awk, jq, tar, checksums, df, and path utilities work there, while system is limited to Linux/macOS and ps is Linux-only. Unsupported platforms return a structured <error> element rather than crashing. The project is released under the MIT license.

Tomas Berg

Computing Editor

Tomas lives in the terminal. He covers chips, laptops, and operating systems with a focus on performance and efficiency. He reads kernel changelogs the way other people read fiction, and he's always on the hunt for the perfect mechanical keyboard switch. If it processes data, Tomas has an opinion on it.

via Hacker News

// Keep reading