AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

STEP1 - 新增CLI命令行程序

Open LIghtJUNction opened this issue 8 months ago • 1 comments

修复了 #XYZ

Motivation

将之前的大PR安全的拆分后 逐步进行提交

STEP - 1

Modifications

使用 uv sync -U 更新 新增.python-version 标记文件 新增llms.txt

新增build system uv默认的hatchling

新增一个命令行程序:astrbot 使用方法:

对于开发人员: uv sync uv tool install -e .

对于用户: uv pip install astrbot (需要先上传到pypi)

然后终端使用命令: astrbot init 初始化 -f 强制 -p 指定路径(为了兼容 使用的是main.py相同路径)

astrbot run 启动

测试通过

Check

  • [ y] 我的 Commit Message 符合良好的规范
  • [ ]y 我新增/修复/优化的功能经过良好的测试

好的,这是将拉取请求摘要翻译成中文的结果:

Sourcery 总结

为 AstrBot 添加 CLI 命令行程序,具有初始化和运行功能

新功能:

  • 引入一个新的 CLI 工具 'astrbot',带有用于初始化和运行机器人的命令
  • 增加对指定自定义数据目录路径的支持
  • 为 CLI 实现版本和帮助命令

增强功能:

  • 修改仪表板下载实用程序以支持自定义路径
  • 为 AstrBot 增加灵活的根目录检测

构建:

  • 切换到 hatchling 作为构建系统
  • 在 pyproject.toml 中为 CLI 工具添加入口点

杂项:

  • 添加 .python-version 文件
  • 创建 llms.txt 文件
Original summary in English

Summary by Sourcery

Add CLI command-line program for AstrBot with initialization and run capabilities

New Features:

  • Introduce a new CLI tool 'astrbot' with commands for initializing and running the bot
  • Add support for specifying custom data directory paths
  • Implement version and help commands for the CLI

Enhancements:

  • Modify dashboard download utility to support custom paths
  • Add flexible root directory detection for AstrBot

Build:

  • Switch to hatchling as the build system
  • Add entry point for CLI tool in pyproject.toml

Chores:

  • Add .python-version file
  • Create llms.txt file

LIghtJUNction avatar Apr 19 '25 13:04 LIghtJUNction