A command-line tool to manage different projects / repositories on your machine.
- PHP 8.4+
For development (or to install from source):
- Clone the repo with
git clone [email protected]:Pierstoval/Confman.git - Go to the project's directory via
cd Confman - Run the
composer installcommand - Run the
box compilecommand - Your executable is in the
output/confman.pharfile 🚀
- Go to the latest release: https://github.com/Pierstoval/Confman/releases/latest
- Unwrap the
Assetssection - Download the
confman.pharfile - Save it in your computer 🚀
Everything is set in the run PHP file.
You can either use ./run or php run to execute it.
If you install it globally, you can rename the file to confman and add it somewhere accessible via your PATH environment variable.
- This tool uses the Symfony Console command. Meaning you can always use the
--helpoption on any command to get information about it, and you can always use thelistcommand to get the list of all available commands. - Use the
-c/--configoption to create several configs. It can be useful when running similar commands on projects with the same stack. You can, for instance, create anpmcategory for all projects using NPM as package manager, orphpfor projects using Composer.
You cannot use Confman is there is no configuration file for a project.
To create a config file, you have several options:
- Create a
confman.jsonwith empty content, either:- In the current directory
- In the
$HOME/.config/Confman/directory
- Run the
confman createcommand
The confman create command suggest accessible directories from your current execution path.
You can also categorize config files, so you can have multiple "projects", by using the -c/--config option.
Examples:
> confman create
Where do you want to create the config file?:
[0] /home/my-user/current_directory/confman.json
[1] /home/my-user/.config/Confman/confman.json
>
> confman create -c some_category
Where do you want to create the config file?:
[0] /home/my-user/current_directory/some_category.json
[1] /home/my-user/.config/Confman/some_category.json
>
You have two choices:
- Manually update the
confman.jsonfile and add a project.
Mandatory fields arenameandpath(for now, more might come in the future) - Run the
project:addoraddinteractive command, it will update theconfman.jsonfile automatically
> confman projects:add
Project name?:
> MyProject
Path?:
> /var/www/html/my-project
[OK] Done!
Or by directly adding the name and path as arguments:
> confman projects:add MyProject /var/www/html/my-project
[OK] Done!
Run the projects:list or just projects command.
> confman projects
Detected projects file: /home/myself/Confman/confman.json
------------------------------------------------------------
---------------------- ----------------------------- ---------------- --------------------------- -------------------------------------
Name Path Current branch Last commit date Current remote URL
---------------------- ----------------------------- ---------------- --------------------------- -------------------------------------
My Project /home/myself/MyProject main 2025-11-03 13:23:22 +0100 [email protected]:MyOrg/MyProject.git
My other project /home/myself/MyOtherProject develop 2024-12-08 09:45:59 +0100 https://github.com/MyOrg/MyProj.git
---------------------- ----------------------------- ---------------- --------------------------- -------------------------------------
Run the projects:command:all command or one of its aliases command or command:all.
> confman projects:command:all -- git fetch --all --prune
Running /bin/git fetch --all --prune on all projects…
-----------------------------------------------------
---------------------- ----------------------------- ------------------
Project Path Status
---------------------- ----------------------------- ------------------
My Project /home/myself/MyProject ✅
My other project /home/myself/MyOtherProject ✅
---------------------- ----------------------------- ------------------
[OK] Done!
Runs the git fetch --all --prune command on all projects in parallel.
> confman proj:git:fetch
Running /bin/git fetch --all --prune on all projects…
-----------------------------------------------------
---------------------- ----------------------------- ------------------
Project Path Status
---------------------- ----------------------------- ------------------
My Project /home/myself/MyProject ✅
My other project /home/myself/MyOtherProject ✅
---------------------- ----------------------------- ------------------
[OK] Done!