PHPackages                             abdelhamiderrahmouni/prodtools - 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. abdelhamiderrahmouni/prodtools

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

abdelhamiderrahmouni/prodtools
==============================

A set of tools i use to optimize my work.

v0.6.0(11mo ago)157MITPHPPHP ^8.1

Since Mar 28Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/abdelhamiderrahmouni/prodtools)[ Packagist](https://packagist.org/packages/abdelhamiderrahmouni/prodtools)[ Docs](https://github.com/abdelhamiderrahmouni/prodtools)[ RSS](/packages/abdelhamiderrahmouni-prodtools/feed)WikiDiscussions main Synced 1mo ago

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

 Prodtools
===========

[](#----prodtools)

 [![Total Downloads](https://camo.githubusercontent.com/8c25b0bc76b1560a38c095a8fcac1ba0b820234e3d36ab25e385e2a7eea4bac3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616264656c68616d696465727261686d6f756e692f70726f64746f6f6c732e737667)](https://packagist.org/packages/abdelhamiderrahmouni/prodtools) [![Latest Stable Version](https://camo.githubusercontent.com/50ae585c738863f25e56a737151479b81f5e8daf470f6cd51cf901088f3979af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616264656c68616d696465727261686d6f756e692f70726f64746f6f6c732e7376673f6c6162656c3d737461626c65)](https://packagist.org/packages/abdelhamiderrahmouni/prodtools) [![License](https://camo.githubusercontent.com/e01051559d7dce731e3303e7ef0657eaafd899da5e0f0fc8f6bdf4ce19064569/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616264656c68616d696465727261686d6f756e692f70726f64746f6f6c732e737667)](https://packagist.org/packages/abdelhamiderrahmouni/prodtools)

####  A set of command line tools to help me ship code faster, made with laravel zero.

[](#-a-set-of-command-line-tools-to-help-me-ship-code-faster-made-with-laravel-zero)

Available functionalities :

- Lang files translation.
- Assets images optimization.
- files/folder/project compression

---

Documentation
=============

[](#documentation)

General Use
-----------

[](#general-use)

### Installation

[](#installation)

You can install the package via composer:

```
composer global require abdelhamiderrahmouni/prodtools
```

add it to your PATH:

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

### Usage

[](#usage)

the package offers three main commands:

#### translations

[](#translations)

This command will translate your lang files from the source language to the target language or languages, it supports multiple languages and can output the result in JSON format.

```
prodtools translate   [--json]
```

example: The following translates the php files holding the translations from `en` language to `fr` and `ar` languages and outputs folders for `ar` and `fr` languages.

```
prodtools translate en fr ar
```

The following translates the JSON files holding the translations from `en` language to `fr` and `ar` languages and outputs the translations to `ar.json` and `fr.json` files.

```
prodtools translate en fr ar --json
```

You can find more details on [superduper filament starter kit](https://github.com/riodwanto/superduper-filament-starter-kit)@riodwanto is the original author of the command, I just added the JSON output feature.

#### Assets optimization

[](#assets-optimization)

The idea behind this command came from the need to optimize the images in the assets folder before shipping the application. As doing that manually is a tedious task, I decided to automate it.

This command will optimize the images in the assets folder.

```
prodtools images:comporess  # defaults to public/assets
```

Options :

- `path` is the path to the folder containing the images to optimize; by default it's public/assets.

Arguments :

- `--keep` to keep the original images; by default it's false.
- `--prefix` to add a prefix to the original folder's name; by default it's "old\_".
- `--details` to display the optimization details; by default it's false.

#### Project compression

[](#project-compression)

This command will compress the project files and folders into a single archive file.

```
prodtools compress  # defaults to current directory
```

Options :

- `path` is the path to the folder to compress; by default it's the current directory.

Arguments :

- `--exclude` mention the files and folders to exclude from the archive; by default it's ".git,node\_modules".
- `--include` Directories and files to make sure they are included in the zip.
- `--output-name|name` specify the output file name; by default it's FolderName in snake case like "folder\_name.zip".
- `--chunk-size` The maximum size of each chunk in MB, 0 for no chunking.
- `--excludes_file` A file containing directories and files to exclude from the zip (should be in the root of the project path) by default it will look for `.prodtools_compress_excludes`.

```
prodtools compress # compress the current directory, this will look for .prodtools_compress_excludes file in the root of the project and exclude the files and folders mentioned in it.
prodtools compress --exclude=".git,node_modules,.github,.idea,storage,.env,public/.htaccess"
prodtools compress --include="node_modules" # compress the current directory and include the node_modules folder.
prodtools compress --output-name="my_project.zip" # compress the current directory and name the output file my_project.zip.
prodtools compress --chunk-size="10" # compress the current directory and split the output file into chunks of 10MB.
```

#### Get Random Images from Unsplash

[](#get-random-images-from-unsplash)

This command will download random images from unsplash and save them in the specified folder.

```
prodtools images:get  --amount "" --size "x" --terms "" --multi-size --sizes "x,x,..." --amounts ",,..."
```

Options :

- `folder` is the folder where the images will be saved; by default the command will create a folder named local\_images in the current path.

Arguments :

- `--amount` is the number of images to download; by default it's 5.
- `--size` is the size of the images to download; by default it's 200x200.
- `--terms` is the search terms to use; by default it's empty.
- `--multi-size` is a flag to download multiple sizes of the images; by default it's false.
- `--sizes` is the sizes of the images to download; by default it's "200x200,1280x720".
- `--amounts` is the number of images to download for each size; by default it's "5,5"

example:

```
prodtools images:get public/assets/images --amount "10" --size "1920x1080" --terms "nature,animals"
```

```
prodtools images:get public/assets/images --multi-size --sizes "1920x1080,1280x720,640x480" --amounts "5,3,2" # make sure the amounts match the sizes count
```

Development
-----------

[](#development)

### build standalone application

[](#build-standalone-application)

Run the following command to build a standalone application:

```
php production-tools app:build prodtools
```

You will then be able to execute it directly:

```
./builds/prodtools
```

or on Windows:

```
C:\application\path> php builds\prodtools # this is still not ready for windows
```

License
-------

[](#license)

Laravel Zero is an open-source software licensed under the MIT license.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance73

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Recently: every ~60 days

Total

33

Last Release

351d ago

PHP version history (2 changes)v0.1.0PHP ^8.1

v0.4.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/745a0575996f5a3dcb6b8e177e5f37e610d83906028a1e99aa2ec3213a281027?d=identicon)[abdelhamiderrahmouni](/maintainers/abdelhamiderrahmouni)

---

Top Contributors

[![abdelhamiderrahmouni](https://avatars.githubusercontent.com/u/26693672?v=4)](https://github.com/abdelhamiderrahmouni "abdelhamiderrahmouni (59 commits)")

---

Tags

cliconsolelaravelasset optimizationlaravel toolslaravel production toolsproject compression

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/abdelhamiderrahmouni-prodtools/health.svg)

```
[![Health](https://phpackages.com/badges/abdelhamiderrahmouni-prodtools/health.svg)](https://phpackages.com/packages/abdelhamiderrahmouni-prodtools)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.6k331.8M8.5k](/packages/nunomaduro-collision)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[mehrancodes/laravel-harbor

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

9989.0k](/packages/mehrancodes-laravel-harbor)

PHPackages © 2026

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