mirror of
https://github.com/HKUDS/CLI-Anything.git
synced 2026-09-18 23:42:43 +08:00
4a2e21e3f7
CLI side (bumped to 0.2.3 so it ships to PyPI):
- track_install / track_uninstall: drop ":{cli_name}" suffix; event names
become static "cli-install" / "cli-uninstall" with CLI name moved to
properties.cli. Keeps PostHog's event catalog flat and makes breakdowns
by CLI a simple property filter.
- Add track_launch(cli_name) firing "cli-launch" from `cli-hub launch <name>`,
so we have a real usage signal distinct from install intent.
- Tests updated to match the flat event names; new test for cli-launch.
Web side:
- Replace frozen BASELINE_STATS + PostHog-increment flow with a live
merge of two sources fetched every 60s:
* PostHog HogQL (via Cloudflare Worker, allow-listed query) —
counts visit-human/agent, cli-hub call split, and both flattened
and legacy-colon-prefixed cli-install/cli-uninstall, plus cli-launch.
* Umami events/series (via same Worker, new /umami/events endpoint)
for pre-migration events that PostHog never saw.
BASELINE_STATS survives as last-resort fallback only.
- cli_hub_total now aggregates cli-hub call + cli-install + cli-uninstall
+ cli-launch so the footer's "cli-hub" number reflects end-to-end
activity; human/agent split stays tied to cli-hub call only because
Umami install events don't carry is_agent.
12 KiB
12 KiB