A command-line interface for interacting with Knock.
$ npm install -g @knocklabs/cli
$ knock COMMAND
running command...
$ knock (--version)
@knocklabs/cli/0.3.1 darwin-arm64 node-v20.9.0
$ knock --help [COMMAND]
USAGE
$ knock COMMAND
...knock branch create SLUGknock branch delete SLUGknock branch exitknock branch listknock branch switch SLUGknock commitknock commit get IDknock commit listknock commit promoteknock guide activate GUIDEKEYknock guide generate-typesknock guide get GUIDEKEYknock guide listknock guide pull [GUIDEKEY]knock guide push [GUIDEKEY]knock guide validate [GUIDEKEY]knock help [COMMAND]knock layout get EMAILLAYOUTKEYknock layout listknock layout pull [EMAILLAYOUTKEY]knock layout push [EMAILLAYOUTKEY]knock layout validate [EMAILLAYOUTKEY]knock loginknock logoutknock message-type get MESSAGETYPEKEYknock message-type listknock message-type pull [MESSAGETYPEKEY]knock message-type push [MESSAGETYPEKEY]knock message-type validate [MESSAGETYPEKEY]knock partial get PARTIALKEYknock partial listknock partial pull [PARTIALKEY]knock partial push [PARTIALKEY]knock partial validate [PARTIALKEY]knock pullknock pushknock translation get TRANSLATIONREFknock translation listknock translation pull [TRANSLATIONREF]knock translation push [TRANSLATIONREF]knock translation validate [TRANSLATIONREF]knock whoamiknock workflow activate WORKFLOWKEYknock workflow generate-typesknock workflow get WORKFLOWKEYknock workflow listknock workflow pull [WORKFLOWKEY]knock workflow push [WORKFLOWKEY]knock workflow run WORKFLOWKEYknock workflow validate [WORKFLOWKEY]
Creates a new branch off of the development environment.
USAGE
$ knock branch create SLUG [--json] [--service-token <value>]
ARGUMENTS
SLUG The slug for the new branch
FLAGS
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/branch/create.ts
Deletes an existing branch with the given slug.
USAGE
$ knock branch delete SLUG [--service-token <value>] [--force]
ARGUMENTS
SLUG The slug of the branch to delete
FLAGS
--force Remove the confirmation prompt.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/branch/delete.ts
Exits the current branch.
USAGE
$ knock branch exit [--service-token <value>]
FLAGS
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/branch/exit.ts
Display all existing branches off of the development environment.
USAGE
$ knock branch list [--json] [--service-token <value>] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/branch/list.ts
Switches to an existing branch with the given slug.
USAGE
$ knock branch switch SLUG [--service-token <value>] [--create] [--force]
ARGUMENTS
SLUG The slug of the branch to switch to
FLAGS
--create Create the branch if it doesn't yet exist.
--force Remove the confirmation prompt.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/branch/switch.ts
Commit all changes in development environment.
USAGE
$ knock commit [--service-token <value>] [--environment development] [--branch <value>] [-m <value>]
[--force]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message.
--branch=<value> The slug of the branch to use.
--environment=<option> [default: development] Committing changes applies to the development environment only,
use `commit promote` to promote changes to a subsequent environment.
<options: development>
--force Remove the confirmation prompt.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/commit/index.ts
Display a single commit
USAGE
$ knock commit get ID [--json] [--service-token <value>]
FLAGS
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/commit/get.ts
Display all commits in an environment
USAGE
$ knock commit list [--json] [--service-token <value>] [--environment <value>] [--branch <value>] [--promoted]
[--resource-type email_layout|guide|message_type|partial|translation|workflow...] [--resource-id <value>] [--after
<value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--limit=<value> The total number of entries to fetch per page.
--[no-]promoted Show only promoted or unpromoted changes between the given environment and the subsequent
environment.
--resource-id=<value> Filter commits by resource identifier. Must be used together with resource-type. For most
resources, this will be the resource key. In the case of translations, this will be the
locale code and namespace, separated by a /. For example, en/courses or en.
--resource-type=<option>... Filter commits by resource type. Can be used alone or together with resource-id. Use
multiple --resource-type flags for multiple values.
<options: email_layout|guide|message_type|partial|translation|workflow>
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/commit/list.ts
Promote one or all commits to the subsequent environment.
USAGE
$ knock commit promote [--service-token <value>] [--to <value>] [--force] [--only <value>]
FLAGS
--force Remove the confirmation prompt.
--only=<value> The target commit id to promote to the subsequent environment
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--to=<value> The destination environment to promote all changes from the preceding environment.
See code: src/commands/commit/promote.ts
Activate or deactivate a guide in a given environment.
USAGE
$ knock guide activate GUIDEKEY --environment <value> [--service-token <value>] [--branch <value>] [--status
true|false | --from <value> | --until <value>] [--force]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> (required) The environment to use.
--force Remove the confirmation prompt.
--from=<value> Activate the guide from this ISO8601 UTC datetime (e.g., '2024-01-15T10:30:00Z').
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--status=<option> The guide active status to set. Cannot be used with --from/--until.
<options: true|false>
--until=<value> Deactivate the guide at this ISO8601 UTC datetime (e.g., '2024-01-15T18:30:00Z').
DESCRIPTION
Activate or deactivate a guide in a given environment.
This enables or disables a guide in a given environment without
needing to go through environment promotion.
You can activate or deactivate a guide immediately or schedule it to be activated
or deactivated at a later time using the --from and --until flags.
See code: src/commands/guide/activate.ts
Generate types for all guides in an environment and write them to a file.
USAGE
$ knock guide generate-types --output-file <value> [--service-token <value>] [--environment <value>] [--branch
<value>]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] Select the environment to generate types for.
--output-file=<value> (required) The output file to write the generated types to. We currently support .ts, .py,
.go, .rb files only. Your file extension will determine the target language for the generated
types.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
DESCRIPTION
Generate types for all guides in an environment and write them to a file.
See code: src/commands/guide/generate-types.ts
Display a single guide from an environment.
USAGE
$ knock guide get GUIDEKEY [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/guide/get.ts
Display all guides for an environment.
USAGE
$ knock guide list [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/guide/list.ts
Pull one or more guides from an environment into a local file system.
USAGE
$ knock guide pull [GUIDEKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--guides-dir <value> --all] [--hide-uncommitted-changes] [--force]
FLAGS
--all Whether to pull all guides from the specified environment.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--guides-dir=<value> The target directory path to pull all guides into.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/guide/pull.ts
Push one or more guides from a local file system to Knock.
USAGE
$ knock guide push [GUIDEKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--guides-dir <value> --all] [-m <value> --commit]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--all Whether to push all guides from the target directory.
--branch=<value> The slug of the branch to use.
--commit Push and commit the guide(s) at the same time
--environment=<value> [default: development] The environment to push the guide to. Defaults to development.
--guides-dir=<value> The target directory path to find all guides to push.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/guide/push.ts
Validate one or more guides from a local file system.
USAGE
$ knock guide validate [GUIDEKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--guides-dir <value> --all]
FLAGS
--all Whether to validate all guides from the target directory.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to validate the guide in. Defaults to development.
--guides-dir=<value> The target directory path to find all guides to validate.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/guide/validate.ts
Display help for knock.
USAGE
$ knock help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for knock.
See code: @oclif/plugin-help
Display a single email layout from an environment.
USAGE
$ knock layout get EMAILLAYOUTKEY [--json] [--service-token <value>] [--environment <value>] [--branch
<value>] [--hide-uncommitted-changes]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/layout/get.ts
Display all email layouts for an environment.
USAGE
$ knock layout list [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/layout/list.ts
Pull one or more email layouts from an environment into a local file system.
USAGE
$ knock layout pull [EMAILLAYOUTKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--layouts-dir <value> --all] [--hide-uncommitted-changes] [--force]
FLAGS
--all Whether to pull all email layouts from the specified environment.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--hide-uncommitted-changes Hide any uncommitted changes.
--layouts-dir=<value> The target directory path to pull all email layouts into.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/layout/pull.ts
Push one or more email layouts from a local file system to Knock.
USAGE
$ knock layout push [EMAILLAYOUTKEY] [--service-token <value>] [--environment development] [--branch <value>]
[--layouts-dir <value> --all] [-m <value> --commit]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--all Whether to push all layouts from the target directory.
--branch=<value> The slug of the branch to use.
--commit Push and commit the layout(s) at the same time
--environment=<option> [default: development] Pushing an email layout is only allowed in the development
environment
<options: development>
--layouts-dir=<value> The target directory path to find all layouts to push.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/layout/push.ts
Validate one or more layouts from a local file system.
USAGE
$ knock layout validate [EMAILLAYOUTKEY] [--service-token <value>] [--environment development] [--branch <value>]
[--layouts-dir <value> --all]
FLAGS
--all Whether to validate all layouts from the target directory.
--branch=<value> The slug of the branch to use.
--environment=<option> [default: development] Validating a layout is only done in the development environment
<options: development>
--layouts-dir=<value> The target directory path to find all layouts to validate.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/layout/validate.ts
Log in with a Knock user account.
USAGE
$ knock login [--service-token <value>]
FLAGS
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/login.ts
Log out of a Knock user account.
USAGE
$ knock logout [--service-token <value>]
FLAGS
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/logout.ts
Display a single in-app message type from an environment.
USAGE
$ knock message-type get MESSAGETYPEKEY [--json] [--service-token <value>] [--environment <value>] [--branch
<value>] [--hide-uncommitted-changes]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/message-type/get.ts
Display all in-app message types for an environment.
USAGE
$ knock message-type list [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/message-type/list.ts
Pull one or more in-app message types from an environment into a local file system.
USAGE
$ knock message-type pull [MESSAGETYPEKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--message-types-dir <value> --all] [--hide-uncommitted-changes] [--force]
FLAGS
--all Whether to pull all in-app message types from the specified environment.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--hide-uncommitted-changes Hide any uncommitted changes.
--message-types-dir=<value> The target directory path to pull all in-app message types into.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/message-type/pull.ts
Push one or more message types from a local file system to Knock.
USAGE
$ knock message-type push [MESSAGETYPEKEY] [--service-token <value>] [--environment development] [--branch <value>]
[--message-types-dir <value> --all] [-m <value> --commit]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--all Whether to push all message types from the target directory.
--branch=<value> The slug of the branch to use.
--commit Push and commit the message type(s) at the same time
--environment=<option> [default: development] Pushing a message type is only allowed in the development
environment
<options: development>
--message-types-dir=<value> The target directory path to find all message types to push.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/message-type/push.ts
Validate one or more message types from a local file system.
USAGE
$ knock message-type validate [MESSAGETYPEKEY] [--service-token <value>] [--environment development] [--branch <value>]
[--message-types-dir <value> --all]
FLAGS
--all Whether to validate all message types from the target directory.
--branch=<value> The slug of the branch to use.
--environment=<option> [default: development] Validating a message type is only done in the development
environment
<options: development>
--message-types-dir=<value> The target directory path to find all message types to validate.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/message-type/validate.ts
Display a single partial from an environment.
USAGE
$ knock partial get PARTIALKEY [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/partial/get.ts
Display all partials for an environment.
USAGE
$ knock partial list [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/partial/list.ts
Pull one or more partial from an environment into a local file system.
USAGE
$ knock partial pull [PARTIALKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--partials-dir <value> --all] [--hide-uncommitted-changes] [--force]
FLAGS
--all Whether to pull all partials from the specified environment.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--hide-uncommitted-changes Hide any uncommitted changes.
--partials-dir=<value> The target directory path to pull all partials into.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/partial/pull.ts
Push one or more partials from a local file system to Knock.
USAGE
$ knock partial push [PARTIALKEY] [--service-token <value>] [--environment development] [--branch <value>]
[--partials-dir <value> --all] [-m <value> --commit]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--all Whether to push all partials from the target directory.
--branch=<value> The slug of the branch to use.
--commit Push and commit the partial(s) at the same time
--environment=<option> [default: development] Pushing a partial is only allowed in the development environment
<options: development>
--partials-dir=<value> The target directory path to find all partials to push.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/partial/push.ts
Validate one or more partials from a local file system.
USAGE
$ knock partial validate [PARTIALKEY] [--service-token <value>] [--environment development] [--branch <value>]
[--partials-dir <value> --all]
FLAGS
--all Whether to validate all partials from the target directory.
--branch=<value> The slug of the branch to use.
--environment=<option> [default: development] Validating a partial is only done in the development environment
<options: development>
--partials-dir=<value> The target directory path to find all partials to validate.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/partial/validate.ts
Pull all resources from an environment into a local file system.
USAGE
$ knock pull --knock-dir <value> [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--force]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--hide-uncommitted-changes Hide any uncommitted changes.
--knock-dir=<value> (required) The target directory path to pull all resources into.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/pull.ts
Push all resources from a local file system to Knock.
USAGE
$ knock push --knock-dir <value> [--service-token <value>] [--environment development] [--branch
<value>] [-m <value> --commit]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--branch=<value> The slug of the branch to use.
--commit Push and commit the resource(s) at the same time
--environment=<option> [default: development] Pushing resources is only allowed in the development environment
<options: development>
--knock-dir=<value> (required) The target directory path to find all resources to push.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
See code: src/commands/push.ts
Display a single translation from an environment.
USAGE
$ knock translation get TRANSLATIONREF [--json] [--service-token <value>] [--environment <value>] [--branch
<value>] [--hide-uncommitted-changes] [--format json|po]
ARGUMENTS
TRANSLATIONREF Translation ref is a identifier string that refers to a unique translation.
If a translation has no namespace, it is the same as the locale, e.g. `en`.
If namespaced, it is formatted as namespace.locale, e.g. `admin.en`.
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--format=<option> [default: json] Specify the output format of the returned translations.
<options: json|po>
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/translation/get.ts
Display all translations for an environment.
USAGE
$ knock translation list [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/translation/list.ts
Pull one or more translations from an environment into a local file system.
USAGE
$ knock translation pull [TRANSLATIONREF] [--service-token <value>] [--environment <value>] [--branch <value>]
[--translations-dir <value> --all] [--hide-uncommitted-changes] [--force] [--format json|po]
ARGUMENTS
[TRANSLATIONREF] Translation ref is a identifier string that refers to a unique translation.
If a translation has no namespace, it is the same as the locale, e.g. `en`.
If namespaced, it is formatted as namespace.locale, e.g. `admin.en`.
FLAGS
--all Whether to pull all translations from the specified environment.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--format=<option> [default: json] Specify the output format of the returned translations.
<options: json|po>
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--translations-dir=<value> The target directory path to pull all translations into.
See code: src/commands/translation/pull.ts
Push one or more translations from a local file system to Knock.
USAGE
$ knock translation push [TRANSLATIONREF] [--service-token <value>] [--environment development] [--branch <value>]
[--translations-dir <value> --all] [-m <value> --commit]
ARGUMENTS
[TRANSLATIONREF] Translation ref is a identifier string that refers to a unique translation.
If a translation has no namespace, it is the same as the locale, e.g. `en`.
If namespaced, it is formatted as namespace.locale, e.g. `admin.en`.
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--all Whether to push all translations from the target directory.
--branch=<value> The slug of the branch to use.
--commit Push and commit the translation(s) at the same time
--environment=<option> [default: development] Pushing a translation is only allowed in the development
environment
<options: development>
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--translations-dir=<value> The target directory path to find all translations to push.
See code: src/commands/translation/push.ts
Validate one or more translations from a local file system.
USAGE
$ knock translation validate [TRANSLATIONREF] [--service-token <value>] [--environment development] [--branch <value>]
[--translations-dir <value> --all]
ARGUMENTS
[TRANSLATIONREF] Translation ref is a identifier string that refers to a unique translation.
If a translation has no namespace, it is the same as the locale, e.g. `en`.
If namespaced, it is formatted as namespace.locale, e.g. `admin.en`.
FLAGS
--all Whether to validate all translations from the target directory.
--branch=<value> The slug of the branch to use.
--environment=<option> [default: development] Validating a translation is only done in the development
environment
<options: development>
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--translations-dir=<value> The target directory path to find all translations to validate.
See code: src/commands/translation/validate.ts
Verify the provided service token.
USAGE
$ knock whoami [--json] [--service-token <value>]
FLAGS
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/whoami.ts
Activate or deactivate a workflow in a given environment.
USAGE
$ knock workflow activate WORKFLOWKEY --environment <value> [--service-token <value>] [--branch <value>] [--status
true|false] [--force]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> (required) The environment to use.
--force Remove the confirmation prompt.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--status=<option> [default: true] The workflow active status to set.
<options: true|false>
DESCRIPTION
Activate or deactivate a workflow in a given environment.
This immediately enables or disables a workflow in a given environment without
needing to go through environment promotion.
By default, this command activates a given workflow. Pass in the --status flag
with `false` in order to deactivate it.
See code: src/commands/workflow/activate.ts
Generate types for all workflows in an environment and write them to a file.
USAGE
$ knock workflow generate-types --output-file <value> [--service-token <value>] [--environment <value>] [--branch
<value>]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] Select the environment to generate types for.
--output-file=<value> (required) The output file to write the generated types to. We currently support .ts, .rb,
.go, .py files only. Your file extension will determine the target language for the generated
types.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
DESCRIPTION
Generate types for all workflows in an environment and write them to a file.
See code: src/commands/workflow/generate-types.ts
Display a single workflow from an environment.
USAGE
$ knock workflow get WORKFLOWKEY [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes]
FLAGS
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/workflow/get.ts
Display all workflows for an environment.
USAGE
$ knock workflow list [--json] [--service-token <value>] [--environment <value>] [--branch <value>]
[--hide-uncommitted-changes] [--after <value>] [--before <value>] [--limit <value>]
FLAGS
--after=<value> The cursor after which to fetch the next page.
--before=<value> The cursor before which to fetch the previous page.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--hide-uncommitted-changes Hide any uncommitted changes.
--limit=<value> The total number of entries to fetch per page.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
GLOBAL FLAGS
--json Format output as json.
See code: src/commands/workflow/list.ts
Pull one or more workflows from an environment into a local file system.
USAGE
$ knock workflow pull [WORKFLOWKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--workflows-dir <value> --all] [--hide-uncommitted-changes] [--force]
FLAGS
--all Whether to pull all workflows from the specified environment.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to use.
--force Remove the confirmation prompt.
--hide-uncommitted-changes Hide any uncommitted changes.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--workflows-dir=<value> The target directory path to pull all workflows into.
See code: src/commands/workflow/pull.ts
Push one or more workflows from a local file system to Knock.
USAGE
$ knock workflow push [WORKFLOWKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--workflows-dir <value> --all] [-m <value> --commit]
FLAGS
-m, --commit-message=<value> Use the given value as the commit message
--all Whether to push all workflows from the target directory.
--branch=<value> The slug of the branch to use.
--commit Push and commit the workflow(s) at the same time
--environment=<value> [default: development] The environment to push the workflow to. Defaults to development.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--workflows-dir=<value> The target directory path to find all workflows to push.
See code: src/commands/workflow/push.ts
Test run a workflow using the latest version from Knock.
USAGE
$ knock workflow run WORKFLOWKEY --recipients <value> [--service-token <value>] [--environment <value>]
[--branch <value>] [--actor <value>] [--tenant <value>] [--data <value>]
FLAGS
--actor=<value> An actor id, or a JSON string of an actor object reference for the workflow run.
--branch=<value> The slug of the branch to use.
--data=<value> A JSON string of the data for this workflow
--environment=<value> [default: development] The environment in which to run the workflow
--recipients=<value> (required) One or more recipient user ids separated by comma, or a JSON string containing one
or more recipient object references for this workflow run.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--tenant=<value> A tenant id for the workflow run.
See code: src/commands/workflow/run.ts
Validate one or more workflows from a local file system.
USAGE
$ knock workflow validate [WORKFLOWKEY] [--service-token <value>] [--environment <value>] [--branch <value>]
[--workflows-dir <value> --all]
FLAGS
--all Whether to validate all workflows from the target directory.
--branch=<value> The slug of the branch to use.
--environment=<value> [default: development] The environment to validate the workflow in. Defaults to development.
--service-token=<value> [env: KNOCK_SERVICE_TOKEN] The service token to authenticate with.
--workflows-dir=<value> The target directory path to find all workflows to validate.
See code: src/commands/workflow/validate.ts