A Windows 10/11, macOS 12+, or Debian/Ubuntu Linux computer, an internet connection, and a terminal. No existing PHP installation is required.
Learning objectives
What you will actually be able to do.
This chapter is not about copying five commands. You will understand what each one prepares, which files belong to you, and how to recognize a healthy environment. That understanding prevents you from deleting the runtime, installing dependencies in the wrong place, or confusing the framework with its command-line tool.
- Distinguish AML, PHPAML, and the runtime
- Install and verify the environment
- Create, start, and diagnose a project
- Understand the local development cycle
Mental model
Three roles, one workflow.
AML is the tool used in the terminal. PHPAML is the framework that structures and runs the application. The runtime is the private environment assembled by AML. You write the product; AML maintains the machinery required to execute it.
The command checks the machine, downloads the official template, and creates your application files.
The private engine loads the framework, dependencies, and your configuration.
The router finds the controller, builds the response, and sends it to the browser.
Do not manually edit libraries stored in runtime. An update or a new aml install may rebuild them. Your code, routes, and declarative settings remain outside this private engine.
AML and PHPAML
PHPAML is the MVC mini-framework. AML is its command-line tool: it installs the environment, creates projects, starts the server, and diagnoses the machine. Once AML is installed, PHP and Composer do not need to be installed separately.
Install AML
Download the installer for your system from the official page. Windows uses the .exe file, macOS the .pkg package, and Linux the .deb package. The installer adds AML, PHP, and Composer to the machine.
Choose the language
During installation, choose English or Français. This choice controls help, confirmations, and error messages. You can change it later in the AML configuration.
Check the machine
The doctor command checks AML, PHP, extensions, Composer, temporary folders, cache, and the development port. Resolve every ERROR line before creating your first project.
aml doctor[OK] AML version 1.7.0-beta.20
[OK] PHP compatible
[OK] Private Composer available
[OK] Temporary directory writable
[OK] Cache AML writable
[OK] Development port 127.0.0.1:8910 availableCreate the first project
Create a new folder with aml create my-project, or use aml create . inside an existing empty folder. AML downloads the official template and prepares the MVC structure.
aml create my-first-app
cd my-first-app
aml install
aml servemkdir my-first-app
cd my-first-app
aml create .
aml install
aml serveInstall and start
aml install installs the private engine in runtime. aml serve then starts the local website with automatic refresh. Keep this terminal open while developing.
PHPAML development server
→ http://127.0.0.1:8910
Live reload enabledhttp://127.0.0.1:8910Troubleshoot
If AML does not recognize the project, make sure you are inside the folder containing phpaml.json, src, and runtime. If a port is busy, AML automatically tries the next one. Always run aml doctor again after a fix.
not a PHPAML projectEnter the correct folder or run aml create .Address already in useAML automatically tries the next port.Permission deniedCheck folder permissions, then run doctor again.GitHub unavailableReuse the cache with aml create project --offline.Final exercise
Create your first application.
- Check the machine with aml doctor.
- Create a project named task-app.
- Install its dependencies with aml install.
- Start it with aml serve and open the local page.
Guided solution
Verify the outcome, not only the commands.
doctor must finish without a blocking error. At the root of task-app, phpaml.json must exist: it is the project manifest. After aml install, runtime must exist. Finally, aml serve announces a local address, normally port 8910; when busy, AML tries 8911 and subsequent ports.
Knowledge check
- Which tool creates the project: AML or PHPAML?
- Why does runtime not contain your business logic?
- What should you do after fixing a machine problem?
Show answers
AML creates and maintains the project. PHPAML runs the application. The runtime is replaceable and reserved for the engine. After a fix, run aml doctor again to confirm that the complete environment is healthy.