PHPackages                             anujpratap/create-cscart-addon - 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. anujpratap/create-cscart-addon

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

anujpratap/create-cscart-addon
==============================

CLI tool to scaffold CS-Cart addons

v1.0.2(3mo ago)04MITPHPPHP &gt;=8.0

Since Jan 9Pushed 3mo agoCompare

[ Source](https://github.com/AnujPratap-96/create-cscart-addon)[ Packagist](https://packagist.org/packages/anujpratap/create-cscart-addon)[ RSS](/packages/anujpratap-create-cscart-addon/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

🚀 Create CS-Cart Addon
======================

[](#-create-cs-cart-addon)

A **PHP CLI tool** to quickly scaffold a **CS-Cart addon** with a correct folder structure, namespaces, and boilerplate files.

> No Node.js required.
> Works on **Windows**, **Linux**, and **macOS**.

---

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

[](#-features)

- 📦 Generates CS-Cart–compatible addon structure
- 🧩 PSR-4 autoloading
- 🧠 Proper namespaces based on addon name
- 🛡 Validates addon name (`letters, numbers, underscore`)
- ⚡ Fast CLI execution
- 🌍 Cross-platform (Windows / Linux / macOS)

---

📁 Generated Structure
---------------------

[](#-generated-structure)

```
my_addon/
├── app/
│   └── addons/
│       └── my_addon/
│           ├── controllers/
│           ├── models/
│           ├── schema/
│           ├── src/
│           │   ├── HookHandlers/
│           │   ├── Bootstrap.php
│           │   ├── Installer.php
│           │   └── ServiceProvider.php
│           └── addon.xml
├── design/
│   └── templates/
│       └── addons/
│           └── my_addon/
└── var/
    └── langs/
        └── addons/

```

---

📦 Installation
--------------

[](#-installation)

### ✅ Option 1: Install globally via Composer (recommended)

[](#-option-1-install-globally-via-composer-recommended)

```
composer global require yourname/create-cscart-addon
```

Make sure Composer global bin is in your PATH:

```
# Linux / macOS
export PATH="$HOME/.composer/vendor/bin:$PATH"

# Windows (add manually)
C:\Users\YourUser\AppData\Roaming\Composer\vendor\bin
```

---

### ✅ Option 2: Local usage (no global install)

[](#-option-2-local-usage-no-global-install)

```
php bin/create-cscart-addon my_addon
```

---

▶️ Usage
--------

[](#️-usage)

```
create-cscart-addon price_update
```

Or (Windows / local):

```
php create-cscart-addon.php price_update
```

---

🧪 Validation Rules
------------------

[](#-validation-rules)

### ✔ Allowed

[](#-allowed)

```
price_update
my_addon_123

```

### ❌ Not allowed

[](#-not-allowed)

```
price-update
price update
price@update

```

---

🧩 Files Generated
-----------------

[](#-files-generated)

### `addon.xml`

[](#addonxml)

- Autoload (PSR-4)
- Bootstrap
- Installer
- Active status

### `Bootstrap.php`

[](#bootstrapphp)

- Registers service provider
- Hook handler support

### `Installer.php`

[](#installerphp)

- Install / uninstall lifecycle
- CS-Cart compliant

### `ServiceProvider.php`

[](#serviceproviderphp)

- Dependency container support (Pimple)

---

🖥 Platform Notes
----------------

[](#-platform-notes)

### Windows

[](#windows)

- No `chmod` required
- Composer generates `.bat` automatically

### Linux / macOS

[](#linux--macos)

```
chmod +x bin/create-cscart-addon
```

---

🛠 Requirements
--------------

[](#-requirements)

- PHP **8.0+**
- Composer
- CS-Cart **4.x+**

---

🗺 Roadmap
---------

[](#-roadmap)

- Interactive mode
- `--force` overwrite flag
- Auto-detect CS-Cart root
- Hook handler generator
- Unit tests
- Symfony Console integration

---

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

[](#-contributing)

PRs are welcome.

1. Fork the repository
2. Create a feature branch
3. Submit a pull request

---

📄 License
---------

[](#-license)

MIT License

---

⭐ Why this tool?
----------------

[](#-why-this-tool)

CS-Cart addon development lacks a **standard scaffold generator**. This tool brings **Laravel-level developer experience (DX)** to CS-Cart.

---

```

```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance83

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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 ~1 days

Total

3

Last Release

117d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f9c8e88ee423f56696bcff03ff8b7bbf30bd13ecc870ee2f78b5122afbd28c6?d=identicon)[AnujPratap-96](/maintainers/AnujPratap-96)

---

Top Contributors

[![AnujPratap-96](https://avatars.githubusercontent.com/u/160201596?v=4)](https://github.com/AnujPratap-96 "AnujPratap-96 (1 commits)")

### Embed Badge

![Health badge](/badges/anujpratap-create-cscart-addon/health.svg)

```
[![Health](https://phpackages.com/badges/anujpratap-create-cscart-addon/health.svg)](https://phpackages.com/packages/anujpratap-create-cscart-addon)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M318](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

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