How payu-intrepos/payu-cli works
PayU-CLI is a command-line client for PayU OneAPI. A user invokes a command, the registered command module validates options and selects a PayUClient operation, the client obtains OAuth headers and makes an HTTP request, then command-specific formatters present the returned data. The CLI also manages named credential profiles and reports. README documents payment links, invoices, transactions, refunds, settlements, and reports; some of those command implementations were not sampled, so their internal links are shown only where documented. The root-level legacy modules are omitted. Evidence is limited to the README and indexed excerpts; unsampled implementation details are not inferred.
Main entry points: main.py Command registry · api.py OneAPI HTTP client · formatters.py Rich formatters · payments.py Payment commands
Components 15
CLI entry
- Command registry
payu_cli/main.py - Profile commands
payu_cli/main.py - Command group behavior
payu_cli/cli_group.py
Payment operations
- Payment commands
payu_cli/commands/payments.py - Transaction commands
payu_cli/commands/transactions.py - Refund commands
payu_cli/commands/refunds.py - Settlement commands
payu_cli/commands/settlements.py - Report commands
payu_cli/commands/reports.py
API and identity
- Credential profiles
payu_cli/config.py - OS keyring
- OAuth token manager
payu_cli/auth.py - OneAPI HTTP client
payu_cli/api.py
Output
- Rich formatters
payu_cli/formatters.py
Other components
- CLI user
- PayU OneAPI
Connections 24
- CLI user → Command registry: invokes
README.md - Command registry → Payment commands: registers
payu_cli/main.py - Command registry → Transaction commands: registers
payu_cli/main.py - Command registry → Refund commands: registers
payu_cli/main.py - Command registry → Settlement commands: registers
payu_cli/main.py - Command registry → Report commands: registers
payu_cli/main.py - Command registry → Profile commands: handles
payu_cli/main.py - Command registry → Command group behavior: uses
payu_cli/main.py - Profile commands → Credential profiles: reads and saves
payu_cli/main.py - Credential profiles → OS keyring: stores secrets
payu_cli/config.py - Payment commands → OneAPI HTTP client: calls
payu_cli/commands/payments.py - Transaction commands → OneAPI HTTP client: calls
payu_cli/commands/transactions.py - Refund commands → OneAPI HTTP client: calls
payu_cli/commands/refunds.py - Settlement commands → OneAPI HTTP client: calls
payu_cli/commands/settlements.py - Report commands → OneAPI HTTP client: calls
payu_cli/commands/reports.py - OneAPI HTTP client → OAuth token manager: gets headers
payu_cli/api.py - OAuth token manager → Credential profiles: loads profile
payu_cli/auth.py - OneAPI HTTP client → PayU OneAPI: sends API requests
payu_cli/api.py - OAuth token manager → PayU OneAPI: requests OAuth token
payu_cli/auth.py - Payment commands → Rich formatters: formats results
payu_cli/commands/payments.py - Transaction commands → Rich formatters: formats results
payu_cli/commands/transactions.py - Refund commands → Rich formatters: formats results
payu_cli/commands/refunds.py - Settlement commands → Rich formatters: formats results
payu_cli/commands/settlements.py - Report commands → Rich formatters: formats results
payu_cli/commands/reports.py