Getting Started
Get up and running with Paystack CLI in just a few minutes.
Installation
Install the CLI globally using your preferred package manager:
bash
npm install -g @toneflix/paystack-clibash
pnpm add -g @toneflix/paystack-clibash
yarn global add @toneflix/paystack-cliVerify Installation
After installation, verify the CLI is installed correctly:
bash
paystack-cli --versionThis should display the current version of the CLI.
Prerequisites
Before using the CLI, ensure you have:
- Node.js - Version 18 or higher
- Paystack Account - Sign up at paystack.com
- Active Integration - At least one Paystack integration (test or live)
First Steps
1. Initialize the CLI
Initialize the application and set up the local database:
bash
paystack-cli initThis creates a local SQLite database to store your configuration and session data.
2. Login to Paystack
Authenticate with your Paystack account:
bash
paystack-cli loginYou'll be prompted for:
- Your Paystack account email
- Your password
- Whether to remember your email
After successful login, if you have multiple integrations, you'll select which one to use.
3. Start Using Commands
You're now ready to start using Paystack API commands:
bash
# List all transactions
paystack-cli transaction:list
# Create a customer
paystack-cli customer:create --email=user@example.com --first_name=John
# Initialize a transaction
paystack-cli transaction:initialize --email=customer@email.com --amount=10000Next Steps
Now that you have the CLI installed and configured:
- Learn about Authentication and session management
- Explore Commands to see what's available
- Set up Webhook Testing for local development
- Check out Examples for common workflows