getstream init
Link the current directory to one of your apps. Each directory links independently, so separate checkouts can target different apps.
getstream initInteractively, init prompts for an organization and an app, then offers to install the Stream agent skills. With no account session it runs the browser sign-in first. On confirmation it writes the app's key, secret and app id to .stream/creds.yaml (mode 600), the file every other command reads, and adds .stream/ to .gitignore. The file carries a # Stream app: <name> (<id>) comment naming the app it holds.
Headless
Without a TTY, init cannot show the pickers. It writes a command file instead, .stream/init-<id>.yaml, listing the apps in each of your organizations plus commented options for creating a new app or a new organization and an optional skills: block. Uncommenting one choice and applying it with --command links the app as the interactive flow does, then deletes the command file.
getstream init --command .stream/init-<id>.yamlThis path still needs an account session to list your apps, so it is not how the CLI runs in CI. See Use the CLI in CI, where the pipeline sets STREAM_API_KEY and STREAM_API_SECRET from secrets and skips init.
Flags
| Flag | Effect |
|---|---|
--command <file> |
Apply a filled-in command file and link the app. Hidden from --help; the headless flow above is its only use. |
See also
- Manual quickstart: the init step in context
getstream open: open the linked app in the Dashboard- Projects and credentials: what
initwrites and how it's used