Commands
alineo add
Fetch an agent spec from a URL or local file and save it to your project's agents directory.
bunx alineo-cli add <url> [options]Arguments
| Argument | Description |
|---|---|
url | URL or local file path to an AgentSpec JSON. Required. |
Options
| Option | Description |
|---|---|
--name <name> | Override the saved file's name. Defaults to the name field in the spec. |
There is no --server flag — add doesn't talk to a server at all, it only reads and writes local files.
What it does
- Reads
alineo.config.jsonforagentsDir(defaults to./agents). If no project-localalineo.config.jsonexists, falls back to a global config at~/.config/alineo/config.json, auto-creating it with defaults if that's missing too —alineo initis not actually required first. - Fetches the URL (or reads the local file) and validates it as an
AgentSpec:namemust be a string,harnessmust be"pi". All other fields are unchecked. - Resolves any
registryDependenciesfirst — each dependency URL is fetched and saved the same way, recursively, depth-first, before the top-level spec is saved. Dependencies are not deduplicated across separateaddinvocations, or within recursive resolution of the same tree — a dependency listed twice is fetched and saved twice. - Writes the validated spec to
<agentsDir>/<name>.json.
add never creates a sandbox, runs setup, or contacts the OpenSandbox server directly — it's a local file operation. The sandbox work happens later, the first time you call Alineo.start() on the saved spec (see Running an agent spec).
Examples
From a URL:
bunx alineo-cli add https://example.com/specs/node-toolchain.jsonFrom a local file:
bunx alineo-cli add ./my-agent.jsonWith a custom name:
bunx alineo-cli add https://example.com/specs/node-toolchain.json --name ci-envOutput
Agent spec saved: agents/node-toolchain.json
Load it with: Alineo.start(await Bun.file("agents/node-toolchain.json").json(), { adapter }) from alineoNotes
alineo adddoes not requirealineo initto have been run first — it falls back to a global config, auto-creating one with defaults if none exists yet.- If a spec's
registryDependencieschain is large or has cycles,addwill fetch and save every one of them without any cycle detection — be careful publishing self-referential or deeply nested dependency chains. - Re-running
addon the same URL overwrites the previously saved spec file with the latest content from the URL.