From 5caf3a47933ea0ec334a7a093b247de543a19ce8 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Tue, 17 Mar 2026 18:52:44 +0800 Subject: [PATCH] chore: update AGENTS.md --- AGENTS.md | 12 ++++++++---- astrbot/cli/__main__.py | 3 ++- astrbot/cli/commands/__init__.py | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 9f3617ce9..4f1d62950 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -3,8 +3,10 @@ ### Core ``` -uv sync -uv run main.py +uv tool install -e . --force +astrbot init +astrbot run # start the bot +astrbot run --backend-only # start the backend only ``` Exposed an API server on `http://localhost:6185` by default. @@ -13,8 +15,8 @@ Exposed an API server on `http://localhost:6185` by default. ``` cd dashboard -pnpm install # First time only. Use npm install -g pnpm if pnpm is not installed. -pnpm dev +bun install # First time only. +bun dev ``` Runs on `http://localhost:3000` by default. @@ -27,6 +29,8 @@ Runs on `http://localhost:3000` by default. 4. When committing, ensure to use conventional commits messages, such as `feat: add new agent for data analysis` or `fix: resolve bug in provider manager`. 5. Use English for all new comments. 6. For path handling, use `pathlib.Path` instead of string paths, and use `astrbot.core.utils.path_utils` to get the AstrBot data and temp directory. +7. Use Python 3.12+ type hinting syntax (e.g., `list[str]` over `List[str]`, `int | None` over `Optional[int]`). Avoid using `Any` and ensure comprehensive type annotations are provided. + ## PR instructions diff --git a/astrbot/cli/__main__.py b/astrbot/cli/__main__.py index 29a199341..a3fb8ae66 100644 --- a/astrbot/cli/__main__.py +++ b/astrbot/cli/__main__.py @@ -5,7 +5,7 @@ import sys import click from . import __version__ -from .commands import conf, init, plug, run, uninstall +from .commands import bk, conf, init, plug, run, uninstall logo_tmpl = r""" ___ _______.___________..______ .______ ______ .___________. @@ -55,6 +55,7 @@ cli.add_command(help) cli.add_command(plug) cli.add_command(conf) cli.add_command(uninstall) +cli.add_command(bk) if __name__ == "__main__": cli() diff --git a/astrbot/cli/commands/__init__.py b/astrbot/cli/commands/__init__.py index 8a4410f0f..a3ad038be 100644 --- a/astrbot/cli/commands/__init__.py +++ b/astrbot/cli/commands/__init__.py @@ -1,7 +1,8 @@ +from .cmd_bk import bk from .cmd_conf import conf from .cmd_init import init from .cmd_plug import plug from .cmd_run import run from .cmd_uninstall import uninstall -__all__ = ["conf", "init", "plug", "run", "uninstall"] +__all__ = ["conf", "init", "plug", "run", "uninstall", "bk"]