Snyk API Import is a CLI tool for importing projects into Snyk via the Snyk API at a controlled pace, with built-in rate limiting handling, queuing, and retries. Current stable version is 2.23.1, with releases on a monthly/quarterly cadence. It supports GitHub, GitLab, Bitbucket Server, Bitbucket Cloud, and Azure Repos. Key differentiators include automatic rate limit handling for SCMs, queuing to reduce failures, and ability to resume after interruption. This repository is in maintenance mode (no new features, only bug & security fixes). Node.js >=20 required.
npm install snyk-api-importVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic usage of runImport with async/await and environment variables for credentials.
Use --force flag to re-import existing targets
Rate limiting is now automatic; remove the flag
Upgrade to Node.js 20 or later
Convert to ES module imports or use dynamic import()
Set SNYK_TOKEN environment variable and omit --token
Set SNAPI_BASE_URL instead of SNYK_API
Ensure your GitHub personal access token has sufficient rate limits; consider using a GitHub App token
Run 'npm install snyk-api-import@latest' and ensure 'type': 'module' in package.json
Install globally: 'npm install -g snyk-api-import' or use npx: 'npx snyk-api-import'
Set SNYK_TOKEN environment variable: 'export SNYK_TOKEN=your-token'
Add 'type': 'module' to package.json or rename file to .mjs
No dependency data recorded yet.