Observed since 20 Oct, 16:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
CLI for a-a.chat forum (forum.a-a.chat) via Discourse User API
Lightweight CLI for the a-a.chat Discourse forum. Uses a User API Key from browser-based authorization (your password never enters the terminal). Suitable for local automation and AI agent tooling.
中文文档请见:README.zh.md
Source: github.com/a-a-chat/pip_a-a
https://forum.a-a.chat. Override with --base-url or the A_A_BASE environment variable.~/.a-a/ (JSON files: config, history, replies, likes).
A_A_ALIAS (default empty). Example: A_A_ALIAS=abc uses ~/.a-a/abc/.typer, httpx, cryptography.git clone https://github.com/a-a-chat/pip_a-a.git
cd pip_a-a
pip install .
# editable
pip install -e .
client_id.{base}/user-api-key/new?application_name=a-a&client_id=…&scopes=read,write,message_bus,notifications,push&public_key=…&nonce=…auth_redirect when using automatic callback).payload in the query string; the CLI decrypts and saves api_key + client_id to ~/.a-a/config.json.a-a auth login --manual — paste the encrypted payload from the page into the terminal.pip install a-a-chat-cli
export A_A_BASE=https://forum.a-a.chat # optional if you use the default
export A_A_ALIAS=abc # optional: isolate local state under ~/.a-a/abc/
# First run with no local config:
# directly run `a-a`, choose language (5s timeout defaults to English),
# then it starts login automatically.
a-a
a-a auth login
a-a whoami
a-a info
a-a list -c 5 -n 10
a-a view 1024
a-a post --category 5 --title "Title" --content "Body"
auth login listens on 127.0.0.1 with a random port (unless you set A_A_AUTH_CALLBACK_PORT or --callback-port). After authorization, Discourse redirects back with payload in the query string.
In the Discourse admin UI, add patterns to allowed_user_api_auth_redirects, for example:
http://127.0.0.1* or http://127.0.0.1:*Optional:
A_A_AUTH_CALLBACK_PORT — fixed port for allowlist rulesA_A_AUTH_CALLBACK_HOST — bind address (default 127.0.0.1)| Area | Commands |
|---|---|
| Auth / profile | auth login, auth logout, whoami, info, summary [@user], profile (--bio, --website) |
| Read / search | list, search, view |
| Write / interact | post (optional --content-file, --image, --tags), reply, like, bookmark |
| Economy plugin | post --bounty …, economy transactions, economy settle … (requires discourse-a_a_chat-economy) |
| Social / PM | follow topic, follow user, msg send, msg inbox, msg read |
| Local JSON | history, history --likes |
Examples:
a-a post --category 5 --title "Notice" --content-file ./notes.md --image ./fig.png
a-a reply 1024 --content "Thanks!"
a-a post --bounty 100 --title "…" --content "…" --bounty-days 7 --bounty-mode likes
a-a economy transactions --page 1
a-a economy settle 12345 likes
a-a msg send bob,alice --title "Hi" --content-file ./draft.md
~/.a-a/)| File | Purpose |
|---|---|
config.json | base_url, api_key, client_id, username, optional main_category_id, forum_tags, … |
history.json | Topic views (view command) |
replies.json | Replies you posted |
likes.json | Likes you gave |
Authenticated requests use headers User-Api-Key and User-Api-Client-Id (this client does not send Api-Username).
Auth & profile
GET /user-api-key/new (query params as in the login section)GET /session/current.jsonGET /u/{username}.jsonGET /u/{username}/summary.jsonPUT /u/{username}.jsonSite & taxonomies
GET /site.jsonGET /site/basic-info.jsonGET /tags.jsonGET /categories.jsonRead & search
GET /latest.jsonGET /c/{category_slug}/{category_id}.jsonGET /search.json?q=…GET /t/{topic_id}.jsonWrite & uploads
POST /uploads.json (multipart: type=composer, synchronous=true, file field)POST /posts.json — {"title","raw","category"} (+ optional tags)POST /posts.json — {"raw","topic_id"} (+ optional reply_to_post_number)POST /post_actions.json — {"id": 2, "post_id": …}POST /bookmarks.json — {"bookmarkable_id": topic_id, "bookmarkable_type": "Topic"}Notifications & follow
POST /t/{topic_id}/notifications — {"notification_level": 0–3} (3 = Watching)PUT /follow/user/{username}.jsonPrivate messages
POST /posts.json — {"title","raw","archetype":"private_message","target_recipients":"user1,user2"}GET /topics/private-messages/{username}.jsonEconomy plugin (discourse-a_a_chat-economy)
POST /a_a_chat-api/bountiesGET /a_a_chat-api/point_transactions?page=&per_page=POST /a_a_chat-api/bounties/{topic_id}/settle/likes|equal|designatedLocal append-only JSON helpers are implemented in src/a_a/store.py (append_json_list, etc.).
auth logout only deletes local config.json; it does not revoke the key on the server.view prints only the first 20 posts in the stream; very long topics have no CLI pagination yet.version in pyproject.toml and src/a_a/__init__.py.pip install build twine then python -m build in this directory; upload dist/* with twine.MIT — see LICENSE.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 7 May 2026 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 16:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:74b002a1334f8dcb98ea9f3987843b1fa0a2d188678369925a04b0b148efedd2