Isolated dev workspaces via Docker. HTTPS out of the box.
Each workspace gets its own database, services, and HTTPS URL, spun up from a git worktree.
Slate is a single Go binary, installed with Go 1.26+. Running it needs Docker (OrbStack recommended on macOS, Docker Engine on Linux) and Git.
go install github.com/devtime-ltd/slate@latestEnsure it's available on your path (add to .bashrc, .zshrc, etc). go install puts it in $GOBIN, or $GOPATH/bin when that is unset, which is ~/go/bin by default:
export PATH="$HOME/go/bin:$PATH"slate setup # once: HTTPS proxy + *.test DNS + CA cert
slate init laravel # in your project: creates slate.yml
slate new my-feature # creates workspace with containers + HTTPSOpen https://your-project--my-feature.test and start developing.
Workspace lifecycle:
slate new <name> Create a new workspace (containers + HTTPS)
slate up [name] Start/refresh a workspace
slate down [name] Stop (preserves data)
slate restart [name] [service] Restart workspace or single service
slate rm [name] Destroy workspace (containers, volumes, worktree)
slate done [name] Destroy a workspace once its work has landed
slate prune Delete orphaned workspace branches and worktrees
slate ls [--all] List workspaces (current project or all registered)
slate wait [name] Block until a background provision finishes
Tools:
slate setup One-time host setup (proxy + DNS + CA cert + secret key)
slate teardown Remove all slate infrastructure
slate doctor Check dependencies
slate version Print the build version, commit and date
slate brief Print an agent-facing cheatsheet for this project
slate open [name] Open workspace URL in browser
slate urls [name] Print the workspace and service URLs (pipeable)
slate path [name] Print workspace path (pipeable, --open)
slate pwd Print the project's main checkout (pipeable)
slate cd [name] Spawn a sub-shell rooted at the workspace dir
slate where [project[@ws]] Print a project or workspace directory (pipeable)
slate code [name] Open workspace in your editor
slate shell [name] Bash shell in app container
slate agent [name] Run the agent command in a workspace (see Agent)
slate exec [-s svc] -- <cmd> Run an arbitrary command in a container (-i for a TTY)
slate logs [name] [svc] Tail logs (default: all services)
slate proxy Manage the HTTPS proxy
slate dns Manage the *.test DNS resolver
Scaffold tools (from slate.yml), for Laravel:
slate composer <args> slate artisan <args> slate tinker
slate pint <args> slate pest <args>
slate npm <args> slate npx <args>
slate mysql [name] Print DB connection info (--open, --url)
slate <command> --help documents each command's flags.
Omit the workspace name and slate uses the one you're inside, or pops a picker over the project's workspaces. From outside any worktree, or in scripts, CI and agents, set SLATE_WORKSPACE=<name> (honoured by every command that targets a workspace; slate where takes its target as an argument instead) or pass -w <name> to the lifecycle and utility commands. The scaffold tools pass every argument through, including -w, so target those with SLATE_WORKSPACE.
--project <name> targets a project other than the current directory's, by its registry name (slate ls --all).
slate where [project[@workspace]] prints a project's main checkout or a workspace inside it. When no registered project matches, it looks under dev_root (default ~/Development, set in the global config) for a directory of that name, as <org>/<repo>, <org>, or a bare <repo> in any org. Failing an exact name it takes the project, org or workspace whose name starts with the given one, then the one whose name contains it, ignoring case, so dev shop reaches acme/web-shop. A name that others only extend past a separator wins over them (web-shop over web-shop-iac); any other tie is listed. A process can't change its parent shell's directory, so slate shellenv prints a function that does, with tab completion over project and workspace names. One line in your rc file, with the function name of your choice:
eval "$(slate shellenv zsh --name dev)" # ~/.zshrc, after compinit
eval "$(slate shellenv bash --name dev)" # ~/.bashrcThen dev project or dev project@my-feature.
slate newbranches from the repo's default branch asslate/<name>.-bnames the branch,--base <ref>forks from another ref,--base-headforks from the main checkout's current HEAD.--adoptcarries the main checkout's uncommitted changes into the new worktree.--barecreates the worktree without containers; the firstslate upprovisions it.--bgforks the slow phase (build + lifecycle) to the background so editing can start at once.slate lsshowsprovisioning(orfailed),slate execand the scaffold tools wait for it, andslate waitblocks until it finishes. A configurednew:hook backgrounds provisioning automatically.slate up --freshrecreates containers and volumes (code preserved);--buildforces an image rebuild.slate donedestroys a workspace only after proving its work landed (clean worktree, branch merged by ancestry or a merged PR). If it can't, it refuses with reasons;slate rm -fremains the force path.slate rmwarns about uncommitted changes before confirming. If your shell was inside the workspace, slate exits a slate-spawned shell or drops you into one at the main checkout.
slate exec runs anything else inside a workspace container, without a TTY by default so it's safe in scripts and agents:
slate exec -- ./vendor/bin/phpstan analyse
slate exec -s vite -- npm run build # another service (default: app)
slate exec -i -- php artisan tinker # allocate a TTY
slate exec --pause-workers -- php artisan migrate:fresh --seed--pause-workers stops the queue worker for the duration: a live queue:work deadlocks against migrate:fresh.
Each slate new creates a git worktree and spins up the Docker containers your scaffold defines (e.g. PHP + Apache, MySQL, Vite, queue worker, Mailpit). A Caddy proxy terminates HTTPS so you get real .test URLs.
Host Containers (per workspace)
┌──────────────────────┐ ┌───────────────────────────┐
│ Your editor │ │ app (PHP/Node/Ruby) │
│ Git worktrees │ ───► │ database (MySQL/Postgres) │
│ Slate CLI │ │ vite/assets │
│ HTTPS proxy (Caddy) │ │ queue worker │
└──────────────────────┘ │ mailpit │
└───────────────────────────┘
Source code is bind-mounted from the host. Package installs run inside containers, so a compromised dependency can't reach your SSH keys, cloud credentials, or browser password stores. Dependency caches live in each workspace under .slate/.
On first slate new, slate adds .slate/workspaces/ to your project's .gitignore.
A single slate.yml in your project root:
scaffold: laravelThat's it for most projects. The scaffold provides the Docker image, services, lifecycle scripts, and tool commands. When no built-in scaffold fits, define one inline; see Inline scaffolds.
Each workspace uses the slate.yml in its own worktree, so a branch can change config and test it with slate up before merging. Exceptions:
project:always comes from the main checkout, so a branch can't change a workspace's identity.agent:,new:andup:run on the host and only ever come from the main checkout (see Agent).- Keys that reach the host (
scaffold:,files:,database:,env:,node_image:,php_version:,apt_packages:,php_extensions:,php_ini:) come from committed content on the workspace branch, never the working copy, so a compromised dependency can't rewrite them and wait for your nextslate up. Uncommitted edits to them get a note; commit them on the branch to test.
Swapping scaffold: usually wants slate up --fresh.
scaffold: laravel
project: my-project # default: directory basename
base_branch: develop # default: the repo's default branch
base_from_head: true # fork from the main checkout's HEAD instead
apt_packages: [ghostscript, imagemagick, libmagickwand-dev]
php_extensions: [imagick]
php_version: "8.4.27" # default: "8.5.12"
node_image: node:22 # default: node:24 (laravel), node:24-slim (nextjs)
php_ini:
memory_limit: 1024M # defaults: memory_limit=512M, upload/post 100M
setup: | # lifecycle hook override
composer config http-basic.nova.laravel.com "$NOVA_USER" "$NOVA_KEY"
{{SCAFFOLD_DEFAULT}}
env:
CUSTOM_VAR: value
ANALYTICS_DB: "{{DB_NAME:analytics}}"
REDIS_PASSWORD: "{{GEN_PASSWORD:redis}}"
files: # host files mounted into containers
~/.npmrc: /home/node/.npmrcPin a node_image whose bundled npm satisfies your engines.npm, or a mismatched npm rewrites the lockfile on every start. php_version as X.Y tracks the official php:X.Y-apache image; as X.Y.Z it also builds that release from php.net on top whenever the image's PHP is older, so a security release reaches workspaces before Docker Hub carries it, and the build step skips itself once it does. php_version, apt_packages, php_extensions and php_ini build into the image, so an existing workspace picks them up on slate up --build.
Lifecycle hooks run inside the containers, with worker services paused for the duration:
setupruns on everyslate newandslate up(default: install deps + migrate).freshruns aftersetuponslate newandslate up --fresh(default: fresh DB seed).{{SCAFFOLD_DEFAULT}}injects the scaffold's default script at that point. Aretry <cmd>helper (3 attempts) wraps flaky network steps.
Placeholders, expanded at workspace creation: {{GEN_PASSWORD:salt}} derives a per-workspace password from your installation's secret key; {{DB_NAME:label}} gives a safe database name.
Scaffolds register their tool commands automatically. Add your own, which run a command in a container:
tools:
mycommand:
service: app
command: [php, my-script.php]Your tools add to the scaffold's; one with the same name as a scaffold tool replaces it. Arguments after the tool name are appended to the command (slate mycommand --dry-run).
A tool that needs more than one container lists steps: instead, each with its own service and command. They run in order and stop at the first failure:
tools:
typegen:
steps:
- service: app
command: [./typegen-php.sh]
- service: vite
command: [npm, run, "sanity:manifest:extract"]Arguments go only to the steps that set args: true; passing arguments to a tool with no such step is an error.
At an interactive terminal, slate new and slate up drop you into the workspace through two hooks: new: fires straight after the worktree exists, with provisioning forked to the background behind it; up: fires once provisioning finishes. agent: is the command slate agent [name] runs; point the hooks at it to land in your agent:
agent:
- claude --name "{{PROJECT}}--{{WORKSPACE}}" # first run
- claude --continue # thereafter
new: slate agent
up: slate agentagent: is a single command or a [first-run, thereafter] pair; the first-run variant runs on the workspace's first agent entry, however that entry is reached. With new: configured, slate new foo creates the worktree in seconds and runs the hook at once, so the agent starts while the containers come up; slate exec and the scaffold tools wait for provisioning, so the agent's first container command simply blocks instead of failing. slate agent myws -- "review the open PR" passes arguments through to the agent command ({{ARGS}} marks where they land).
All three run in the worktree via sh -c with {{WORKSPACE}}, {{PROJECT}} and {{HOSTNAME}} expanded and SLATE_WORKSPACE, SLATE_PROJECT, SLATE_FRESH and SLATE_PROVISIONING set. They can be anything:
up: tmux new-session -A -s {{HOSTNAME}} 'slate agent'These commands run on your host, so your normal login, skills, MCPs and git access apply. For that reason they are read only from the main checkout's slate.yml: the worktree is container-writable, and a compromised dependency could otherwise edit it and wait for your next slate command. Workspace-side edits to them are inert and get a note.
An agent: command that exits within three seconds can't have hosted a session (a claude --continue with nothing to continue does exactly this), so slate treats it as a failed launch: it reports what ran, retries the first-run variant if the thereafter one bailed, and leaves a shell in the workspace so a wrapping tmux session survives with the diagnostic on screen. A session that crashes with a non-zero exit gets the same held shell. slate agent --help has the details; SLATE_AGENT_MIN_RUNTIME=0 disables the check.
An uncommitted slate.local.yml next to the main checkout's slate.yml overrides the host-side keys per developer: agent:, new:, up:, doctor: and brief:. Each key present replaces the committed value wholesale; any other key is an error. Slate adds it to .gitignore on the next slate new. It is read only from the main checkout, never a worktree; mounting the main checkout itself into a container (an inline scaffold using ${MAIN_ROOT}) makes it container-writable and voids that protection, as it does for slate.yml. A typical use is pinning agent sessions to an account switcher without pushing that onto other developers:
agent:
- cswap run -- claude --name "{{PROJECT}}--{{WORKSPACE}}"
- cswap run -- claude --continuedoctor: is a map of named host checks appended to slate doctor; a non-zero exit renders as a warning and never affects the result. brief: is a host command whose stdout is appended to slate brief under a ## Project notes heading. Each gets 10 seconds.
doctor:
vpn: ping -c1 -W1 10.0.0.1
brief: |
echo "**Account:** $(cswap status --json | jq -r '.accounts[] | select(.active) | .email')"Slate is designed to be driven by an LLM on the host: every workspace command honours SLATE_WORKSPACE, non-interactive contexts fail fast with instructions instead of prompting, container commands wait for an in-flight provision, and slate brief prints a project-aware cheatsheet for your CLAUDE.md or AGENTS.md.
| Scaffold | Stack | Services |
|---|---|---|
laravel |
PHP 8.3 + Apache, MySQL, Vite, Mailpit | app, queue, mysql, vite, mailpit |
nextjs |
Node 24, PostgreSQL, Mailpit | app, postgres, mailpit |
| inline | Bring your own compose file | User-defined |
Give scaffold: a map instead of a name:
scaffold:
compose: ./slate/compose.yaml
subdomains:
"@": { service: app, port: 8081 } # <project>--<ws>.test
warden: { service: warden, port: 8080 } # warden.<project>--<ws>.testcompose is a committed, project-relative compose file (read from committed content, like the other host-reaching keys). Follow the built-in scaffolds' conventions: bind-mount the worktree as ..:/app, publish ports without host numbers (ports: ["8081"]), and optionally mount ${SLATE_ENTRYPOINT} as the entrypoint for UID mapping. ${MAIN_ROOT}, ${APP_UID} and ${APP_GID} interpolate. subdomains declares the HTTPS routes, with "@" as the main hostname. setup:, fresh:, tools:, env: and files: work as usual; inline scaffolds have no default hooks. Services that bind-mount /app are treated like the built-ins' app services: the first is the primary, the rest are paused while the lifecycle runs.
A compose file named *.tmpl runs through Go's text/template with vars: as input (.Project, .Workspace, .Hostname, .HasMainEnv, .Database, .Vars). Reach for it only for structural differences, such as conditionally including a service.
slate init inline writes a starter slate.yml.
Vite is served over a proxied HTTPS subdomain (https://vite.<project>--<workspace>.test). Add @devtime-ltd/vite-plugin-slate to your vite.config.js so assets and HMR load without mixed-content blocks:
import slate from "@devtime-ltd/vite-plugin-slate";
export default defineConfig({
plugins: [
laravel({
/* ... */
}),
slate(),
],
});The plugin reads VITE_DEV_SERVER_URL, which slate sets in the workspace, and is a no-op outside slate.
~/.config/slate/config.yml (all optional):
http_port: 80
https_port: 443
tls: true # false for HTTP-only (no certs needed)
secret_key: <generated> # auto-generated on first `slate setup`
editor: code # for `slate code` (prompted on first use)
auto_cd: true # `slate new` and `slate up` drop into a shell at the workspace
dev_root: ~/Development # where `slate where` looks for projects not in the registryThe project registry lives at ~/.config/slate/projects.
slate setup makes *.test resolve locally by running a small dnsmasq container on 127.0.0.1:53. On macOS it writes /etc/resolver/test (one sudo prompt); on Linux, point your system resolver at 127.0.0.1 for *.test yourself. If *.test already resolves, slate leaves it alone.
Every running workspace takes one Docker network, and Docker's default address pools cap how many you can run at once: 32 on stock Docker Engine, 30 on OrbStack. slate doctor reports the budget and slate down reclaims networks left behind by workspaces stopped outside slate. To raise the ceiling, use a smaller subnet size in the daemon config (orb config docker on OrbStack, /etc/docker/daemon.json on Docker Engine):
{ "default-address-pools": [{ "base": "10.99.0.0/16", "size": 27 }] }Pick a base that doesn't overlap anything you route to, such as a VPN or office LAN.