Project Actions lets you define local CLI workflows in YAML, similar to GitHub Actions but for your own project. Users install a ./project script into their project root and run commands like ./project setup or ./project test.
This page is optimized for automated consumers. Full documentation: https://project-actions.org/docs
Run in the project root:
curl -fsSL https://project-actions.org/install.sh | bash
The installer:
After installing, download starter commands for the project framework:
./project init laravel # Laravel PHP
./project init django # Django Python
./project init nextjs # Next.js
./project init rails # Ruby on Rails
./project init node # Generic Node.js
./project init python # Generic Python
./project init docker # Docker Compose (add-on, combine with any framework)
Run without arguments to list all available templates:
./project init
.project/ commands/ <- YAML command files (committed to source control) setup.yaml test.yaml .runtime/ <- runner binary and cache (gitignored) runner.sh command-runner-darwin-arm64 project <- wrapper script (committed to source control)
Each file in .project/commands/ defines one command. Filename becomes the command name.
help: short: Set up the project # shown in ./project command listing long: | # optional, shown with –help Installs dependencies and prepares the environment. order: 1 # controls sort order in ./project listing
steps:
Executes a shell command. Fails the step if the command exits non-zero.
- run: npm install
- run: php artisan migrate
Prints a message to stdout.
- echo: "Dependencies installed"
Checks that a CLI tool is available. Exits with an error message if not found.
- check-for: composer
if-missing: "Composer is required. See https://getcomposer.org"
Runs the nested then: steps only if a file or directory does not exist.
- if-missing: .env
then:
- run: cp .env.example .env
Runs the nested then: steps only if a CLI flag was passed by the user.
- if-option: production
then:
- run: php artisan config:cache
Inverse of if-option – runs steps only when the flag is NOT present.
- if-no-option: skip-tests
then:
- run: php artisan test
./project # list all available commands
./project <name> # run a command by name
./project <name> --help # show full help for a command
./project <name> --<flag> # pass an option flag to a command
./project init # list available starter templates
./project init <name> # download a starter template
./project actions list # list all external action sources in use
A full setup command that checks dependencies, installs, and prepares the environment:
help: short: Set up the project order: 1
steps: