shki init
shki init [PATH] [--dialect postgres|mysql|sqlite]Alias: shki i. PATH defaults to the current directory; the dialect defaults
to postgres.
What it writes
Section titled “What it writes”<path>/ shki.toml # dialect, schema/migrations paths, migrations table schema/main.sql # Declarative Schema entrypoint (commented example) migrations/_meta/ # Snapshot and Journal metadata postgres-language-server.jsonc # PostgreSQL only: editor tooling configshki.toml is always written. schema/main.sql and
postgres-language-server.jsonc are only written when absent, so re-running
init in an existing project won’t clobber your schema.
The generated config is deliberately small:
dialect = "postgres"schema = "schema"migrations_dir = "migrations"timeout_seconds = 2
[migrations]schema = "shki"table = "__shki_migrations"prefix = "index"generate_down = falseExamples
Section titled “Examples”shki init # scaffold in place, PostgreSQLshki init db # scaffold into ./dbshki init db --dialect sqlite # migration-runner project, no Declarative SchemaSet database_url in shki.toml or export DATABASE_URL, describe your
schema in schema/main.sql, then run shki diff.
See also: Quick Start, Configuration.