Skip to content

Create command-line interface for JDPI operations #9

@agramms

Description

@agramms

🎯 Objective

Create a comprehensive command-line interface (CLI) for JDPI operations to improve developer experience, testing, and operational workflows.

💡 CLI Vision

A powerful, user-friendly CLI that enables developers to:

  • Test JDPI APIs interactively
  • Manage configurations across environments
  • Perform batch operations
  • Debug integration issues
  • Generate test data and scenarios

🚀 Core CLI Features

1. Configuration Management

# Initialize configuration
jdpi config init --environment staging

# Set configuration values
jdpi config set oauth.client_id YOUR_CLIENT_ID
jdpi config set oauth.secret YOUR_SECRET
jdpi config set host api.staging.jdpi.pstijd

# View current configuration
jdpi config show
jdpi config validate

2. Authentication Operations

# Get OAuth token
jdpi auth token --scopes "auth_apim,spi_api"

# Test token validity
jdpi auth validate

# Refresh token
jdpi auth refresh

3. Payment Operations (SPI OP)

# Create payment order
jdpi payments create \
  --amount 1500 \
  --pix-key "user@bank.com" \
  --description "Test payment" \
  --priority 0

# Check payment status
jdpi payments status ORDER_ID

4. PIX Key Management (DICT)

# Register PIX key
jdpi keys create \
  --type EMAIL \
  --key "user@bank.com" \
  --account-info account.json

# Claim existing key
jdpi keys claim \
  --key "user@bank.com" \
  --type OWNERSHIP

🏆 Success Criteria

  • CLI executable installed and working
  • All major JDPI operations accessible via CLI
  • Configuration management functional
  • Interactive mode working
  • Batch operations supported
  • Testing and debugging tools available
  • Comprehensive help and documentation
  • User-friendly error messages and output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions