--- description: View current Gitea configuration and runner status --- Display the current Gitea configuration and runner status. ## 工作目录 **macOS / Linux:** ``` ~/.config/gitea/ ``` **Windows:** ``` %USERPROFILE%\.config\gitea\ ``` Please perform the following: 1. **Check if configuration exists:** - Config file: - macOS/Linux: `~/.config/gitea/config.env` - Windows: `%USERPROFILE%\.config\gitea\config.env` - If not exists, prompt user to run `/gitea-reset` 2. **Load and display configuration:** **macOS / Linux:** ```bash source ~/.config/gitea/config.env ``` **Windows PowerShell:** ```powershell Get-Content "$env:USERPROFILE\.config\gitea\config.env" | ForEach-Object { if ($_ -match '^([^=]+)=(.*)$') { [Environment]::SetEnvironmentVariable($matches[1], $matches[2], 'Process') } } ``` Show in Chinese: - Gitea URL - Default organization (if set) - Config file path (根据平台显示正确路径) 3. **Validate token and display user info:** - Call API: `GET ${GITEA_URL}/api/v1/user` - Header: `Authorization: token ${GITEA_TOKEN}` - Show: Token status (✓ 有效 / ✗ 无效), username, email 4. **Display runner information:** - Runners directory: - macOS/Linux: `~/.config/gitea/runners` - Windows: `%USERPROFILE%\.config\gitea\runners` - Count configured runners - List each runner with status: - 🟢 运行中 (process running) - 🔴 已停止 (process not running) - ⚠️ 配置异常 (config file missing) 5. **Show management commands:** ``` 管理命令: - 重置配置: /gitea-reset - 切换组织: /gitea-switch-org - 列出 Runners: /gitea-list-runners - 创建仓库: /create-gitea-repo ``` Use `jq` to parse JSON responses and `pgrep` to check runner process status.