wps-cli

Control WPS Office applications via COM automation for document generation and conversion.

44|1|Updated May 28, 2026
One-click install
npx skills add https://github.com/jjchen17/wps-cli --skill wps-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wps-cli
Source: https://github.com/jjchen17/wps-cli/tree/main
Command: npx skills add https://github.com/jjchen17/wps-cli --skill wps-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires typer, rich, pywin32, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the common issue of formatting loss and layout instability when programmatically generating or manipulating Office documents, ensuring that the final output is identical to manual editing.

Core Features & Use Cases

  • Direct Engine Control: Commands the actual WPS Office engine via COM automation to ensure pixel-perfect rendering of fonts, tables, and layouts.
  • AI-Native Workflow: Supports structured JSON output for all 76 commands, making it ideal for LLM agents and automated pipelines.
  • Use Case: Automatically generate a sales report by merging data into a Word template, creating charts in Excel, and exporting the final result to PDF without ever opening the GUI.

Quick Start

Use the wps-cli skill to convert the document named report.docx into a PDF file.

Frequently Asked Questions about wps-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate WPS Office document generation without losing formatting?

Automate WPS Office document generation without formatting loss by driving the local WPS engine directly via COM automation. This ensures pixel-perfect rendering of fonts and layouts, producing output identical to manual editing in Writer, Calc, and Impress.

Can I convert WPS Office documents to PDF from the command line?

Yes, you can convert WPS Office documents to PDF from the command line. The tool provides programmatic control over WPS PDF processing, allowing automated format conversion and data extraction without needing to open the graphical interface.

Does WPS Office COM automation work with LLM agents and automated pipelines?

WPS Office COM automation works seamlessly with LLM agents by supporting structured JSON output for all 76 commands. This AI-native workflow facilitates automated office pipelines for tasks like merging data into templates and creating charts.

What's the best way to automatically merge data into a Word template and create Excel charts?

The best way to merge data into a Word template and create Excel charts is by using COM automation to command the WPS Office engine directly. This allows you to generate reports and export to PDF with high-fidelity layout manipulation.

Do I need pywin32 to automate WPS Office from the terminal?

Yes, you need pywin32 to automate WPS Office from the terminal. It is a required dependency alongside typer and rich to facilitate COM automation and drive the local WPS Office applications for automated workflows.

Why does programmatic Office document manipulation cause layout instability?

Programmatic Office document manipulation causes layout instability when it fails to drive the actual rendering engine. Using COM automation to directly command the local WPS Office engine prevents this, ensuring high-fidelity document manipulation identical to manual editing.