Applications

How Anvil detects Laravel, WordPress, PHP, Node.js, Python, Rust, Go, .NET and Docker Compose projects, runs their dev servers and creates new apps.

Anvil detects each folder's type from its files. Override it in the app or with anvil app type <site> <kind>.

TypeDetected byServed by
LaravelartisanPHP-FPM
Statamicartisan and statamic/cms in composer.jsonPHP-FPM
Symfonybin/console and symfony/framework-bundle in composer.jsonPHP-FPM
WordPresswp-includes and wp-load.php or wp-config.php; Bedrock: web/wp-config.php and roots/wordpress in composer.jsonPHP-FPM
PHPcomposer.json, index.php or public/index.phpPHP-FPM
RustCargo.tomlcargo run
Gogo.modgo run .
.NETa .csproj, .fsproj or .sln filedotnet run
Djangomanage.py that imports Djangopython manage.py runserver
FastAPIfastapi in pyproject.toml or requirements.txt (if there is also a package.json, only with a main.py, app.py, wsgi.py or app/main.py)uvicorn
Flaskflask in pyproject.toml or requirements.txt (same rule)flask run
Next.jsnext in package.jsonnpm run dev
Nuxtnuxt in package.jsonnpm run dev
Vitevite or vite-plus in package.jsonnpm run dev
Node.jspackage.jsonnpm run dev, or npm run start without a dev script
Docker Composecompose.yaml, compose.yml, docker-compose.yaml or docker-compose.yml, when no type above matches and there is no .html page, dekit.yaml or mprocs.yamlDocker, see Docker Compose
Statican .html file at the top or in public/the web server
Folderanything elsenothing: no address, no web server entry, no HTTPS
  • PHP applications run through PHP-FPM, see PHP.
  • Other applications run their own dev server on a private port, passed in $PORT. Anvil proxies <name>.test and <name>.localhost to it (on Linux, <name>.localhost:8080). Start command, port and language version are set per application (.NET reads its version from the project's global.json). See Node.js, Python, Go, Rust and .NET.
  • A dev server doesn't start on its own. Use Start in the Dev tab, or anvil app start <site> while the desktop app is open. A stopped application shows a "not running" page.
  • To start it with Anvil, turn on Start with Anvil in its Settings tab or run anvil app autostart <site> true (off by default). With the CLI alone, restart anvil start afterwards.
  • Git worktrees run next to their application at <app>--<name>.test, with their own dev processes and database. See Worktrees.

PHP

PHP 8.1 to 8.5, and 8.6 as a preview, are portable builds in ~/.anvil/php/<version>, with a default version and a version per application. See PHP.

Languages

Node.js, Go, Rust (through rustup), .NET and Python (through uv) are installed into ~/.anvil/runtimes, with their caches inside ~/.anvil. Anvil puts them on PATH for the applications it runs.

In your terminal, only node, npm, npx and pnpm reach them (the terminal commands). Python, Go, Rust and .NET stay whatever your PATH finds. On macOS and Linux, the app also picks up your login shell's PATH at launch, so pnpm, Homebrew and nvm tools are found.

anvil runtime list
anvil runtime install node 22

Dev processes

The Dev tab (⌘3) runs the programs an application needs while you work: queue worker, log tailer, Vite, a docs site. For an application with its own server, that server is the first process.

ControlDoes
ConfigureEdit the process list, see Configure
Start / StopStarts every process marked Dev start; once all run, stops them all
Run ▾One-off scripts, in the Commands box (shown when there are scripts), see One-off scripts
All processesMerged output, each line tagged with its process's name in color

Output keeps terminal colors and shows only the current run. ⌘-click (Ctrl+click on Windows and Linux) opens a link. Log files stay in the Logs tab.

Keys: ↑↓ select, s start, x stop, r restart, q stop all, c clear.

Processes run with:

  • Anvil's Node.js: the version from .anvil.toml, .nvmrc or .node-version if installed, else the newest
  • the application's PHP, for PHP applications
  • your terminal's PATH

A process that needs node_modules installs it first, with the package manager the lock file names. Processes stop when Anvil quits or the application is removed.

Sources, in order:

  1. .anvil.toml in the project, for any kind of application:

    [processes]
    queue = "php artisan queue:listen"
    vite = "npm run dev"

    It replaces detection: the sources below aren't read, and no extra dev servers get an address.

  2. dekit.yaml, else mprocs.yaml, for any kind of application; it replaces the sources below. See dekit and mprocs.

  3. Laravel 13: the processes of php artisan dev (queue, logs, Vite), without its server. With laravel/octane, an octane process is added (Octane); with laravel/reverb, a reverb process (Reverb).

  4. Other PHP applications: each command the composer run dev script starts with concurrently, named by its --names. php artisan serve is left out.

  5. PHP applications without such a script: npm run dev when package.json has a dev script.

  6. Applications with their own server: their extra dev servers (below).

A PHP application's processes run as written, without a port.

dekit and mprocs

A project's dekit.yaml (dekit is mprocs' new name) or mprocs.yaml gives its Dev rows, e.g. a monorepo:

