Metadata-Version: 2.4
Name: razel-py-cli
Version: 0.0.1
Summary: Razel Python CLI (Typer): installable command-line tool
Author-email: zhuanghengheng <zhuanghengheng@corp.netease.com>
Requires-Python: >=3.12
Requires-Dist: dashscope>=1.25.14
Requires-Dist: imageio-ffmpeg>=0.6.0
Requires-Dist: numpy>=2.4.3
Requires-Dist: onnxruntime>=1.24.4
Requires-Dist: pydub>=0.25.1
Requires-Dist: requests>=2.32.5
Requires-Dist: rich>=14.3.3
Requires-Dist: silero-vad>=6.2.1
Requires-Dist: soundfile>=0.13.1
Requires-Dist: srt>=3.5.3
Requires-Dist: tqdm>=4.67.3
Requires-Dist: typer>=0.24.1
Description-Content-Type: text/markdown

# razel-py-cli

**razel-py-cli**：基于 [Typer](https://typer.tiangolo.com/)，命令 **`razel-py-cli`** 或 **`python -m razel_py_cli`**。
**使用前请先执行 `razel-py-cli init`**，生成 **`~/.razel/config.json`** 并配置密钥（见 [config](src/razel_py_cli/commands/config_cmd/README.md)）。

## 子命令文档

顶层命令包括 **`init`**、**`config`**、**`speech-to-text`**。选项与示例在对应源码目录的 README 中：

- [init](src/razel_py_cli/commands/init_cmd/README.md)
- [config](src/razel_py_cli/commands/config_cmd/README.md)
- [speech-to-text](src/razel_py_cli/commands/speech_to_text/README.md)

## 基本使用

```bash
razel-py-cli init              # 首次使用前执行
razel-py-cli --help
razel-py-cli speech-to-text --help
```

## 开发

```bash
uv sync --group dev
uv run razel-py-cli --help
uv run pytest
```

新增顶层子命令时，请在 `tests/` 下补充对应测试（约定见 `tests/conftest.py` 顶部说明）。


## 构建与发布（仅发布 wheel）

统一脚本放在仓库根目录 `scripts/`：

- macOS / Linux:
  - `bash scripts/build.sh`
  - `bash scripts/publish_pypi.sh`
- Windows (PowerShell):
  - `powershell -ExecutionPolicy Bypass -File scripts/build.ps1`
  - `powershell -ExecutionPolicy Bypass -File scripts/publish_pypi.ps1`

制品在 `dist/`（仅 `*.whl`）。版本号以 `pyproject.toml` 为准；安装示例中的文件名请按实际构建结果替换。

**本地 wheel 安装：**

```bash
pip install /path/to/razel_py_cli-<version>-py3-none-any.whl
```

发布前需要先设置 PyPI token（不要写入仓库）：

- macOS / Linux:
  - `export UV_PUBLISH_TOKEN="pypi-xxxx"`
- Windows PowerShell:
  - `$env:UV_PUBLISH_TOKEN="pypi-xxxx"`

`publish_pypi` 脚本会执行 `uv publish dist/*.whl`（PowerShell 版本等价），只上传 wheel，不上传 sdist。
