Telegram bot for Floway users to bind their Floway account, manage their own API keys, inspect upstreams, and view Codex primary/secondary-window usage.
corepack enable
corepack pnpm install
cp .env.example .env
openssl rand -base64 32Fill .env, then run:
corepack pnpm devProduction build:
corepack pnpm build
corepack pnpm start/bind <username> <password>/unbind/me/info/upstreams/upstream <upstream_id>/keys/newkey <name> [all|upstream_id[,upstream_id...]]/delkey <key_id>/rotatekey <key_id>/usage <upstream_id>/quota [verbose] <upstream_id>/leaderboard [1d|7d|30d]
Binding, upstream, key, usage, quota, and leaderboard operations are private-chat only.
Passwords are exchanged for a Floway session and are never stored. Floway
sessions are encrypted locally with BOT_SECRET_KEY.
The bot also polls available upstreams and sends bound users a private summary
when an upstream's Codex secondary window advances. Tune the poll interval with
SECONDARY_WINDOW_NOTIFY_INTERVAL_SECONDS.
Telegram supports one-shot /start payload links. Generate a bind link with:
corepack pnpm bind-link <username-or-user-id> <password>The link has this shape:
https://t.me/<bot_username>?start=<payload>
Telegram limits the start payload to 64 characters after encoding, so this only
works for short usernames/user ids and passwords. If the generator reports the
payload is too long, use /bind <username> <password> instead.