A CLI Excel tool designed for AI agents — let Copilot, Cursor, Claude and other coding agents read, write, and manipulate Excel files.
# xlex
<p align="center">
<img src="logo.png" alt="xlex logo" width="640">
</p>
<p align="center">
<strong>A CLI Excel tool designed for AI agents — let Cursor, Cursor, Cursor and other coding agents read, write, and manipulate Excel files.</strong>
</p>
<p align="center">
<a href="https://github.com/yen0304/xlex/actions/workflows/ci.yml"><img src="https://github.com/yen0304/xlex/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<a href="https://codecov.io/gh/yen0304/xlex"><img src="https://codecov.io/gh/yen0304/xlex/graph/badge.svg" alt="codecov"></a>
<a href="https://www.npmjs.com/package/xlex"><img src="https://img.shields.io/npm/v/xlex.svg" alt="npm"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
<a href="https://blog.rust-lang.org/2024/07/25/Rust-1.80.0.html"><img src="https://img.shields.io/badge/MSRV-1.80-blue.svg" alt="MSRV"></a>
</p>
<p align="center">
English | <a href="README.zh-TW.md">繁體中文</a>
</p>
## Why xlex?
AI coding agents (Cursor, Cursor, Claude Code, etc.) can run CLI commands but can't open Excel files directly. xlex bridges this gap — agents use simple CLI commands to read, write, style, and transform `.xlsx` files without any SDK or library integration.
## Features
- **Agent-Friendly**: Structured JSON output, deterministic exit codes, dry-run support
- **Skill Files Included**: Ready-to-use [agent skill files](docs/skills/xlex-agent/) so agents know every command
- **Session Management**: Git-like `open → batch → commit` workflow for multi-step edits
- **Batch Writes**: In-process batch execution — single open/save cycle, ideal for AI agents
- **Streaming Architecture**: Handle files up to 200MB without memory exhaustion
- **Multiple Output Formats**: Text, JSON, CSV, NDJSON
- **Template System**: Variable substitution with `{{placeholder}}` syntax
- **Import/Export**: CSV, JSON, YAML, TSV, Markdown support
- **Cross-Platform**:Agent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.