CLI
The archive binary is the server and the command line.
Usage
Every command except serve, types, user and spec pull needs at least one user. Commands act as the first owner, or as the user in -as email, which goes before the command. Output is JSON. Flags may come before or after the arguments.
archive -as sam@example.com list receipt shop="Albert Heijn" -limit 10Commands
| Command | Does |
|---|---|
archive serve [-addr :8080] | Serve the web app, HTTP API, sign-in and MCP, run syncs and process files |
archive mcp | Serve MCP over stdio |
archive types | List every type: kind, category, sensitivity and origin |
archive spec pull [-all] [file] | Write user types and edited built-ins as JSON; -all adds every built-in |
archive spec push [-dry-run] <file> | Preview the diff against the ontology, then apply it |
archive intake <dir|file-id> -type t [-space s] | Read new files in a folder, or one stored file, into type t |
archive file add <path> [-space s] [-type t] | Store and process a file, and read it into type t |
archive file get <id> [-o path|-] | Print the metadata, or write the content |
archive file list [-limit n] [-after id] | List files |
archive list <type> [-limit n] [-after id] [-reveal] [field=value …] | List objects with filters |
archive get <type> <id> [-reveal] | Read one object |
archive create <type> [-space s] [json] | Create an object from the argument or stdin |
archive set <type> <id> [json] | Set some fields; null clears a field |
archive update <type> <id> [json] | Replace the whole object |
archive delete <type> <id> | Delete an object with its provenance and links |
archive provenance <type> <id> | Where each field came from |
archive links <type> <id> | Links of an object |
archive search <query> [-type t] [-space s] [-source src] [-from d] [-to d] [-limit n] | Search records, files and raw items |
archive source add <kind> [-name n] [-space s] [-type t] [-schedule 15m] [-rate n] [json|-] | Connect a source; JSON is {"config", "credentials"} |
archive source list | List sources |
archive source run <id|name> | Sync now |
archive source remove <id|name> | Stop syncing; raw data and objects stay |
archive user add <email> [-name n] [-admin] | Add a user |
archive space add <name> | Add a space |
archive space list | List your spaces with your role |
archive space members <space> | List members |
archive space grant <space> <email> <role|none> | Set or remove a member |
archive token create [-name n] [-space s:role,…] [-expires 720h] [-full] | Make a token and print its secret |
archive token list | List your tokens |
archive token revoke <id> | Revoke a token |
archive secret grant|revoke <email> <type> | Grant or revoke a secret type |
archive version | Print the version |
In Docker
The binary is on the PATH in the image, and finds the running Postgres through /data.
docker exec archive archive types
docker exec -i archive archive spec push - < spec.json