tasks:
  frontend: { cmd: ["pnpm", "run", "dev"], cwd: frontend, autostart: true }
  backend:  { cmd: ["dotnet", "watch", "run"], cwd: backend, autostart: true }
  mobile:   { cmd: ["pnpm", "run", "android"], cwd: mobile }

Start runs frontend and backend; mobile starts from its row.

dekit.yamlmprocs.yaml
Taskstasks.<name>procs.<name>
Commandcmd (array or string) or scriptshell (string) or cmd (array)
autostart unsetoffon
  • Each task runs in its cwd, a path relative to the project, else the project folder. dekit's defaults.cwd applies to every task.
  • On macOS and Linux, a leading cmd /c is dropped.
  • Not read: a task's env, mprocs' per-OS $select, and its <CONFIG_DIR> in cwd. A name with other than letters, digits, - and _, or over 40 characters, is skipped.
  • No task gets a .test address.
  • A compose file beside it doesn't make the project a Docker Compose application.

Configure

Configure turns the list into a table: Name, Command, Dev start (started by Start) and With Anvil (started when Anvil starts).

  • + Add process adds one, × removes one.
  • Reset to detected restores what Anvil found.
  • Table | JSON switches to JSON editing.
  • Done saves; Cancel drops changes.

Settings are stored in ~/.anvil/config.toml, never in the project, under [sites."<name>".processes."<id>"]. See Configuration.

The application's own dev server is the exception. Its Dev start can't be turned off. Its Command and With Anvil are the Start command and Start with Anvil settings in its Settings tab.

Extra dev servers

For an application with its own server, other package.json scripts that start a dev server get a port and an address, <name>--<label>.test. For example, docs:dev in vuefinder answers at vuefinder--docs.test. Right-click one › Edit Address… to change the label; leave it empty to restore the automatic one.

A script counts as a dev server when:

  • its name is start or serve, or ends in :dev, or
  • it runs vite (not vite build or vite preview), vp dev, vitepress dev, nuxt dev, next dev, astro dev or storybook dev.

preview, *:preview and *:serve are one-off scripts instead.

One-off scripts

Run ▾ lists the other package.json scripts and, for PHP applications, the composer.json scripts. It leaves out dev, Composer's pre-/post- event scripts and npm lifecycle hooks.

A script runs once after you confirm. It shows in the Commands box with a spinner, then ✓, or ✕ with its exit code. Right-click › Run Again… reruns it; × dismisses it.

Docker Compose

An application with compose.yaml, compose.yml, docker-compose.yaml or docker-compose.yml gets a Containers tab laid out like Dev: state, published ports, health, live log, and Start, Stop and Restart.

  • If nothing else is detected, it is the Docker Compose type with no address of its own. Its containers answer on their published ports.
  • A framework or .html page keeps its type, so a Laravel application with Sail has both Dev and Containers.

Start and Stop run docker compose up -d and docker compose stop for all containers. Anvil never kills or removes containers (it never runs down), and they keep running when Anvil quits. Anvil uses your installed docker; without it, the Containers tab says why.

New applications

anvil new <kind> <name> or New… (⌘N): Laravel, Statamic, Symfony, WordPress, PHP, static, Next.js, Nuxt, Vite, Node.js, Rust, Go, .NET, Django, FastAPI and Flask. The app groups them by language (PHP, JavaScript, Python, Other), shows the resulting address, and keeps options under a one-line summary:

  • Laravel's starter kit (React, Vue, Svelte, Livewire or none) and database
  • WordPress's MySQL service (see WordPress)
  • Next.js's TypeScript and Tailwind
  • Vite's framework and TypeScript
  • the package manager (npm, pnpm or bun) for Laravel, Statamic, Next.js, Nuxt and Vite
  • the PHP or Node.js version
  • Git
  • HTTPS (off unless Settings › General › Addresses › HTTPS for new applications is on)

Create shows each step over the live output. Open in Browser opens the new application and selects it; with the web server stopped the button is Show. Use Existing Folder… serves a project already on your computer instead.

  • Anvil uses its own PHP, Composer and toolchains. If the template's PHP or language isn't installed, the form says so with an Install button.
  • The project gets a Git repository with a first commit, unless Git is off (--no-git). Without a Git name and email, the commit is skipped.
  • Output goes to ~/.anvil/log/create-<name>.log. A failed create leaves nothing behind.
  • A new application outside a parked folder is linked.

Storage

Anvil measures each application's disk use in three groups:

GroupContents
SafeLogs and cachesDelete any time
Rebuildablenode_modules, vendor, target, .nextDeletable only while the application is stopped
KeepCode and data, e.g. storage/app, a SQLite databaseNever deleted by Anvil

The app cleans item by item, or the safe items of every application at once. anvil usage shows the same numbers plus the services an application's .env points at. anvil clean <site> <path> (or --safe) deletes listed items.

On this page