Skip to content

CLI & admin ​

gra ​

Without a subcommand, gra runs the daemon: it connects to the bot, registers the command list, then long-polls Telegram and checks accounts until it receives SIGINT/SIGTERM. If an internal task stops unexpectedly the process exits with an error, so a supervisor (systemd, Docker --restart) can restart it.

gra doctor ​

Checks cookies and/or a profile before you run the daemon:

sh
gra doctor --cookies file:./cookies.txt --username natgeo
gra doctor --cookies "sessionid=...; csrftoken=...; ds_user_id=..." --user-agent "Mozilla/5.0 ..."

--cookies accepts a k=v; k2=v2 string, cookies.txt content, a browser cookie table, or file:<path>. Prefer file: to keep cookies out of your shell history. doctor exits with code 1 if the login test or the profile fetch fails.

Logs ​

Logs go to stderr unless log_file is set:

toml
log_file = "gra.log"   # gra.log.2026-08-10, rotated daily, 7 kept

Failures are logged with their full error chain. Users are notified in the bot once when an account starts failing; the account is then retried on its normal interval and the warning clears after the next successful check.

Released under the MIT License. Not affiliated with Instagram or Meta.