komrad engine ensure

Create an engine's identity and logins, or reset their password

komrad engine

komrad engine ensure NAME

An engine is one komrad service on one machine. Everything it writes belongs to it, and Postgres keeps every other engine's rows out of its reach, because it connects as a login of its own that the database maps to its identity. This creates that identity if no engine has the name yet, a login for it and a read-only login for its MCP query tools, and the schema its job queue lives in, connecting as owner_database_url.

Both logins take the password in KOMRAD_ENGINE_PASSWORD, or a fresh one when that is unset, and running it again resets them to it. It prints the database_url the engine connects with. Naming an engine that already exists, such as the default one every row written before engines had logins belongs to, hands it new logins and keeps its rows.

Inherited flags#

FlagTypeDescription
--configstringArray

path to a config TOML, repeatable, later files win over earlier ones

--enginestring

engine to reach, named after a file in the config's engines directory, layered over the config