imliam / setuphp
A tool to set up a PHP project quickly
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 33
Watchers: 1
Forks: 0
Open Issues: 1
Type:project
Requires
- composer/semver: ^3.4
- laravel/prompts: ^0.3.5
- symfony/console: ^7.2
- symfony/process: ^7.2
README
Get up-and-running with a new PHP project in seconds. Setuphp is a CLI tool designed to scaffold and streamline new PHP projects by setting up Git repositories, CI workflows, and common development tooling—all through a series of interactive prompts.
Features
-
Git Integration: Initialize a local Git repository, create an initial commit, and set up a remote repository. If the GitHub CLI is installed, Setuphp can automatically create a remote repository for you.
-
CI Workflow Setup: Automatically generate CI configuration files for GitHub Actions or GitLab CI by detecting your project's remote repository and available tools (such as Pest, PHPUnit, PHPStan, or Psalm).
-
Tooling Installation: Install popular test frameworks (Pest or PHPUnit), browser testing tools (Laravel Dusk or Laracasts Cypress for Laravel apps), static analysis tools (PHPStan with Larastan or Psalm with its Laravel plugin), and code style tools (php-cs-fixer or Laravel Pint) based on your preferences.
-
Interactive Setup: Designed to work in your existing PHP project. Setuphp uses interactive prompts to guide you through configuring your project, from creating a
composer.json
file (if missing) to installing and configuring dependencies.
Installation
Setuphp requires PHP. Using Composer, you can install Setuphp globally with the following command:
composer global require imliam/setuphp
Alternatively, you can use cpx to run Setuphp:
cpx imliam/setuphp
Usage
Run the setuphp
command in the root directory of your PHP project to start the interactive setup process that will walk you through everything:
setuphp
Alternatively, you can run individual commands if you want to focus on only certain steps:
setuphp git setuphp ci setuphp tooling