Operate GEOrank Workbench
Operate a running GEOrank instance with explicit access checks, dry runs, secret redaction, and execution receipts.
Workflow
- Confirm the instance base URL. Use
http://localhost:8000 only for a local instance; remote instances must use HTTPS.
- Resolve authentication without asking the user to choose a role:
python3 scripts/georank_client.py login --account <account>
python3 scripts/georank_client.py whoami
- Enable administrator actions only when
/api/auth/me returns role=admin.
- Read references/user-capabilities.md for public and user-owned operations. Read references/admin-capabilities.md only for administrator work.
- Execute reads directly with
call GET. Treat every non-read call as a side effect.
- For writes, run the request without
--execute, show the redacted preflight, and execute only when the user clearly authorizes that exact change.
- Before administrator writes, read references/safety-policy.md and apply the required confirmation phrase.
- Return a receipt: access level, operation, target, dry-run/executed state, API status, resource ID, request ID, redacted summary, next step, and rollback guidance when relevant.
Common operations
# Read current identity
python3 scripts/georank_client.py whoami
# Start a diagnosis: preflight first, then execute
python3 scripts/georank_client.py call POST /api/diagnostics/ --json-file /tmp/diagnosis.json
python3 scripts/georank_client.py call POST /api/diagnostics/ --json-file /tmp/diagnosis.json --execute
# Expand keywords
python3 scripts/georank_client.py call POST /api/keywords/expand --json-file /tmp/keywords.json
Safety boundaries
- Never place passwords, tokens, API keys, cookies, or credentials in chat, command arguments, reports, fixtures, or commits.
- Login reads a hidden prompt or
GEORANK_PASSWORD; calls read GEORANK_TOKEN or the protected session file.
- User/public writes require
--execute; administrator writes require --execute --confirm APPLY_ADMIN_CHANGE.
- Deletes require the exact
DELETE:<api-path-with-query> confirmation.
- Stop on ambiguous targets, insufficient permissions, missing rollback for high-impact changes, or an unknown write outcome after a network failure.
- Do not represent GEOrank diagnostics as guaranteed rankings or recommendations by any AI platform.
Reference map
- references/user-capabilities.md: public and ordinary-user API operations.
- references/admin-capabilities.md: administrator operation groups and gates.
- references/safety-policy.md: authentication, secrets, side effects, polling, and rollback.
scripts/georank_client.py: deterministic, standard-library API client.
tests/test_georank_client.py: client safety and behavior tests.
1---2name: operate-georank-workbench3description: 通过 HTTP API 安全操作自部署的 GEOrank 系统。适用于登录与账户检查、网站诊断、读取诊断报告、方案对话、关键词拓展、用量查询,以及经明确授权的管理员配置和内容管理。若没有可访问的 GEOrank 实例,不用于一般 GEO 咨询或策略规划。4---56# Operate GEOrank Workbench78Operate a running GEOrank instance with explicit access checks, dry runs, secret redaction, and execution receipts.910## Workflow11121. Confirm the instance base URL. Use `http://localhost:8000` only for a local instance; remote instances must use HTTPS.132. Resolve authentication without asking the user to choose a role:14 - `python3 scripts/georank_client.py login --account <account>`15 - `python3 scripts/georank_client.py whoami`16 - Enable administrator actions only when `/api/auth/me` returns `role=admin`.173. Read [references/user-capabilities.md](references/user-capabilities.md) for public and user-owned operations. Read [references/admin-capabilities.md](references/admin-capabilities.md) only for administrator work.184. Execute reads directly with `call GET`. Treat every non-read call as a side effect.195. For writes, run the request without `--execute`, show the redacted preflight, and execute only when the user clearly authorizes that exact change.206. Before administrator writes, read [references/safety-policy.md](references/safety-policy.md) and apply the required confirmation phrase.217. Return a receipt: access level, operation, target, dry-run/executed state, API status, resource ID, request ID, redacted summary, next step, and rollback guidance when relevant.2223## Common operations2425```bash26# Read current identity27python3 scripts/georank_client.py whoami2829# Start a diagnosis: preflight first, then execute30python3 scripts/georank_client.py call POST /api/diagnostics/ --json-file /tmp/diagnosis.json31python3 scripts/georank_client.py call POST /api/diagnostics/ --json-file /tmp/diagnosis.json --execute3233# Expand keywords34python3 scripts/georank_client.py call POST /api/keywords/expand --json-file /tmp/keywords.json35```3637## Safety boundaries3839- Never place passwords, tokens, API keys, cookies, or credentials in chat, command arguments, reports, fixtures, or commits.40- Login reads a hidden prompt or `GEORANK_PASSWORD`; calls read `GEORANK_TOKEN` or the protected session file.41- User/public writes require `--execute`; administrator writes require `--execute --confirm APPLY_ADMIN_CHANGE`.42- Deletes require the exact `DELETE:<api-path-with-query>` confirmation.43- Stop on ambiguous targets, insufficient permissions, missing rollback for high-impact changes, or an unknown write outcome after a network failure.44- Do not represent GEOrank diagnostics as guaranteed rankings or recommendations by any AI platform.4546## Reference map4748- [references/user-capabilities.md](references/user-capabilities.md): public and ordinary-user API operations.49- [references/admin-capabilities.md](references/admin-capabilities.md): administrator operation groups and gates.50- [references/safety-policy.md](references/safety-policy.md): authentication, secrets, side effects, polling, and rollback.51- `scripts/georank_client.py`: deterministic, standard-library API client.52- `tests/test_georank_client.py`: client safety and behavior tests.