repost schema init creates a repost/ directory with a working starter schema, a .env file with the two credential placeholders, and the matching .gitignore entries. The starter schema is canonically formatted and generates as-is.
Usage#
repost schema init [options]Run bare on a terminal, it prompts for the SDK language and output directory. With any argument, or outside a terminal, it runs headless with the flags below, so scripts and CI never see a prompt.
Options#
| Option | Description |
|---|---|
--language <language> | SDK language for the scaffolded generator block. Defaults to typescript; see languages for the values. |
--output <path> | Generated source root written into the schema. Required for every language except TypeScript. |
--resource-output <path> | Java and Kotlin only: the generated resource root. |
--package-name <package> | Java and Kotlin only: the package for generated code. |
--client-name <type> | Java and Kotlin only: the generated client class name. Defaults to RepostClient. |
What it does#
- Validates the options. A Go or Python init without
--outputis refused, and a Java or Kotlin init missing arguments reports every missing flag in one error, writing nothing. - Refuses to run if
repost/already exists:`repost/` already exists — refusing to overwrite an existing workspace. - Writes
repost/schema.repostwith a starteruser.createdevent and the generator block for your language. - Adds
REPOST_SEND_API_KEY=""andREPOST_TOKEN=""placeholders to.env, and.envplus the engine's state directories to.gitignore. Existing lines are never clobbered or duplicated. - Prints language-specific next steps.
Exit code 1 on any refusal, 0 on success.
Example#
repost schema init --language typescriptCreated repost/schema.repost
Created .env
Created .gitignore
Next steps:
1) edit repost/schema.repost
2) npm install @repost/client
3) repost schema migrate dev --name init
4) create an Environment in the dashboard and paste its API key
into .env (REPOST_SEND_API_KEY)
5) import { createRepostClient } from "@repost/client"A JVM init also prints the managed source and resource roots, the compatible runtime and plugin coordinates, and the import line for your generated client:
repost schema init --language java \
--output ./src/main/java \
--resource-output ./src/main/resources \
--package-name com.acme.orders \
--client-name OrdersClient