Skip to main content
The Nango CLI lets you initialize projects, develop integration functions locally, run dry runs against live connections, and deploy to your Nango environment.

Installation

After installing, verify the version:

Authentication

The CLI authenticates using secret keys stored in environment variables. Add these to a .env file inside your nango-integrations folder:
Get your keys from Settings > Environment Settings in the Nango dashboard. Toggle between dev and prod environments in the left nav bar.
For self-hosted instances, set NANGO_HOSTPORT to your instance URL (e.g. http://localhost:3003).

Project structure

After running nango init, your integration folder looks like this:

Commands

nango init

Initializes a new Nango integrations project in the specified directory.
Arguments Options Example

nango create

Creates a new integration function scaffold (sync, action, or on-event script).
Arguments Options Example

nango dev

Starts a local TypeScript watcher that compiles your integration functions as you edit them.
Run this while writing functions to get instant type checking and compilation feedback. Example

nango compile

Compiles all integration functions once without watching for changes. Useful for CI or one-off builds.

nango deploy

Deploys compiled integration functions to a Nango environment.
Arguments Options Example
Destructive changes (removing syncs or renaming models) always require explicit confirmation, even with --auto-confirm. Pass --allow-destructive to bypass this.

nango dryrun

Tests a sync or action locally against a real connection without writing data to Nango. Useful for debugging during development.
Arguments Options Example

nango generate:docs

Generates documentation for your integration functions from their TypeScript definitions.
Options

nango generate:tests

Generates test scaffolds for your integration scripts.
Options

nango clone

Clones integration templates from the nango integration-templates repository.
Arguments Options Example

nango migrate-to-zero-yaml

Migrates an existing nango.yaml-based project to the zero-YAML TypeScript format. Run this once if you have a legacy project.

nango version

Prints the installed CLI version.

Global flags

These flags are available on all commands:

Interactive mode

By default, the CLI prompts you for any missing arguments. For example, running nango create without flags shows a menu to select the function type, integration, and name. Disable interactive mode in CI or scripts:

Environment variables

Place these in a .env file inside your nango-integrations folder.

Dependency management

The CLI automatically detects your package manager and installs dependencies when needed. Detection order:
  1. packageManager field in package.json (Corepack standard)
  2. Lock files: pnpm-lock.yaml, yarn.lock, bun.lockb / bun.lock
  3. Falls back to npm
Supported package managers: npm, pnpm, yarn, bun. Use --no-dependency-update to opt out of automatic installs — for example, in monorepos where dependency management is handled at the workspace root.
When --no-dependency-update is set, ensure all dependencies are already installed before running commands.

Getting help

Run any command with --help to see its options: