Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fe979bf
feat(install): add multilingual setup and mainland China mirrors
Soulter Oct 19, 2026
2df9b9d
fix(install): support PowerShell 5.1 and Invoke-Expression
Soulter Oct 19, 2026
af4aa1c
fix(install): support BOM-free PowerShell pipeline execution
Soulter Oct 19, 2026
f875a75
fix(install): configure UTF-8 console output
Soulter Oct 19, 2026
a199bae
fix(install): set Windows console code page internally
Soulter Oct 19, 2026
4c84404
fix(install): keep IEX bootstrap menu ASCII-only
Soulter Oct 19, 2026
1097476
fix(install): default language selection to English
Soulter Oct 19, 2026
05a92c7
test(install): cover language source defaults
Soulter Oct 19, 2026
d39fa60
fix(test): escape PowerShell assertion patterns
Soulter Oct 19, 2026
975d6fb
fix(install): restore localized language menu
Soulter Oct 19, 2026
819b282
fix(install): list English as first language
Soulter Oct 19, 2026
627ee9d
fix(install): put English first in language prompt
Soulter Oct 19, 2026
1abe537
feat(install): add indented AstrBot installer header
Soulter Oct 19, 2026
8019ff1
fix(install): apply indentation consistently
Soulter Oct 19, 2026
85ae454
feat(install): show AstrBot startup commands
Soulter Oct 19, 2026
e131cdd
docs(install): clarify AstrBot startup steps
Soulter Oct 19, 2026
99599d6
feat(install): fall back from Python mirror
Soulter Oct 19, 2026
f9bce8d
fix(install): keep Windows setup in one console
Soulter Oct 19, 2026
b68627b
ci: run install tests in fixed shells
Soulter Oct 19, 2026
f0bcbd7
fix(install): tolerate a removed current directory
Soulter Oct 19, 2026
666f8a0
docs: simplify script deployment instructions
Soulter Oct 19, 2026
d7c66c8
fix(install): align Bash wizard with PowerShell flow
Soulter Oct 19, 2026
23cb404
fix(install): refresh shell before manual startup
Soulter Oct 19, 2026
f9c95d3
docs: rename deployment sidebar entries
Soulter Oct 19, 2026
7a2b5df
fix: restore PowerShell 5.1 installer compatibility
Soulter Oct 19, 2026
b05a46f
test: isolate reboot thread mock from asyncio executor
Soulter Oct 19, 2026
2a0a730
test: shorten long prompt IDs for Windows
Soulter Oct 19, 2026
13d18bb
fix: keep completed traces closed when update timestamps collide
Soulter Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/install_script_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test install scripts

on:
push:
branches:
- master
paths:
- 'docs/public/install.ps1'
- 'docs/public/install.sh'
- 'tests/test_install_script.py'
- 'tests/install_script.Tests.ps1'
- '.github/workflows/install_script_test.yml'
pull_request:
paths:
- 'docs/public/install.ps1'
- 'docs/public/install.sh'
- 'tests/test_install_script.py'
- 'tests/install_script.Tests.ps1'
- '.github/workflows/install_script_test.yml'
workflow_dispatch:

jobs:
test:
name: Windows PowerShell compatibility
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Test Windows PowerShell 5.1
shell: powershell
run: .\tests\install_script.Tests.ps1

- name: Test PowerShell 7
shell: pwsh
run: .\tests\install_script.Tests.ps1

shell:
name: Bash installer (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Test Bash installer
shell: bash
run: |
/bin/bash -n docs/public/install.sh
python3 tests/test_install_script.py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Visit [AstrBot Launcher](https://github.com/Raven95676/astrbot-launcher) to down

**More deployment methods**

If you need panel-based management or deeper customization, see [BT-Panel Deployment](https://docs.astrbot.app/deploy/astrbot/btpanel.html) for BT Panel app-store setup, [1Panel Deployment](https://docs.astrbot.app/deploy/astrbot/1panel.html) for 1Panel app-market deployment, [CasaOS Deployment](https://docs.astrbot.app/deploy/astrbot/casaos.html) for NAS/home-server visual deployment, and [Manual Deployment](https://docs.astrbot.app/deploy/astrbot/cli.html) for fully custom source-based installation with `uv`.
If you need panel-based management or deeper customization, see [BT-Panel Deployment](https://docs.astrbot.app/deploy/astrbot/btpanel.html), [1Panel Deployment](https://docs.astrbot.app/deploy/astrbot/1panel.html), [CasaOS Deployment](https://docs.astrbot.app/deploy/astrbot/casaos.html), or [Source Deployment](https://docs.astrbot.app/deploy/astrbot/cli.html).


## ❤️ Sponsors
Expand Down
2 changes: 1 addition & 1 deletion README_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ uv tool upgrade astrbot --python 3.12

**更多部署方式**

若你需要面板化或更高自訂程度的部署,可參考 [寶塔面板](https://docs.astrbot.app/deploy/astrbot/btpanel.html)(BT Panel 應用商店安裝)、[1Panel](https://docs.astrbot.app/deploy/astrbot/1panel.html)(1Panel 應用商店安裝)、[CasaOS](https://docs.astrbot.app/deploy/astrbot/casaos.html)(NAS / 家用伺服器可視化部署)與 [手動部署](https://docs.astrbot.app/deploy/astrbot/cli.html)(基於原始碼與 `uv` 的完整自訂安裝)。
若你需要面板化或更高自訂程度的部署,可參考 [寶塔面板](https://docs.astrbot.app/deploy/astrbot/btpanel.html)、[1Panel](https://docs.astrbot.app/deploy/astrbot/1panel.html)、[CasaOS](https://docs.astrbot.app/deploy/astrbot/casaos.html) 或 [原始碼部署](https://docs.astrbot.app/deploy/astrbot/cli.html)。

## ❤️ 贊助商

Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ uv tool upgrade astrbot --python 3.12

**更多部署方式**

若你需要面板化或更高自定义部署,可参考 [宝塔面板](https://docs.astrbot.app/deploy/astrbot/btpanel.html)(BT Panel 应用商店安装)、[1Panel](https://docs.astrbot.app/deploy/astrbot/1panel.html)(1Panel 应用商店安装)、[CasaOS](https://docs.astrbot.app/deploy/astrbot/casaos.html)(NAS / 家庭服务器可视化部署)和 [手动部署](https://docs.astrbot.app/deploy/astrbot/cli.html)(基于源码与 `uv` 的完整自定义安装)。
若你需要面板化或更高自定义部署,可参考 [宝塔面板](https://docs.astrbot.app/deploy/astrbot/btpanel.html)、[1Panel](https://docs.astrbot.app/deploy/astrbot/1panel.html)、[CasaOS](https://docs.astrbot.app/deploy/astrbot/casaos.html) 和 [源码部署](https://docs.astrbot.app/deploy/astrbot/cli.html)。

## ❤️ 赞助商

Expand Down
3 changes: 2 additions & 1 deletion astrbot/core/utils/trace_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ def _write(self, connection: sqlite3.Connection, batch: list[dict]) -> None:
has_models=MAX(traces.has_models, excluded.has_models),
has_plugins=MAX(traces.has_plugins, excluded.has_plugins),
search=excluded.search, data=excluded.data, size_bytes=excluded.size_bytes
WHERE excluded.updated_ns >= traces.updated_ns""",
WHERE excluded.updated_ns >= traces.updated_ns
AND (traces.state = 'running' OR excluded.state != 'running')""",
(
trace_id,
int(summary["start_time_unix_nano"]),
Expand Down
8 changes: 4 additions & 4 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ export default defineConfig({
base: "/deploy",
collapsed: false,
items: [
{ text: "包管理器部署", link: "/astrbot/package" },
{ text: "脚本部署", link: "/astrbot/package" },
{ text: "雨云一键云部署", link: "/astrbot/rainyun" },
{ text: "桌面客户端部署", link: "/astrbot/desktop" },
{ text: "启动器一键部署", link: "/astrbot/launcher" },
{ text: "Docker 部署", link: "/astrbot/docker" },
{ text: "Kubernetes 部署", link: "/astrbot/kubernetes" },
{ text: "宝塔面板部署", link: "/astrbot/btpanel" },
{ text: "1Panel 部署", link: "/astrbot/1panel" },
{ text: "手动部署", link: "/astrbot/cli" },
{ text: "源码部署", link: "/astrbot/cli" },
{
text: "其他部署方式",
link: "/astrbot/other-deployments",
Expand Down Expand Up @@ -313,14 +313,14 @@ export default defineConfig({
base: "/en/deploy",
collapsed: false,
items: [
{ text: "Package Manager", link: "/astrbot/package" },
{ text: "Script Deployment", link: "/astrbot/package" },
{ text: "Desktop Client", link: "/astrbot/desktop" },
{ text: "One-click Launcher", link: "/astrbot/launcher" },
{ text: "Docker", link: "/astrbot/docker" },
{ text: "Kubernetes", link: "/astrbot/kubernetes" },
{ text: "BT Panel", link: "/astrbot/btpanel" },
{ text: "1Panel", link: "/astrbot/1panel" },
{ text: "Manual", link: "/astrbot/cli" },
{ text: "Source Deployment", link: "/astrbot/cli" },
{
text: "Other Deployments",
link: "/astrbot/other-deployments",
Expand Down
67 changes: 54 additions & 13 deletions docs/en/deploy/astrbot/package.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,65 @@
# Package Manager Deployment (uv)
# Script Deployment

Use `uv` to install and run AstrBot quickly.
AstrBot provides installation scripts for Linux, macOS, WSL, and Windows. The scripts install `uv`, AstrBot, and Python 3.12.

## Before You Start
## Linux / macOS / WSL

If `uv` is not installed, install it first by following the official guide:
<https://docs.astral.sh/uv/>
Interactive installation:

`uv` supports Linux, Windows, and macOS.
```bash
curl -fsSL https://docs.astrbot.app/install.sh | bash
```

Unattended installation:

```bash
curl -fsSL https://docs.astrbot.app/install.sh -o install.sh
bash install.sh --language en-US --download-source official --non-interactive
```

`--download-source` accepts `china`, `official`, or `custom`. The default language is English. If the source is omitted, Chinese uses the mainland China mirrors; English and Japanese use official sources.

## Windows

Run these commands in PowerShell 5.1 or PowerShell 7+.

Interactive installation:

## Important Notes
```powershell
irm https://docs.astrbot.app/install.ps1 | iex
```

Unattended installation:

```powershell
Invoke-WebRequest https://docs.astrbot.app/install.ps1 -OutFile install.ps1 -UseBasicParsing
.\install.ps1 -Language en-US -DownloadSource official -NonInteractive
```

`-DownloadSource` accepts `china`, `official`, or `custom`. The default language is English. If the source is omitted, Chinese uses the mainland China mirrors; English and Japanese use official sources.

> [!WARNING]
> AstrBot deployed via `uv` **does not support upgrading through the WebUI**. To update, run `uv tool upgrade astrbot --python 3.12` from the command line.
The mainland China option also configures the USTC mirror for Python 3.12 and retries with the official Python source on failure. Existing Python mirror environment variables or explicit options take priority.

AstrBot requires Python 3.12 or later. Use `--python 3.12` to ensure that `uv` creates the tool environment with Python 3.12; if Python downloads are enabled, `uv` will download Python 3.12 automatically when it is missing.
## After Installation

## Install and Start
The installer runs `uv tool update-shell`. Reload the environment for your shell:

```bash
uv tool install astrbot --python 3.12
astrbot
# Bash
source ~/.bashrc
# Zsh
source ~/.zshrc
# Fish
source ~/.config/fish/config.fish
# PowerShell
. $PROFILE
```

Then run these commands manually:

```bash
astrbot init
astrbot run
```

> AstrBot installed by script does not support upgrades through the WebUI. Run `uv tool upgrade astrbot --python 3.12` to update it.
Loading
Loading