Choose for your use case
aml createClassic applicationMVC, routes, controllers, and PHP views.
aml create-viewAML ViewReactive interface written directly in PHP.
aml create-apiAPIJSON service without a graphical interface.
aml create-consoleConsolePure PHP program in the terminal.
HOW DO YOU CHOOSE?
Start from the expected result.
The four commands do not represent four quality levels. They prepare different structures. A server-rendered store may start as a classic application. A highly interactive dashboard suits View. A mobile application consuming JSON uses an API. A programming exercise without a browser uses Console.
aml createaml create-viewaml create-apiaml create-consoleCreate a classic application
aml create my-first-project
cd my-first-projectmkdir my-first-project
cd my-first-project
aml create .Creation already installs the runtime. Use aml install only to rebuild an existing project, or after --no-install.
Created structure
public/ Web entry point
src/ your application code
routes/ route declarations
runtime/ rebuildable private engine
phpaml.json PHPAML manifestRead the structure like a map.
public/ is the Web-facing entry point. routes/ connects an address to an action. src/ contains what you develop. phpaml.json describes the project to AML. runtime/ contains execution tools and can be rebuilt.
Work in src/, routes/, and the intended configuration files. Never fix a problem by editing a library inside runtime/: rebuilding it would erase your change.
CHECK YOUR UNDERSTANDING
You are creating a small program that asks for an age in the terminal. Which command should you choose?
Show the answer
aml create-console
SUMMARY
What to remember
- The project type depends on the expected result.
- Creation installs the runtime automatically.
- src/ contains your code; runtime/ contains the engine.
- aml install is not required after successful creation.