Knock CLI basics: notification workflows in code

Опубликовано: 17 Март 2025
на канале: Knock
152
5

The Knock CLI provides developers a way to bring resources in Knock directly into their codebases for local editing, version control, and CI/CD. In the first part of this series exploring the Knock CLI, we’ll cover the following:

installing the CLI from npm or homebrew
configuring the CLI with a config.json file
using the workflow list and get commands to read data about about existing workflows
pulling workflows into your codebase as JSON, MD, and HTML files
validating and pushing workflow changes back to Knock

Stay tuned for the next parts of this series covering email layouts and translations.

Resources:
https://docs.knock.app/cli,
https://knock.app/cli,
https://docs.knock.app/mapi

Chapters
00:00 Intro
00:20 Installing with NPM
00:42 Authenticate with Knock
02:13 Check auth with whoami
02:39 List workflows with knock workflow list
02:55 Environments with CLI
03:26 Get workflow details with knock workflow get
03:48 Creating local folders for Knock resources
04:32 Pulling workflows into local folder
04:53 Examining local workflow resources
06:05 Updating local message template
06:16 Validating local changes
06:40 Pushing local changes to Knock
07:23 Examining remote commits
07:37 Outro