A typed Rubika CLI for personal account automation over Rubika's encrypted web/private JSON services. Its command conventions now match the Bale CLI: named profiles, global debug flags, structured failures, raw response artifacts, predictable exit behavior, and familiar auth, contacts, messages, profiles, diagnostics, and raw groups.
- OTP login for multiple isolated profiles
- active-profile selection and per-command
--profile - contacts, dialogs, history, search, text sends, and single-file media sends
- target resolution by GUID, phone, contact name, or recent-dialog title
- explicit confirmation for sends with
--yesautomation override - layered detection for request, network, HTTP, JSON, encryption, application, and upload failures
- HTTP and application rate-limit detection using explicit server signals
- retry-time parsing from
Retry-Afterand known Rubika response fields - safe API-host failover for network/server/protocol failures
--debug -v/-vv/-vvvresponse logging and exact raw response artifacts- HAR failure inspection
The project does not classify an account as limited merely because several sends failed. Rate limits, blocks, permissions, restrictions, and authentication failures are classified from explicit HTTP or decrypted Rubika response data.
uv sync --extra dev
uv run rubika --helpOr:
uv tool install .
rubika --helprubika --profile personal auth login 09123456789
rubika profiles use personal
rubika status
rubika contacts list
rubika messages dialogs
rubika messages send Hamed "hello" --yesDebug a send and preserve the actual response:
rubika --profile personal --debug -vvv messages send Hamed "hello" --yesInspect a HAR:
rubika diagnostics har-errors ./rubika.har --json~/.config/rubika-cli/profiles/active-profile.json
~/.config/rubika-cli/profiles/<profile>/session.json
~/.config/rubika-cli/profiles/<profile>/session.json.challenge
Session files contain Rubika authentication and private-key material. They are created with owner-only permissions. Never commit or share them.
Debug sessions default to .rubika-debug/<timestamp>-pid<id>/. Request JSON and structured logs redact auth keys, private keys, signatures, cookies, OTP data, and token-shaped fields. Exact raw response files and decoded response artifacts can still contain private account content; inspect them before sharing.
The supplied Rubika assets and HAR use JSON over HTTPS with optional data_enc encryption, not Bale's gRPC-Web protocol. Consequently, this CLI implements Rubika-specific HTTP, JSON, decryption, and application-status handling while keeping the user-facing CLI conventions consistent with Bale.
uv run --extra dev pytest
uv run --extra dev ruff check src tests
uv run --extra dev mypyUse this only with your own Rubika accounts and with recipients who expect communication. The CLI does not include scraping, contact harvesting, or multi-recipient blasting.