Skip to content

Artisan, Composer and commands

Artisan lists every command of the app with its description. Type to filter, tab completes, enter runs it. The output streams live; commands that ask questions take your input.

ctrl+t (or alt+enter) runs the command in the terminal instead, for commands with prompts such as make:filament-user or Laravel Prompts. The output stays until you press enter.

The commands you run are remembered per server and container. They are listed under recent above the commands, newest first, even while the list is still loading. Typing filters them too. Move to one with ↓ and press enter to run it again, or edit it first: arguments are kept, such as queue:work --queue=default. Running a command again moves it to the top. ctrl+d forgets the selected one.

Composer and npm scripts keep their own recent commands the same way. The history is stored in ~/.config/laraport/history.json with the history settings.

laraport finds artisan in the configured root_path, or in /var/www/html and /app.

Commands that change things are recorded in the journal. On a read-only server only known reads run, such as about, route:list and migrate:status.

For migrations, optimize, a worker restart and maintenance mode, the Laravel tab has ready-made deploy commands.

Composer lists and runs Composer commands. If the container has no composer, laraport uses the app’s own composer.phar, or downloads one once into /tmp/laraport in the container with the verified installer. It never writes into the app directory. A failed download says why: no network, TLS, or allow_url_fopen turned off.

npm scripts lists the scripts of package.json and runs them.

Commands shows the command groups from your config: the container’s own first, then the global ones. See Custom commands.

Custom command runs any shell command in the container, with live output and input.