Managing resources
Commands for managing all Knock resources at once.
These commands enable you to manage all Knock resources (workflows, partials, email layouts, translations, guides, and message-types) at once.
knock init [flags]
#Initializes a new Knock project by creating a knock.json file in the current working directory.
Flags
Optional target directory path to point the Knock CLI to. When not provided, the CLI will prompt you for a directory path.
knock pull [flags]
#Pulls the contents of all Knock resources (workflows, partials, email layouts, translations, guides, and message-types) from Knock into your local file system.
Resources will be grouped by resource type within subdirectories of the target directory path set either by your knock.json file or by the --knock-dir flag. See the Directory structure section for details on the directory structure used by push and pull commands.
Flags
The environment to use. Defaults to development.
The branch to use. Defaults to empty (the main branch).
The target directory path to pull all resources into.
Should any uncommitted changes be hidden? Defaults to false.
Removes the confirmation prompt. Defaults to false.
knock push [flags]
#Pushes all local resource files (workflows, partials, email layouts, and translations) back to Knock and upserts them.
Resources will be pushed to the target directory path set either by your knock.json file or by the --knock-dir flag. See the Directory structure section for details on the directory structure used by push and pull commands.
Flags
The target directory path to push all resources from.
Push and commit at the same time. Defaults to false.
The commit message to pass when using the --commit flag.