The Knock CLI skill offers in-depth instructions for using the Knock CLI to manage workflows, templates, and notifications. It is designed for developers looking to streamline their notification systems and workflows.
npx skills add https://github.com/knocklabs/skills --skill knock-cliThe Knock CLI skill provides comprehensive guidance for developers managing notification workflows, email templates, guides, and partials in Knock projects. It covers installation, authentication, directory structure, and hands-on CLI commands like pull, push, validate, and run. The skill helps developers streamline notification system setup, modify workflow templates using visual blocks or HTML, create reusable email components, and manage message types and schemas. Use this skill when initializing new Knock projects, syncing resources between environments, or organizing notification infrastructure as code.
Install using `npx skills add https://github.com/knocklabs/skills --skill knock-cli`
Installing and authenticating with the Knock CLI
Understanding the directory structure of Knock
Managing notification resources with CLI commands
Creating and managing workflow templates
npx skills add https://github.com/knocklabs/skills --skill knock-cligit clone https://github.com/knocklabs/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Provide step-by-step instructions for using the Knock CLI to [ACTION, e.g., 'deploy a notification workflow for [COMPANY] in the [INDUSTRY] sector using the provided [DATA].']. Include commands, best practices, and troubleshooting tips. Assume I have basic familiarity with the Knock API but need guidance on CLI-specific workflows.
### Deploying a Notification Workflow with Knock CLI **Step 1: Authenticate** Run the following command to log in to your Knock account: ```bash knock auth login ``` Follow the prompts to authenticate. Ensure your terminal has access to your Knock API key. **Step 2: Initialize a Workflow** Create a new workflow file named `welcome_email.json`: ```bash knock workflows create --name "Welcome Email" --file ./welcome_email.json ``` **Step 3: Validate the Workflow** Check for errors before deployment: ```bash knock workflows validate --file ./welcome_email.json ``` **Step 4: Deploy the Workflow** Push the workflow to your Knock environment: ```bash knock workflows deploy --file ./welcome_email.json --env production ``` **Step 5: Monitor Deployment** Track the status of your deployment: ```bash knock workflows status --id "wf_123456" ``` **Troubleshooting** - If you encounter authentication errors, regenerate your API key in the Knock dashboard. - For workflow validation failures, check the JSON schema against the [Knock documentation](https://docs.knock.app). **Next Steps** - Test the workflow using the Knock dashboard or CLI: ```bash knock workflows test --id "wf_123456" --recipient "user_789" ``` - Monitor notification delivery in the Knock dashboard under the "Activity" tab.
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan