init

strata init creates the Strata home directory and prints the commands worth running first.

strata init
initialized /home/you/.strata next steps strata ./my-db kv put greeting hello strata ./my-db kv get greeting strata --cache strata agents guide

Run it again and it says already initialized, followed by the same next steps. It does not fail, and it does not overwrite anything.

You do not have to run it

This is the part worth knowing. init is a convenience, not a prerequisite: creating a database with strata ./my-db kv put greeting hello works on a machine where init has never been run. Nothing gates on it.

What it gives you is a home directory in place before anything needs it, and a printed starting point.

What it actually creates

The home directory, and nothing inside it. There is no configuration file, no database and no state: a freshly initialized home is an empty directory. What you find in a home that has been used is put there by something else - the installer writes bin/, and doctor reports a models path that only exists once a local model has been pulled.

STRATA_HOME moves it. That is how you keep a throwaway home for a test without touching the real one.

STRATA_HOME=/tmp/throwaway strata init

Where the home sits, and what else knows about it

doctor prints the resolved home, which is the quickest way to find out which one a shell is using:

strata doctor

The user configuration file is separate and is not created by init. doctor reports its path and whether it is readable.

Options

init takes no options of its own beyond the global ones. --json returns the resolved home, whether this call created it, and the next steps as an array, which is the form to use if you are scripting a first-run check.

Edit this page · Report an issue