PHPackages                             karaodin/chargily-pay-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. karaodin/chargily-pay-cli

ActiveProject[CLI &amp; Console](/categories/cli)

karaodin/chargily-pay-cli
=========================

Professional CLI tool for Chargily Pay - Manage payments, customers, products, and payment links with advanced features and multi-application support.

v1.0.11(9mo ago)491MITPHPPHP ^8.1|^8.2|^8.3CI passing

Since Jul 22Pushed 9mo agoCompare

[ Source](https://github.com/karaOdin/chargily-pay-cli)[ Packagist](https://packagist.org/packages/karaodin/chargily-pay-cli)[ Docs](https://github.com/karaOdin/chargily-pay-cli)[ RSS](/packages/karaodin-chargily-pay-cli/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (12)Used By (0)

🚀 Chargily Pay CLI
==================

[](#-chargily-pay-cli)

Professional command-line interface for **Chargily Pay** - Algeria's leading payment gateway. Built for developers, businesses, and DevOps teams who need efficient payment management tools.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)](https://php.net)[![Laravel Zero](https://camo.githubusercontent.com/6d429afd6b382c0adede5e168cdc9c9450eaea492c147c6400889c156a8c362b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2532305a65726f2d31302e782d726564)](https://laravel-zero.com)

📸 Screenshots
-------------

[](#-screenshots)

### Main Interactive Menu

[](#main-interactive-menu)

[![Main Menu](docs/images/main-menu.png)](docs/images/main-menu.png)*Beautiful interactive menu with application and mode status*

### Payment Creation

[](#payment-creation)

[![Create Payment](docs/images/create-payment.png)](docs/images/create-payment.png)*Intuitive payment creation with real-time validation*

### Balance Monitoring

[](#balance-monitoring)

[![Balance Checker](docs/images/balance-checker.png)](docs/images/balance-checker.png)*Real-time balance monitoring across multiple currencies*

### Configuration Setup

[](#configuration-setup)

[![Configuration](docs/images/configueration.png)](docs/images/configueration.png)*Guided configuration setup with API key validation*

✨ Features
----------

[](#-features)

### 🎯 Core Payment Operations

[](#-core-payment-operations)

- **💳 Payment Creation** - Create secure checkout links with validation
- **📋 Payment Management** - List, filter, and track payment status
- **💰 Balance Monitoring** - Real-time account balance across currencies
- **📊 Export Capabilities** - CSV export for reporting and analysis

### 🏢 Multi-Application Support

[](#-multi-application-support)

- **🔄 App Switching** - Manage multiple Chargily applications seamlessly
- **🧪 Test/Live Modes** - Safe testing environment with live mode protection
- **⚙️ Configuration Management** - Secure API key storage and management
- **🎛️ Guided Setup** - Interactive wizard for first-time configuration

### 🎨 Professional UX

[](#-professional-ux)

- **🖥️ Interactive Menus** - Beautiful CLI interface with colored output
- **⚡ Smart Caching** - Optimized performance with intelligent caching
- **🔒 Security First** - Encrypted local storage, live mode warnings
- **📱 Modern Design** - Progress indicators, loading states, ESC shortcuts

🛠️ Quick Start
--------------

[](#️-quick-start)

### 📥 Installation (Dead Simple!)

[](#-installation-dead-simple)

**🎯 Method 1: Direct Download (No Dependencies!)**

Just download and run - works on any system with PHP:

**Windows:**

```
curl -L -o chargily.phar https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily-windows.phar
php chargily.phar
```

**Linux:**

```
curl -L -o chargily https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily-linux
chmod +x chargily
./chargily
```

**macOS:**

```
curl -L -o chargily https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily-macos
chmod +x chargily
./chargily
```

**🎯 Method 2: Via Composer**

```
composer global require karaodin/chargily-pay-cli
```

**Manual Installation (Advanced Users)**

```
# Install via Composer
composer global require karaodin/chargily-pay-cli

# Run directly:
~/.config/composer/vendor/bin/chargily  # Linux/macOS
php "%APPDATA%\Composer\vendor\karaodin\chargily-pay-cli\chargily"  # Windows
```

**⚡ Method 2: Direct Executable Download**

**Linux:**

```
curl -L https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily-linux -o chargily
chmod +x chargily
sudo mv chargily /usr/local/bin/
chargily  # Ready to use!
```

**macOS:**

```
curl -L https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily-macos -o chargily
chmod +x chargily
sudo mv chargily /usr/local/bin/
chargily  # Ready to use!
```

**Windows:**

```
# Download and run directly (no setup needed!)
curl -L https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily-windows.phar -o chargily.phar
php chargily.phar  # Works immediately

# Or add to PATH for global access
move chargily.phar C:\Windows\System32\
chargily.phar  # Use anywhere
```

**🐳 Method 3: Docker**

```
docker run -it ghcr.io/karaodin/chargily-pay-cli:latest
```

> **✅ Zero Configuration**: No environment variables, PHP extensions, or complex setup! The CLI automatically:
>
> - Stores config in `~/.chargily/` folder
> - Shows startup wizard for first-time users
> - Works on Windows, Linux, and macOS
> - Falls back to individual commands if interactive menus aren't supported

### First Run

[](#first-run)

```
chargily
```

The CLI will guide you through the setup process:

1. 🎯 **Welcome screen** with feature overview
2. 🔑 **API Key Setup** with links to Chargily dashboard
3. 🧪 **Test Environment** configuration (recommended first)
4. ✅ **Ready to use** - start managing payments!

📖 Usage Examples
----------------

[](#-usage-examples)

### Basic Commands

[](#basic-commands)

```
# Check account balance
chargily balance

# Create a new payment
chargily payment:create

# List recent payments
chargily payment:list

# Check specific payment status
chargily payment:status ch_123456789
```

### Advanced Operations

[](#advanced-operations)

```
# Filter payments by status
chargily payment:list --status=paid --limit=50

# Export payment data to CSV
chargily payment:list --export=payments_2024.csv

# Switch between applications
chargily configure

# Switch between test/live modes
chargily mode:switch
```

### Interactive Mode

[](#interactive-mode)

```
# Launch interactive menu
chargily menu

# Available options:
# 💳 Create Payment
# 📋 List Recent Payments
# 🔍 Check Payment Status
# 💰 Check Balance
# ⚙️ Configuration
# 🔄 Switch Mode
```

🏗️ For Developers
-----------------

[](#️-for-developers)

### API Coverage

[](#api-coverage)

Full support for Chargily Pay v2 API:

- ✅ **Payments** - Create, retrieve, list with filtering
- ✅ **Balance** - Multi-currency balance checking
- ✅ **Customers** - Full CRUD operations
- ✅ **Products** - Catalog management
- ✅ **Payment Links** - Professional link creation
- ✅ **Webhooks** - Configuration and testing

### Configuration

[](#configuration)

The CLI stores configuration in `~/.chargily/`:

```
~/.chargily/
├── applications.json    # Application configurations
├── cache/              # API response cache
└── logs/               # Error and activity logs

```

### Environment Variables

[](#environment-variables)

```
export CHARGILY_DEFAULT_APP=my_business
export CHARGILY_GLOBAL_MODE=test  # Force test mode globally
export CHARGILY_CACHE_TIMEOUT=300 # Cache timeout in seconds
```

### Integration Examples

[](#integration-examples)

**Payment Creation Workflow:**

```
#!/bin/bash
# Create payment for order
PAYMENT_ID=$(chargily payment:create \
  --amount=2500 \
  --description="Order #${ORDER_ID}" \
  --success-url="https://mystore.dz/success" \
  --format=json | jq -r '.id')

echo "Payment created: $PAYMENT_ID"
```

**Balance Monitoring:**

```
#!/bin/bash
# Monitor balance and alert if low
BALANCE=$(chargily balance --format=json | jq -r '.dzd.balance')
if [ "$BALANCE" -lt 10000 ]; then
  echo "⚠️ Low balance alert: ${BALANCE} DZD"
fi
```

🌍 Algeria-Focused Features
--------------------------

[](#-algeria-focused-features)

### Currency Support

[](#currency-support)

- **🇩🇿 DZD (Algerian Dinar)** - Primary currency with native formatting
- **💵 USD, EUR** - Multi-currency support for international transactions

### Payment Methods

[](#payment-methods)

- **💳 EDAHABIA** - Algeria's national payment card
- **🏦 CIB** - Banque CIB cards
- **📱 Mobile Payments** - Integration ready

### Localization

[](#localization)

- **🕐 Algeria Timezone** - Automatic timezone handling (UTC+1)
- **📅 Date Formats** - Localized date and time formatting
- **💱 Amount Display** - Proper DZD formatting with separators

🔧 Advanced Configuration
------------------------

[](#-advanced-configuration)

### Multi-Application Setup

[](#multi-application-setup)

```
# Add new application
chargily configure

# Switch between applications
chargily app:switch

# Remove application
chargily configure --remove=old_app
```

### Security Best Practices

[](#security-best-practices)

```
# Always start with test mode
chargily mode:switch test

# Verify API keys
chargily configure --test-connection

# Enable additional safety checks
export CHARGILY_LIVE_MODE_CONFIRM=true
```

📊 Monitoring &amp; Analytics
----------------------------

[](#-monitoring--analytics)

### Built-in Reporting

[](#built-in-reporting)

```
# Payment summary with statistics
chargily payment:list --summary

# Export for external analysis
chargily payment:list --export=monthly_report.csv --from=2024-01-01
```

### Performance Metrics

[](#performance-metrics)

- **⚡ Fast Response** - Cached API responses
- **📈 Success Rate** - Built-in retry mechanisms
- **🔄 Auto-Recovery** - Network failure handling

🚀 Production Deployment
-----------------------

[](#-production-deployment)

### CI/CD Integration

[](#cicd-integration)

**GitHub Actions Example:**

```
name: Payment Processing
on:
  schedule:
    - cron: '0 */6 * * *'  # Every 6 hours

jobs:
  check-payments:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install Chargily CLI
        run: |
          curl -L https://github.com/karaOdin/chargily-pay-cli/releases/latest/download/chargily -o chargily
          chmod +x chargily
          sudo mv chargily /usr/local/bin/
      - name: Check Payment Status
        run: chargily payment:list --status=pending --format=json
        env:
          CHARGILY_API_KEY: ${{ secrets.CHARGILY_API_KEY }}
```

### Docker Deployment

[](#docker-deployment)

```
FROM ghcr.io/karaodin/chargily-pay-cli:latest
COPY payment-processor.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/payment-processor.sh
CMD ["payment-processor.sh"]
```

👨‍💻 About the Developer
-----------------------

[](#‍-about-the-developer)

**Chawki Mahdi**

- 🚀 **CEO** of [DevCloud](https://devcloud.dz) - Leading Algerian development company
- ⚡ **CTO** of [Chargily](https://chargily.com) - Algeria's premier payment gateway
- 💡 **Vision**: Empowering Algeria's digital economy with cutting-edge payment solutions
- 🇩🇿 **Mission**: Building world-class fintech tools for Algerian businesses

### DevCloud Company

[](#devcloud-company)

[DevCloud](https://devcloud.dz) specializes in:

- 🏗️ **Enterprise Software Development**
- 🔒 **Fintech Solutions &amp; Payment Systems**
- 🌐 **Digital Transformation Consulting**
- ⚡ **High-Performance CLI Tools &amp; APIs**

*This CLI represents our commitment to providing Algerian businesses with professional-grade tools that rival international standards.*

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

### Development Setup

[](#development-setup)

```
git clone https://github.com/karaOdin/chargily-pay-cli.git
cd chargily-pay-cli
composer install
./chargily --version
```

### Building

[](#building)

```
# Build PHAR executable
./vendor/bin/box compile

# Test the build
./builds/chargily --version
```

📜 License
---------

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

🔗 Links
-------

[](#-links)

- **🌐 Chargily Pay** -
- **📖 API Documentation** -
- **🎫 Get API Keys** - [https://pay.chargily.dz/](https://pay.chargily.dz/developer)
- **🐛 Report Issues** - [GitHub Issues](https://github.com/karaOdin/chargily-pay-cli/issues)

📞 Support
---------

[](#-support)

- **💬 GitHub Discussions** - Community Q&amp;A
- **🐛 GitHub Issues** - Bug reports and feature requests
- **📧 Email** -  (for Chargily-related questions)

---

**🇩🇿 Made for Algeria's Digital Economy**

*Empowering businesses with professional payment tools*

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance56

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

11

Last Release

291d ago

PHP version history (2 changes)v1.0.0PHP ^8.2

v1.0.1PHP ^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/743296b9d8e6c6dcb6fb9f65310bfe76241c367fe4949b9d31b6d66bfcb82995?d=identicon)[karaOdin](/maintainers/karaOdin)

---

Top Contributors

[![karaOdin](https://avatars.githubusercontent.com/u/33878311?v=4)](https://github.com/karaOdin "karaOdin (21 commits)")

---

Tags

clilaravel-zeropaymente-commercepayment gatewayfintechAlgeriachargily

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/karaodin-chargily-pay-cli/health.svg)

```
[![Health](https://phpackages.com/badges/karaodin-chargily-pay-cli/health.svg)](https://phpackages.com/packages/karaodin-chargily-pay-cli)
```

###  Alternatives

[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1322.1k12](/packages/mahocommerce-maho)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
