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 [<project-name>] [options]

PARAMETERS

<project-name>
    The name of the directory to create for the new integration project. If omitted, the command will interactively prompt the user to provide a name.

--template <template-name>
    Specifies a starting template for the project. Common template names include trigger (for a simple trigger app), action (for a simple action app), search, or full (for a comprehensive project structure).

--public
    Initializes the project with configurations typically required for a public Zapier integration, which may involve additional setup steps or default file structures suitable for submission to Zapier's App Directory.

--private
    Initializes the project as a private Zapier integration. This is the default behavior if neither --public nor --private is specified, suitable for internal tools or integrations not intended for public listing.

--debug
    Enables verbose output, displaying detailed information about the command's execution process, which can be useful for troubleshooting.

--help
    Displays a concise help message and usage information for the zapier init command.

DESCRIPTION

zapier-init is a command-line utility provided as part of the Zapier CLI, designed to streamline the process of starting new Zapier integration projects. When executed, it creates a new project directory with a pre-configured boilerplate, including essential files and directory structures necessary for developing a custom Zapier integration. This typically includes a package.json file, a src directory for code, and initial configuration files. It prompts the user for basic project details, such as the project name and type, ensuring that the scaffolding is tailored to the specific integration being built. By automating the setup process, zapier-init helps developers quickly get started, enforce best practices, and maintain consistency across different integration projects, saving time and reducing the chances of errors during initial setup. It's a crucial first step for anyone building a private or public Zapier app, offering a solid foundation to build upon.

CAVEATS

Users must have Node.js and npm installed to use the Zapier CLI. The zapier-platform-cli package must be installed globally via npm before zapier init can be executed. While zapier init provides a solid boilerplate, successful integration development requires familiarity with JavaScript/Node.js and Zapier's platform concepts and best practices.

INSTALLATION

The zapier-init command is a subcommand of the Zapier CLI, not a standalone utility. To make it available, you must first install the Zapier CLI globally using npm:

npm install -g zapier-platform-cli

Ensure you have Node.js and npm installed on your system before attempting this installation.

PROJECT STRUCTURE

Upon successful execution, zapier init creates a new directory (named after your project) containing a structured boilerplate. This typically includes:
1. A package.json file for project metadata and dependencies.
2. A src/ directory, which houses your integration's core logic (e.g., index.js).
3. Potentially other configuration files or subdirectories depending on the chosen --template or options, providing a ready-to-develop environment.

HISTORY

The zapier-init command is an integral part of the Zapier CLI, which was introduced to empower developers to build and manage Zapier integrations more efficiently from their local development environments. Prior to the CLI, app development often involved more manual setup. The CLI, including zapier-init, streamlined the initial scaffolding and subsequent deployment processes, making it easier to manage versions and test integrations locally. Its evolution reflects Zapier's commitment to providing robust developer tools for its expanding platform.

SEE ALSO

zapier push, zapier deploy, zapier register, npm(1), node(1)

Copied to clipboard