alineo init
Start a local OpenSandbox server in Docker and configure the current project.
bunx alineo-cli initWhat it does
- Checks that Docker is running.
- If an OpenSandbox container named
alineo-opensandboxis already running, exits immediately — nothing changes. - If the container exists but is stopped, restarts it.
- Otherwise, pulls
opensandbox/server:latestand starts it, mounting the Docker socket so the server can manage sandbox containers. - Waits up to 60 seconds for the server to report healthy.
- Writes
alineo.config.jsonin the current directory (project root) if it doesn't already exist.
The server it starts is configured with credential injection available out of the box — a sandbox that opts in with networkPolicy/credentialProxy can use sb.credentials.* with no extra setup on the server side. See Credentials. Sandboxes that don't ask for it are unaffected.
Output files
alineo.config.json
Written once, in the project root (not under .alineo/). Contains the connection details and defaults used by both the alineo CLI and the alineo SDK package.
{
"provider": "opensandbox",
"serverUrl": "http://127.0.0.1:8080",
"useServerProxy": true,
"apiKey": "",
"adapterPath": "./.alineo/ledger.db",
"agentsDir": "./agents",
"defaults": {
"resources": { "cpu": "1000m", "memory": "1Gi" }
}
}| Field | Description |
|---|---|
provider | Which sandbox provider runs the sandboxes. Default "opensandbox". Env ALINEO_PROVIDER overrides it. See Sandbox providers. |
serverUrl | The OpenSandbox server URL. |
useServerProxy | Always true when started via alineo init. The alineo SDK package reads this for its Sandbox client. |
apiKey | Empty for local dev. Set this if your server requires authentication. |
adapterPath | Path to the SQLite ledger database for this project. |
agentsDir | Directory alineo add/list/remove read and write agent spec files in. |
defaults.resources | CPU/memory used for an agent's sandbox when its spec omits resources. |
Idempotency
alineo init is safe to run multiple times. If the server is already running it prints the URL and exits. If alineo.config.json already exists it is not overwritten. A file written by an earlier version has no provider key. That means "opensandbox".
Docker requirements
- Docker Engine must be running before calling
alineo init. - Port
8080must be free. - The Docker socket
/var/run/docker.sockmust be accessible (standard on Linux and macOS with Docker Desktop).
Stopping the server
alineo init starts the server but does not provide a stop command. To stop it:
docker stop alineo-opensandboxTo remove the container entirely:
docker rm alineo-opensandboxThe next alineo init will start a fresh container.