AI-optimized tool output compression for read, grep, diff, bash, test, web, search, and more
AIR is a toolkit for optimizing tool outputs for AI consumption. The name is inspired by "accessibility retrofitting" - just as we retrofit infrastructure for accessibility, we need to retrofit developer tools for AI ergonomics.
AI context windows are the scarcest resource. A 200K token window sounds large, but:
npm install output can consume 2000+ tokensThe real cost isn't tokens - it's attention dilution. Even with unlimited tokens, noise in context degrades AI reasoning quality.
AIR intercepts tool outputs at the source, filtering noise before it enters the context window. Prevention, not cleanup.
| Package | Description | npm |
|---|---|---|
@10iii/air-core | Core compression library | |
@10iii/air | CLI tool (air command) | |
@10iii/air-oc-plugin | OpenCode plugin | |
@10iii/air-openclaw-plugin | OpenClaw plugin |
# Install globally
npm install -g @10iii/air
# Read a file with compression
air read src/index.ts --skeleton
# Run a command with output compression
air bash "npm install"
# Search with de-duplication
air grep "TODO" --include "*.ts"
# Test output compression
air test "npm test"
import { ReadCompressor, BashCompressor, GrepCompressor } from '@10iii/air-core';
// Compress file content
const read = new ReadCompressor();
const result = read.compress(fileContent, { mode: 'skeleton' });
// Compress command output
const bash = new BashCompressor();
const result = bash.compress(output, { command: 'npm install' });
Add to your opencode.json:
{
"plugin": ["@10iii/air-oc-plugin"]
}
File content compression with intelligent truncation and structure awareness.
Command output compression with pattern recognition.
Search result compression with path de-duplication and context optimization.
Test output parsing for pytest, jest, go test, and more.
Web page content extraction with readability and markdown conversion.
Directory listing with tree structure and smart filtering.
Diff output compression with hunk summarization.
API response compression (JSON field filtering).
Web search with multiple engine support (DuckDuckGo, Bing, Baidu, Sogou).
| Compressor | Typical TSR |
|---|---|
| air-test | 90%+ |
| air-bash | 60-90% |
| air-read | 50-80% |
| air-grep | 40-60% |
| air-web | 70-90% |
MIT
AIR collects anonymous usage statistics to improve the product. This includes compressed content hashes (not the content itself), compression ratios, and basic metadata. No personal data is collected. You can modify this via air config.
Contributions welcome! Please read CONTRIBUTING.md and the Architecture docs first.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @10iii/air-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-10iii-air": {
"command": "npx",
"args": [
"-y",
"@10iii/air-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@10iii/air-mcp-servernpmio.github.10iii/air works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.