Command Line

Houdini comes with a powerful command-line interface used to do things like start a new project, generate your runtime, etc. Any command can take the --help flag to print help for that command.

Generate

houdini generate

Generates the runtime and the artifacts for every document in your project

Flags:

  • --pull-schema or -p pulls the latest schema before generating. Keep in mind you only need to do this if you don’t already have the most up to date version of your schema in your local filesystem. If you are defining your graphql schema inside of you SvelteKit application or are in a monorepo, you don’t need to use this flag.
  • --output or -o specifies a location for the runtime generator to leave a query map for certain flavors of persisted queries.
  • --headers or -h specifies headers to use when pulling your schema. Should be passed as KEY=VALUE
  • --log or -l specifies the log level for the generation. One of “summary”, “short-summary”, “quiet” or “full”.

Init

houdini init

Bootstraps a new project with the necessary files to start using houdini

Flags:

  • --headers or -h specifies headers to use when pulling your schema. Should be passed as KEY=VALUE

Pull Schema

houdini pull-schema

Pull the latest schema for your project. In order for this command to run, you must have an apiUrl value set in your config file.

Flags:

  • --headers or -h specifies headers to use when pulling your schema. Should be passed as KEY=VALUE