Skip to main content

Add your description here

Project description

xlforge Logo

xlforge

Stars Forks License

A command-line interface for Excel manipulation. Designed for agents and scripts.

About

xlforge is a powerful CLI for Excel manipulation built with an agent-first philosophy. Every command is stateless and includes the source file as a parameter, making it perfect for automation, scripts, and AI integrations.

Similar to how a robust build tool provides declarative commands for complex tasks, xlforge provides a comprehensive set of commands for Excel operations - from basic cell manipulation to advanced features like SQL queries, semantic search, and macro recording.

xlforge uses a Hybrid Engine architecture that automatically selects the best approach:

  • xlwings when Excel is installed - full control including cells, formatting, charts, and macros
  • openpyxl for headless/Docker environments - read/write cells, sheet operations, and basic formatting

Philosophy

  • Agent-first - Every command is a standalone shell operation
  • Stateless - No interactive mode, no shell persistence
  • JSON everywhere - All commands support JSON output; errors can be returned as JSON
  • Fail fast with retry - Exponential backoff on file lock (max 3 attempts)
  • Transaction-safe - Batch operations can be wrapped in transactions

Features

  • Cell operations - get, set, formula, clear, copy, bulk operations
  • Sheet management - create, delete, rename, copy, use
  • Formatting - cell styles, number formats, borders, colors
  • Data import/export - CSV, Excel tables, database sync
  • Charts and validations - create and manage Excel objects
  • SQL Bridge - Query Excel, CSV, and databases using DuckDB
  • Semantic search - AI-powered cell finding by meaning
  • Macro recorder - Transform user actions into reusable scripts
  • Checkpoint versioning - Git-like versioning for Excel files
  • Batch execution - Run scripts in a single COM session

Quick Start

# Install xlforge
pip install xlforge

# Read a cell
xlforge cell get report.xlsx "A1"

# Write to a cell
xlforge cell set report.xlsx "A1" "Hello World"

# Set a formula
xlforge cell formula report.xlsx "B1" "=SUM(A:A)"

# Set context to avoid repeating filename
xlforge use report.xlsx --sheet Data
cell set A1 "Value"  # Operates on Data!A1 in report.xlsx

# Run a batch script
xlforge run script.xlf --transaction

Documentation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xlforge-0.1.0.tar.gz (62.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xlforge-0.1.0-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file xlforge-0.1.0.tar.gz.

File metadata

  • Download URL: xlforge-0.1.0.tar.gz
  • Upload date:
  • Size: 62.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xlforge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd633f50af8d21f96867402eb1e4d41797e0687a2a8d7438742b7d80d79bf978
MD5 03e36ec910eb73051e7ac457dc153296
BLAKE2b-256 63ff0a102c1fa327d72dd5a2a19f418a1bc15c240f91f37ed3c7662ecbc8e149

See more details on using hashes here.

File details

Details for the file xlforge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xlforge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xlforge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00394f9b92fd41dffc20b311747fb93094b38b3d1cf594209a677f32ee34d81c
MD5 33ce0d6ef06a45a3a2eeee83be03af26
BLAKE2b-256 907652448db25feaacb048d263c1be6ace9f4f12050431b696a4b3a310813d48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page