LinuxCommandLibrary

zapier-init

Initialize a new Zapier integration project

TLDR

Initialize a new Zapier integration

$ zapier init [path/to/directory]
copy

Initialize a new Zapier integration with a specific template
$ zapier init [path/to/directory] [[-t|--template]] [basic-auth|callback|custom-auth|digest-auth|dynamic-dropdown|files|minimal|oauth1-trello|oauth2|search-or-create|session-auth|typescript]
copy

Show extra debugging output
$ zapier init [[-d|--debug]]
copy

SYNOPSIS

zapier init [<path>] [-t, --template <name>] [--quickstart]

PARAMETERS

-h, --help
    Display help and usage information

-t, --template <name>
    Initialize using a specific template (e.g., 'cli', 'rest-hook')

--quickstart
    Enable quickstart mode for faster CLI project setup

-V, --version
    Output the CLI version number

<path>
    Optional target directory (defaults to current)

DESCRIPTION

The zapier init command is part of the Zapier Platform CLI, a tool for developers building custom integrations (apps) on the Zapier platform. It scaffolds a new project directory with essential files and structure required for a Zapier app, including zapier.json for configuration, authentication setups, core triggers/actions like create, perform, and basic Node.js code templates.

Running the command interactively prompts for details like app name, authentication type (Basic Auth, API Key, OAuth1/OAuth2, Custom), and whether to include tests or examples. Alternatively, specify a template for pre-configured setups (e.g., REST hook, CLI-based). It initializes a Git repository, installs dependencies via npm, and prepares the project for local testing with zapier test and deployment via zapier deploy.

This streamlines onboarding, ensuring compliance with Zapier's bundle system for efficient, scalable automations connecting thousands of apps.

CAVEATS

Requires Node.js (≥14), npm, and global Zapier CLI installation via npm i -g @zapier/cli. Interactive mode needs internet for templates. Not for production deploys; use zapier deploy.

INSTALLATION

Install via npm install -g @zapier/cli, then authenticate with zapier login.

POST-INIT STEPS

Run npm install, edit zapier.json, test with zapier test, deploy via zapier deploy.

HISTORY

Introduced with Zapier Platform CLI v10+ (circa 2020), evolving from legacy Partner API. Enhanced in v11+ for better templates, OAuth support, and CLI quickstarts to boost developer adoption amid Zapier's growth to 6,000+ apps.

SEE ALSO

npm(1), npx(1), git(1), zapier(1)

Copied to clipboard