CLI
Install the Nango CLI
Install the Nango CLI globally:
In the folder where you want your integration folder (e.g. root of your project), run:
This creates the ./nango-integrations
folder with some initial configuration and an example
sync script. The nango-integrations
directory looks like this:
CLI Authentication
Add the following env vars. We recommend that you have a .env
file in ./nango-integrations
:
Get your prod
and dev
secret keys from the Environment Settings tab (toggle between the prod
and dev
environment in the left nav bar).
For self-hosting, set the NANGO_HOSTPORT
env variable to http://localhost:3003
(for local development) or your instance’s URL.
All CLI commands & command details
Check out all CLI commands by running:
Get details about a specific command by running:
Command | Description | Details |
---|---|---|
nango init | Creates the nango-integrations directory with a demo Github integration. | Generates models.ts , but not the compiled .js files. |
nango dev | Necessary to edit integration configurations and scripts. | Watches the nango.yaml and integration scripts, re-generates models.ts and compiled .js files. |
nango generate | Generates an integration script .ts file with initial scaffold when new syncs appear in your nango.yaml . | Re-generates models.ts , not the compiled .js files. |
nango dryrun <params> | Lets you test integration scripts locally. | |
nango deploy <env> | Lets you deploy your sync to your dev or prod environment | Generates the compiled .js files. |
nango migrate-to-directories | For earlier iterations of the nango-integrations directory all script files were located at the root level of the nango-integrations directory . | Moves the script files to syncs and actions directory within the integration name. |
Flags & environment variables
Global command flags:
Environment variables:
Questions, problems, feedback? Please reach out in the Slack community.
Was this page helpful?