01 help / version
帮助与版本。不熟悉命令时从这里开始。
astray --help
astray --version
仅完整 Astray CLI(Rust)。OAuth、REPL、YOLO、skills、MCP。
curl -fsSL https://theastraydev.online/install.sh | bash
curl / iwr 走 theastraydev.online — 自己的安装脚本与二进制。
步骤 1
自动检测;可随时切换。下方安装说明会更新。
步骤 2
推荐:从 theastraydev.online 运行 one-liner。自动识别系统/架构并放入 PATH。
curl -fsSL https://theastraydev.online/install.sh | bash
# custom prefix
curl -fsSL https://theastraydev.online/install.sh | bash -s -- --prefix "$HOME/.local"
# force reinstall
curl -fsSL https://theastraydev.online/install.sh | bash -s -- --force
mkdir -p ~/.local/bin
curl -fsSL https://theastraydev.online/downloads/cli/latest/astray-linux-x86_64 \
-o ~/.local/bin/astray
chmod +x ~/.local/bin/astray
# PATH (once)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
astray --version
astray --doctor
astray --login
install.sh 后运行 astray --version 与 astray doctor。PATH 未生效则重开 shell。
# native macOS builds ship soon — build release from source:
# (need Rust: https://rustup.rs)
git clone https://github.com/yourusername/astray-cli.git
cd astray-cli
cargo build --release
mkdir -p ~/.local/bin
cp target/release/astray ~/.local/bin/astray
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
astray --version
astray --doctor
astray --login
# Prebuilt macOS binaries are not on the CDN yet.
# Use cargo build --release (above) or run Linux binary via Lima/UTM/Docker.
Apple Silicon 会拉取 aarch64。若系统拦截,在「安全性与隐私」中允许。
iwr -useb https://theastraydev.online/install.ps1 | iex
$dir = "$env:LOCALAPPDATA\Astray\bin"
New-Item -ItemType Directory -Force -Path $dir | Out-Null
Invoke-WebRequest -Uri "https://theastraydev.online/downloads/cli/latest/astray-windows-x86_64.exe" `
-OutFile "$dir\astray.exe" -UseBasicParsing
# add $dir to User PATH, open a new terminal
astray --version
astray --doctor
astray --login
# inside WSL (Linux binary)
curl -fsSL https://theastraydev.online/install.sh | bashastray --version
astray --doctor
astray --login
PowerShell:iwr … | iex。或在 WSL 用 curl one-liner。新开终端以刷新 PATH。
步骤 3
完整原生 astray。详见 astray --help。
帮助与版本。不熟悉命令时从这里开始。
astray --help
astray --version
OAuth 登录 xAI/Grok(浏览器 + code)。
astray --login
# or paste code / token
astray --login-code
astray --login-token
交互 REPL。-y YOLO,-m 模型,--ask 单次。
astray
astray -y # YOLO agent
astray -m grok-4.5 # pick model
astray --ask "whoami" # one-shot
环境检查与从 theastraydev.online 自更新原生二进制。
astray --doctor
astray --update
# REPL:
/doctor
/update
模型 / skills / MCP / config / logout。
astray --list-models
astray --list-skills
astray --list-mcp
astray --config
astray --logout
校验
# installer (always via your domain)
curl -fsSL https://theastraydev.online/install.sh | less
# native linux binary
curl -fsSL https://theastraydev.online/downloads/cli/latest/astray-linux-x86_64 -o astray
chmod +x astray && ./astray --version
# version pin
curl -fsSL https://theastraydev.online/downloads/cli/latest/VERSION
请只从 theastraydev.online 获取 install.sh 与二进制。需要时可先 less 再 bash。
需要定制 CLI 工作流?发 brief。