Skip to content

CLI Tool Tutorials

A second build-along artifact, independent of the JSON HTTP API track: a small command-line PHP tool with no framework, run directly with the php CLI.

Learning Path

#TutorialConcepts
01Hello CLIRunning a script with php, $argv, stdout

More pages continue this ladder — argument/option parsing, reading and writing files, simple persistence, and finally packaging with Composer/phar so the tool can be distributed as a single file. Tracked as follow-up work.

Prerequisites

  • PHP installed
  • Basic programming knowledge (variables, loops, functions)

Start with 01 Hello CLI.