cli-anything-audacity
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecli-anything-audacity
cli-anything-audacity
A stateful command-line interface for audio editing, following the same patterns as the GIMP and Blender CLIs in this repo.
一款支持状态管理的音频编辑命令行工具,遵循本仓库中GIMP和Blender命令行工具(CLI)的设计模式。
Installation
安装
This CLI is installed as part of the cli-anything-audacity package:
bash
pip install cli-anything-audacityPrerequisites:
- Python 3.10+
- audacity must be installed on your system
该CLI作为cli-anything-audacity包的一部分进行安装:
bash
pip install cli-anything-audacity前置要求:
- Python 3.10及以上版本
- 系统中已安装Audacity
Usage
使用方法
Basic Commands
基础命令
bash
undefinedbash
undefinedShow help
显示帮助信息
cli-anything-audacity --help
cli-anything-audacity --help
Start interactive REPL mode
启动交互式REPL模式
cli-anything-audacity
cli-anything-audacity
Create a new project
创建新项目
cli-anything-audacity project new -o project.json
cli-anything-audacity project new -o project.json
Run with JSON output (for agent consumption)
以JSON格式输出(供Agent调用)
cli-anything-audacity --json project info -p project.json
undefinedcli-anything-audacity --json project info -p project.json
undefinedREPL Mode
REPL模式
When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-audacity当不指定子命令调用时,CLI会进入交互式REPL会话:
bash
cli-anything-audacityEnter commands interactively with tab-completion and history
以交互式方式输入命令,支持自动补全和历史记录
undefinedundefinedCommand Groups
命令组
Project
项目管理
Project management commands.
| Command | Description |
|---|---|
| Create a new project |
| Open an existing project |
| Save the current project |
| Show project information |
| View or update project settings |
| Print raw project JSON |
项目管理相关命令。
| 命令 | 描述 |
|---|---|
| 创建新项目 |
| 打开现有项目 |
| 保存当前项目 |
| 显示项目信息 |
| 查看或更新项目设置 |
| 打印原始项目JSON数据 |
Track
轨道管理
Track management commands.
| Command | Description |
|---|---|
| Add a new track |
| Remove a track by index |
| List all tracks |
| Set a track property (name, mute, solo, volume, pan) |
轨道管理相关命令。
| 命令 | 描述 |
|---|---|
| 添加新轨道 |
| 按索引删除轨道 |
| 列出所有轨道 |
| 设置轨道属性(名称、静音、独奏、音量、声像) |
Clip
剪辑管理
Clip management commands.
| Command | Description |
|---|---|
| Probe/import an audio file (show metadata) |
| Add an audio clip to a track |
| Remove a clip from a track |
| Trim a clip's start and/or end |
| Split a clip at a given time position |
| Move a clip to a new start time |
| List clips on a track |
剪辑管理相关命令。
| 命令 | 描述 |
|---|---|
| 探测/导入音频文件(显示元数据) |
| 向轨道添加音频剪辑 |
| 从轨道删除剪辑 |
| 修剪剪辑的起始和/或结束位置 |
| 在指定时间点拆分剪辑 |
| 将剪辑移动到新的起始时间 |
| 列出轨道上的所有剪辑 |
Effect Group
效果管理
Effect management commands.
| Command | Description |
|---|---|
| List all available effects |
| Show details about an effect |
| Add an effect to a track |
| Remove an effect by index |
| Set an effect parameter |
| List effects on a track |
效果管理相关命令。
| 命令 | 描述 |
|---|---|
| 列出所有可用效果 |
| 显示效果详情 |
| 向轨道添加效果 |
| 按索引删除效果 |
| 设置效果参数 |
| 列出轨道上的所有效果 |
Selection
选区管理
Selection management commands.
| Command | Description |
|---|---|
| Set selection range |
| Select all (entire project duration) |
| Clear selection |
| Show current selection |
选区管理相关命令。
| 命令 | 描述 |
|---|---|
| 设置选区范围 |
| 全选(整个项目时长) |
| 清除选区 |
| 显示当前选区 |
Label
标签/标记管理
Label/marker management commands.
| Command | Description |
|---|---|
| Add a label at a time position |
| Remove a label by index |
| List all labels |
标签/标记管理相关命令。
| 命令 | 描述 |
|---|---|
| 在指定时间点添加标签 |
| 按索引删除标签 |
| 列出所有标签 |
Media
媒体文件操作
Media file operations.
| Command | Description |
|---|---|
| Analyze an audio file |
| Check that all referenced audio files exist |
媒体文件操作相关命令。
| 命令 | 描述 |
|---|---|
| 分析音频文件 |
| 检查所有引用的音频文件是否存在 |
Export Group
导出/渲染
Export/render commands.
| Command | Description |
|---|---|
| List export presets |
| Show preset details |
| Render the project to an audio file |
导出/渲染相关命令。
| 命令 | 描述 |
|---|---|
| 列出导出预设 |
| 显示预设详情 |
| 将项目渲染为音频文件 |
Session Group
会话管理
Session management commands.
| Command | Description |
|---|---|
| Show session status |
| Undo the last operation |
| Redo the last undone operation |
| Show undo history |
会话管理相关命令。
| 命令 | 描述 |
|---|---|
| 显示会话状态 |
| 撤销上一步操作 |
| 重做上一步撤销的操作 |
| 显示撤销历史 |
Examples
示例
Create a New Project
创建新项目
Create a new audacity project file.
bash
cli-anything-audacity project new -o myproject.json创建一个新的Audacity项目文件。
bash
cli-anything-audacity project new -o myproject.jsonOr with JSON output for programmatic use
或者以JSON格式输出,供程序化调用
cli-anything-audacity --json project new -o myproject.json
undefinedcli-anything-audacity --json project new -o myproject.json
undefinedInteractive REPL Session
交互式REPL会话
Start an interactive session with undo/redo support.
bash
cli-anything-audacity启动支持撤销/重做的交互式会话。
bash
cli-anything-audacityEnter commands interactively
以交互式方式输入命令
Use 'help' to see available commands
使用'help'查看可用命令
Use 'undo' and 'redo' for history navigation
使用'undo'和'redo'导航历史操作
undefinedundefinedExport Project
导出项目
Export the project to a final output format.
bash
cli-anything-audacity --project myproject.json export render output.pdf --overwrite将项目导出为最终输出格式。
bash
cli-anything-audacity --project myproject.json export render output.pdf --overwriteState 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 (flag): Structured JSON for agent consumption
--json
bash
undefined所有命令支持两种输出模式:
- 人类可读格式(默认):表格、彩色文本、格式化文本
- 机器可读格式(参数):结构化JSON,供Agent调用
--json
bash
undefinedHuman output
人类可读格式输出
cli-anything-audacity project info -p project.json
cli-anything-audacity project info -p project.json
JSON output for agents
供Agent调用的JSON格式输出
cli-anything-audacity --json project info -p project.json
undefinedcli-anything-audacity --json project info -p project.json
undefinedFor AI Agents
供AI Agent调用指南
When using this CLI programmatically:
- Always use flag for parseable output
--json - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use absolute paths for all file operations
- Verify outputs exist after export operations
当以程序化方式使用该CLI时:
- 始终使用参数以获取可解析的输出
--json - 检查返回码——0表示成功,非0表示错误
- 解析stderr以获取失败时的错误信息
- 使用绝对路径进行所有文件操作
- 导出操作后验证输出文件是否存在
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