Skip to content

Mobayilo CLI - Product Requirements Document (PRD)

Mobayilo CLI - Product Requirements Document (PRD)

Section titled “Mobayilo CLI - Product Requirements Document (PRD)”

Mobayilo CLI (moby) is a developer-first terminal interface for the Mobayilo international calling platform. It allows users to authenticate, check balances, lookup rates, and initiate calls directly from their terminal.

  • Power users who spend most of their time in the terminal.
  • Developers looking to integrate Mobayilo into their workflows.
  • Users who prefer a fast, keyboard-driven interface over the web UI.
  • Login: Users can authenticate via an API key or a browser-based OAuth-like flow.
  • Logout: Securely remove stored credentials from the local machine (using system keychain).
  • Status: Check which account is currently active.
  • Initiate Call: Trigger a call between the user’s verified Caller ID and a destination number.
  • Call History: List recent calls with duration and cost.
  • Balance: Show current credit balance in local currency.
  • Top-up: Generate a Stripe Checkout link to add credits.
  • Rates: Lookup calling rates for any country by ISO code or phone prefix.
  • List/Search: Access Mobayilo contacts via the terminal.
  • Quick Dial: Call a contact by name.

4.1 CLI Architecture (The “moby” tool)

Section titled “4.1 CLI Architecture (The “moby” tool)”
  • Language: Go (1.23+).
  • CLI Framework: Kong for declarative command structures.
  • Secure Storage: keyring for storing API tokens.
  • Output: JSON-first (for scripting) with pretty-printed tables for humans.

4.2 Backend Requirements (Mobayilo Rails App)

Section titled “4.2 Backend Requirements (Mobayilo Rails App)”
  • API Tokens: Implement a PersonalAccessToken model for secure CLI access.
  • CLI Endpoints:
    • POST /api/cli/tokens: Generate a token.
    • GET /api/cli/me: Return current user/account status.
    • POST /api/cli/calls: Trigger a “Click-to-Call” (connect user’s verified number to destination).
  • CORS/Security: Ensure CLI requests are properly authenticated and rate-limited.
Terminal window
# Login
moby login
# Check balance
moby balance
# Check rates
moby rates us
# Make a call (connects your verified phone to the target)
moby call +15551234567
# Top up
moby topup 5
  • Average time to initiate a call from terminal vs web.
  • Number of active CLI users.
  • Percentage of top-ups initiated via CLI.