Cli Anything Anygen

作者 hkuds34f519533bc1无许可证51K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2周前更新

Command-line interface for Anygen - A stateful command-line interface for AnyGen OpenAPI — generate professional slides, documents, webs...

仅含说明Documents & Office
AI 生成的概览

用于 AnyGen OpenAPI 的有状态命令行界面,可根据提示生成幻灯片、文档、网站和图表。

功能
提供围绕 AnyGen OpenAPI 的有状态命令行封装,可根据自然语言提示创建生成任务,产出幻灯片、文档、网站和图表。它支持创建任务、查询状态、下载生成的文件和缩略图,以及上传参考文件。它还提供项目持久化、带撤销/重做的会话历史、API 密钥配置管理,以及人类可读或 JSON 输出。
适用场景
当智能体或高级用户需要通过命令行驱动 AnyGen 生成任务时使用,尤其适合消费 JSON 输出的脚本化或程序化工作流。它适用于创建、轮询并下载生成产物,或管理 AnyGen 配置与会话状态的工作流。
运行要求
需要 Python 3.10+,通过 pip 安装 cli-anything-anygen 包,并在系统上安装 anygen。需要通过配置命令设置 AnyGen API 密钥,并具备访问 AnyGen OpenAPI 的网络连接。它不附带脚本,仅为说明文档。

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.

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

Usage

Basic Commands

bash
# Show helpcli-anything-anygen --help
# Start interactive REPL modecli-anything-anygen
# Create a new projectcli-anything-anygen project new -o project.json
# Run with JSON output (for agent consumption)cli-anything-anygen --json project info -p project.json

REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

bash
cli-anything-anygen# Enter commands interactively with tab-completion and history

Command Groups

Task

Task management — create, poll, download, and run tasks.

CommandDescription
createCreate a generation task
statusQuery task status (non-blocking)
pollPoll task until completion (blocking)
downloadDownload the generated file for a completed task
thumbnailDownload thumbnail image for a completed task
runFull workflow: create, poll, download
listList locally cached task records
prepareMulti-turn requirement analysis before creating a task

File

File operations — upload reference files.

CommandDescription
uploadUpload a reference file to get a file_token

Config

Configuration management — API key and settings.

CommandDescription
setSet a configuration value
getGet a configuration value (or show all)
deleteDelete a configuration value
pathShow the config file path

Session

Session management — history, undo, redo.

CommandDescription
statusShow session status
historyShow command history
undoUndo last command
redoRedo last undone command

Examples

Create a New Project

Create a new anygen project file.

bash
cli-anything-anygen project new -o myproject.json# Or with JSON output for programmatic usecli-anything-anygen --json project new -o myproject.json

Interactive REPL Session

Start an interactive session with undo/redo support.

bash
cli-anything-anygen# Enter commands interactively# Use 'help' to see available commands# Use 'undo' and 'redo' for history navigation

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

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
# Human outputcli-anything-anygen project info -p project.json
# JSON output for agentscli-anything-anygen --json project info -p project.json

For AI Agents

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

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

Version

1.0.0

来源与署名

来源:hkuds/cli-anything位于skills/cli-anything-anygen提交34f5195

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架