cli-anything-anygen

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-anything-anygen

cli-anything-anygen

A stateful command-line interface for AnyGen OpenAPI — generate professional slides, documents, websites, diagrams, and more from natural language prompts. Designed for AI agents and power users.
这是一款基于AnyGen OpenAPI的有状态命令行界面(CLI),可通过自然语言提示生成专业幻灯片、文档、网站、图表等多种内容,专为AI Agent和高级用户设计。

Installation

安装

This CLI is installed as part of the cli-anything-anygen package:
bash
pip install cli-anything-anygen
Prerequisites:
  • Python 3.10+
  • anygen must be installed on your system
该CLI作为cli-anything-anygen包的一部分进行安装:
bash
pip install cli-anything-anygen
前提条件:
  • Python 3.10+
  • 系统中必须已安装anygen

Usage

使用方法

Basic Commands

基础命令

bash
undefined
bash
undefined

Show help

显示帮助信息

cli-anything-anygen --help
cli-anything-anygen --help

Start interactive REPL mode

启动交互式REPL模式

cli-anything-anygen
cli-anything-anygen

Create a new project

创建新项目

cli-anything-anygen project new -o project.json
cli-anything-anygen project new -o project.json

Run with JSON output (for agent consumption)

以JSON格式输出(供Agent调用)

cli-anything-anygen --json project info -p project.json
undefined
cli-anything-anygen --json project info -p project.json
undefined

REPL Mode

REPL模式

When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-anygen
当不指定子命令调用时,CLI会进入交互式REPL会话:
bash
cli-anything-anygen

Enter commands interactively with tab-completion and history

交互式输入命令,支持自动补全和历史记录

undefined
undefined

Command Groups

命令组

Task

任务(Task)

Task management — create, poll, download, and run tasks.
CommandDescription
create
Create a generation task
status
Query task status (non-blocking)
poll
Poll task until completion (blocking)
download
Download the generated file for a completed task
thumbnail
Download thumbnail image for a completed task
run
Full workflow: create, poll, download
list
List locally cached task records
prepare
Multi-turn requirement analysis before creating a task
任务管理——创建、轮询、下载和运行任务。
命令描述
create
创建生成任务
status
查询任务状态(非阻塞)
poll
轮询任务直至完成(阻塞)
download
下载已完成任务的生成文件
thumbnail
下载已完成任务的缩略图
run
完整工作流:创建、轮询、下载
list
列出本地缓存的任务记录
prepare
创建任务前的多轮需求分析

File

文件(File)

File operations — upload reference files.
CommandDescription
upload
Upload a reference file to get a file_token
文件操作——上传参考文件。
命令描述
upload
上传参考文件以获取file_token

Config

配置(Config)

Configuration management — API key and settings.
CommandDescription
set
Set a configuration value
get
Get a configuration value (or show all)
delete
Delete a configuration value
path
Show the config file path
配置管理——API密钥和设置。
命令描述
set
设置配置值
get
获取配置值(或显示所有配置)
delete
删除配置值
path
显示配置文件路径

Session

会话(Session)

Session management — history, undo, redo.
CommandDescription
status
Show session status
history
Show command history
undo
Undo last command
redo
Redo last undone command
会话管理——历史记录、撤销、重做。
命令描述
status
显示会话状态
history
显示命令历史
undo
撤销上一条命令
redo
重做上一条已撤销的命令

Examples

示例

Create a New Project

创建新项目

Create a new anygen project file.
bash
cli-anything-anygen project new -o myproject.json
创建新的anygen项目文件。
bash
cli-anything-anygen project new -o myproject.json

Or with JSON output for programmatic use

或以JSON格式输出供程序化调用

cli-anything-anygen --json project new -o myproject.json
undefined
cli-anything-anygen --json project new -o myproject.json
undefined

Interactive REPL Session

交互式REPL会话

Start an interactive session with undo/redo support.
bash
cli-anything-anygen
启动支持撤销/重做功能的交互式会话。
bash
cli-anything-anygen

Enter commands interactively

交互式输入命令

Use 'help' to see available commands

使用'help'查看可用命令

Use 'undo' and 'redo' for history navigation

使用'undo'和'redo'导航历史记录

undefined
undefined

State Management

状态管理

The CLI maintains session state with:
  • Undo/Redo: Up to 50 levels of history
  • Project persistence: Save/load project state as JSON
  • Session tracking: Track modifications and changes
该CLI通过以下方式维护会话状态:
  • 撤销/重做:最多支持50级历史记录
  • 项目持久化:以JSON格式保存/加载项目状态
  • 会话跟踪:跟踪修改和变更

Output Formats

输出格式

All commands support dual output modes:
  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (
    --json
    flag): Structured JSON for agent consumption
bash
undefined
所有命令支持两种输出模式:
  • 人类可读格式(默认):表格、颜色、格式化文本
  • 机器可读格式
    --json
    参数):结构化JSON,供Agent调用
bash
undefined

Human output

人类可读输出

cli-anything-anygen project info -p project.json
cli-anything-anygen project info -p project.json

JSON output for agents

供Agent使用的JSON输出

cli-anything-anygen --json project info -p project.json
undefined
cli-anything-anygen --json project info -p project.json
undefined

For AI Agents

面向AI Agent的使用说明

When using this CLI programmatically:
  1. Always use
    --json
    flag
    for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Verify outputs exist after export operations
程序化使用该CLI时:
  1. 始终使用
    --json
    参数
    以获得可解析的输出
  2. 检查返回码——0表示成功,非0表示错误
  3. 解析stderr以获取失败时的错误信息
  4. 所有文件操作使用绝对路径
  5. 导出操作后验证输出是否存在

More Information

更多信息

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin
  • 完整文档:查看包中的README.md
  • 测试覆盖率:查看包中的TEST.md
  • 方法学:查看cli-anything-plugin中的HARNESS.md

Version

版本

1.0.0
1.0.0