---
schema_version: 1
route: /t/netlify.md
tool: "netlify"
---

# sincecutoff.com /t/netlify — Netlify CLI

- name: Netlify CLI
- kind: cli
- children: none
- homepage: <https://github.com/netlify/cli>

Changes to the tools coding agents drive, since a model's training cutoff, each linked to its first-party source. Check installed versions and limitations before acting; a cutoff date does not establish what a model knows.
Original editorial content: [Apache 2.0](https://sincecutoff.com/v1/data-license.txt), by [0xPatrick](https://0xpatrick.dev). Preserve applicable license and [NOTICE](https://sincecutoff.com/notice.txt) attribution when redistributing. Third-party source text and examples retain their own rights. [License scope and attribution](https://sincecutoff.com/v1/license.json).
To stay current, read the changes feed: [`/v1/changes.md?tool=netlify`](https://sincecutoff.com/v1/changes.md?tool=netlify) (or `.json`), adding `since=YYYY-MM-DD` for your training cutoff. Entries for registered children are included; the registry itself is `/v1/tools.json`. How to page and save your place: [llms.txt](https://sincecutoff.com/llms.txt).

### netlify init installs and syncs Netlify agent skills (2026-10-08)
- slug: netlify-init-installs-and-syncs-netlify-agent-skills-d275e7df847a
- score: 0.92

How to use it:

When initializing a repository or syncing installed Netlify skills, run `netlify init`; use `--skip-agent-setup` to skip skill installation or `--reset-context` to replace edited skills and migrate or delete edited copies under renamed or deprecated names.

Examples:

```
netlify init
```

```
netlify init --skip-agent-setup
```

```
netlify init --reset-context
```

- why_it_matters: Initialize a repository with current Netlify skills for AI coding agents, or reconcile its installed skills with the hosted manifest.
- before: Copy Netlify skills into the project manually; rerunning `init` left skills under prior or deprecated names in place and provided no way to restore an edited skill to the shipped release.
- sources: <https://github.com/netlify/cli/releases/tag/v27.12.0>, <https://github.com/netlify/cli/pull/8555>, <https://github.com/netlify/cli/pull/8556>, <https://github.com/netlify/cli/blob/v27.12.0/docs/commands/init.md>, <https://github.com/netlify/cli/blob/v27.12.0/README.md>
- gotchas: "Version: v27.12.0"; "--skip-agent-setup: Boolean flag; skip installing Netlify skills for AI coding agents into the project."; "--reset-context: Boolean flag; replace locally edited Netlify skills with the latest release, and migrate or delete edited copies under renamed or deprecated names."; "Prerequisite: Netlify CLI requires Node.js version 22.13.0 or above."; "A failed download warns and lets `init` continue."; "Locally edited copies are kept and listed unless `--reset-context` is used."; "A directory is removed only when its tree hash matches a shipped release and is re-hashed immediately before removal, or under `--reset-context` when it has a manifest name."; "Unknown directories, symlinks, and directories that differ from a skill name only by case on macOS are left alone, with or without `--reset-context`."; "Each request times out after 10 seconds."

### Netlify CLI logs accept --deploy-id (2026-09-04)
- slug: netlify-cli-logs-accept-deploy-id-95eb02fa4282
- score: 0.97

How to use it:

When inspecting a specific deploy, run `netlify logs --source deploy --deploy-id <deploy-id> --since 7d`; `<deploy-id>` is the deploy’s ID. The command can also target failed builds. [Netlify CLI v27.5.0 source](https://github.com/netlify/cli/blob/v27.5.0/src/commands/logs/index.ts)

Examples:

```
netlify logs --source deploy --deploy-id <deploy-id> --since 7d
```

```
netlify logs --source functions --deploy-id <deploy-id>
```

- why_it_matters: Inspect logs for a specific deploy while debugging or reviewing a Netlify project.
- before: The command documentation gives `netlify logs --source deploy --since 1h` for historical deploy logs without selecting a deploy ID.
- sources: <https://github.com/netlify/cli/releases/tag/v27.5.0>, <https://github.com/netlify/cli/blob/v27.5.0/src/commands/logs/index.ts>
- gotchas: "Version: v27.5.0"; "--source <type...>: Select log sources; choices include `deploy`, `functions`, and `edge-functions`. Defaults to functions and edge-functions."; "--deploy-id <deploy-id>: Show logs for a specific deploy by ID, including failed builds. Can be used with all sources."; "--since <time>: Set the start of the historical log window; accepts a duration or ISO 8601 timestamp. Defaults to 10m."

### netlify dev adds --watch-ignore (2026-07-07)
- slug: netlify-dev-adds-watch-ignore-21ffe4847f59
- score: 0.90

How to use it:

When running `netlify dev` with additional paths to exclude from watching, pass them with `--watch-ignore`. The CLI also ignores `publishDir` by default when it differs from `projectDir`.

Examples:

```
netlify dev --watch-ignore <path>
```

- why_it_matters: Run the Netlify development server for a repository with additional paths that should not be watched.
- sources: <https://github.com/netlify/cli/releases/tag/v26.2.0>, <https://github.com/netlify/cli/pull/8271>, <https://github.com/netlify/cli/blob/v26.2.0/src/commands/dev/types.d.ts>
- gotchas: "Version: v26.2.0"; "--watch-ignore <path>: Adds a path to the watch ignore list; represented as an array in the dev options."; "The CLI ignores `publishDir` by default only when it differs from `projectDir`."

### netlify database command provisions and manages Netlify Database (2026-04-28)
- slug: netlify-database-command-provisions-and-manages-netlify-database-f515c21f6d76
- score: 0.98

How to use it:

When a linked project needs Netlify Database setup, run `netlify database init` for interactive setup or `--yes` to accept defaults; use the database subcommands to inspect and manage the local database and migrations.

Examples:

```
netlify database init --yes
```

```
netlify database status --branch <branch>
```

```
netlify database migrations apply
```

- why_it_matters: Provision or manage a Netlify Database for a repository's application using the Netlify CLI.
- sources: <https://github.com/netlify/cli/releases/tag/v26.0.0>, <https://github.com/netlify/cli/pull/8212>, <https://docs.netlify.com/build/data-and-storage/netlify-database/cli/>
- gotchas: "Version: v26.0.0"; "--yes: For `database init`, skip prompts and accept defaults."; "--branch <branch>: For `database status`, query a named Netlify branch; defaults to the local development database."; "--show-credentials: For `database status`, include the full connection string, including username and password."; "--json: For `database status`, output the result as JSON."; "--to <name>: For `database migrations apply`, apply migrations up to a migration name or prefix; if omitted, apply all pending migrations."; "--branch <branch>: For `database migrations pull`, pull migrations for the named branch; defaults to `production`. With `--branch` and no value, use the local Git branch."; "--force: For `database migrations pull`, skip the confirmation prompt before overwriting local migration files."; "--description <description>: For `database migrations new`, set the migration purpose used to generate the file name; omitted value prompts interactively."; "--scheme <scheme>: For `database migrations new`, choose the migration prefix scheme: `sequential` or `timestamp`. The docs do not say these are mutually exclusive with other options."; "filter: For monorepos, specify the application in which to run the root command."; "debug: Print debugging information for the root command."; "auth: Netlify auth token; can run the root command without logging in."; "Prerequisite: Node.js 20.12.2 or later and Netlify CLI 26.0.0 or later."; "Prerequisite: Install the Netlify CLI; the docs show `npm install -g netlify-cli`."; "`database init` is interactive setup that installs the package, scaffolds a starter migration, and verifies the database."; "`database reset` resets the local development database, removing all data and tables."; "The `branch` flag selects a Netlify branch and defaults to the local development database."; "`auth` can be used to run the command without logging in."; "Docs conflict: The release note describes bare `netlify database` as provisioning a production-ready database. The current CLI reference describes `netlify database init` as project setup and says the listed commands interact with the local database; it does not document bare `netlify database` as provisioning a database."

### netlify db status command supports NETLIFY_DB_BRANCH (2026-04-21)
- slug: netlify-db-status-command-supports-netlify-db-branch-b1a54f2687a0
- score: 0.91

How to use it:

When checking a repository’s selected database branch, run `netlify database status`; set `NETLIFY_DB_BRANCH` to select a branch when needed. The documentation confirms the status command, but does not document that environment variable.

Examples:

```
netlify database status
```

- why_it_matters: Check database status for a repository's selected database branch.
- sources: <https://github.com/netlify/cli/releases/tag/v25.1.0>, <https://docs.netlify.com/build/data-and-storage/netlify-database/local-development/>
- gotchas: "Version: 25.1.0"; "NETLIFY_DB_BRANCH: Not found in the official documentation checked; the release note says it selects the branch for `db status`."

### netlify db connect reads NETLIFY_DB_URL (2026-04-09)
- slug: netlify-db-connect-reads-netlify-db-url-b154fb37a257
- score: 0.92

How to use it:

When `NETLIFY_DB_URL` is present, run `netlify db connect` to connect using that connection string. The v24.11.0 source checks this variable before its stored local connection string.

- why_it_matters: Connect an agent runner to the database for its corresponding deploy preview.
- sources: <https://github.com/netlify/cli/releases/tag/v24.11.0>, <https://github.com/netlify/cli/pull/8142>, <https://github.com/netlify/cli/blob/v24.11.0/src/commands/database/db-connection.ts>
- gotchas: "Version: 24.11.0"; "NETLIFY_DB_URL: When set, supplies the connection string used by the connect command."; "The environment variable must be present."; "Docs conflict: Current Netlify CLI docs use `netlify database connect` and specify Node.js 20.12.2+ and Netlify CLI 26.0.0+; these docs describe a later version than v24.11.0: https://docs.netlify.com/build/data-and-storage/netlify-database/cli/"

### netlify db migrations pull (2026-04-09)
- slug: netlify-db-migrations-pull-7ec0dcc3f629
- score: 0.90

How to use it:

When local migrations need to match production or a remote branch, run `netlify db migrations pull`; it replaces the local migrations directory after confirmation unless `--force` is used.

Examples:

```
netlify db migrations pull
```

```
netlify db migrations pull --branch <branch>
```

```
netlify db migrations pull --branch --force --json
```

- why_it_matters: Replace local database migrations with migrations from production or a specified branch.
- sources: <https://github.com/netlify/cli/releases/tag/v24.11.0>, <https://github.com/netlify/cli/pull/8139>, <https://github.com/netlify/cli/blob/v24.11.0/src/commands/database/database.ts>, <https://github.com/netlify/cli/blob/v24.11.0/src/commands/database/migration-pull.ts>
- gotchas: "Version: 24.11.0"; "--branch [branch] (-b): Pull from the named branch; defaults to production. With no value, uses the local Git branch."; "--force: Skip the confirmation prompt before overwriting local migration files."; "--json: Output the result as JSON."; "Prerequisite: The project must be linked with `netlify link`."; "Prerequisite: Log in with `netlify login`."; "The command overwrites the local migrations directory."; "The default production pull prompts for confirmation."

### netlify adds project search and improves non-interactive linking (2026-03-31)
- slug: netlify-adds-project-search-and-improves-non-interactive-linking-7ed78fefecea
- score: 0.98

How to use it:

To find a project by full or partial name, run `netlify sites:search <search-term>`; add `--json` for programmatic output. In non-interactive linking, specify the project with `--id` or `--name` on `netlify link`.

Examples:

```
netlify sites:search <search-term>
```

```
netlify sites:search "<partial name>" --json
```

```
netlify link --name <project-name>
```

- why_it_matters: Find a Netlify project by full or partial name while working in a repository or script.
- before: The release note says running `netlify link` without options in CI/CD could hang while prompting interactively.
- sources: <https://github.com/netlify/cli/releases/tag/v24.9.0>, <https://github.com/netlify/cli/pull/8127>, <https://github.com/netlify/cli/blob/v24.9.0/docs/commands/sites.md>, <https://github.com/netlify/cli/blob/v24.9.0/docs/commands/link.md>
- gotchas: "Version: 24.9.0"; "search-term (required): Full or partial project name to search for."; "--json: Output project data as JSON."; "--filter <application-name>: For monorepos, specify the application to run the command in."; "--debug: Print debugging information."; "--auth <token>: Netlify auth token; can run the command without logging in."; "--id <project-id>: ID of project to link."; "--name <project-name>: Name of project to link."; "`sites:search` searches by full or partial project name."; "`filter` selects the application to run the command in for monorepos."; "`auth` accepts a Netlify auth token to run the command without logging in."

### Netlify CLI deploy sets branch as alias (2026-03-27)
- slug: netlify-cli-deploy-sets-branch-as-alias-256b08d06fe6
- score: 0.91

How to use it:

When deploying a repository branch with Netlify CLI v24.8.0, pass the branch name with `--alias`; the CLI uses that alias as the deploy branch value. Note the docs warn against alias values that match deployed branch names.

Examples:

```
netlify deploy --alias=<branch>
```

```
netlify deploy --alias custom-alias --context deploy-preview
```

- why_it_matters: Deploy a repository branch by using it as the deploy alias.
- sources: <https://github.com/netlify/cli/releases/tag/v24.8.0>, <https://github.com/netlify/cli/blob/v24.8.0/docs/commands/deploy.md>, <https://github.com/netlify/cli/commit/c08644e38c41d568b980883c337f4735945e1cd6>
- gotchas: "Version: 24.8.0"; "--alias <string> (required): Alias for the deployment, used at the beginning of the deploy subdomain; the v24.8.0 change also uses the alias as the branch value for the deploy request and build."; "--context <string>: Deploy context for environment variables read during the build; documented values include `production`, `deploy-preview`, `branch-deploy`, `dev`, or `branch:<branch>`."; "Docs conflict: The v24.8.0 source confirms `--alias` is used as the deploy branch value, but the v24.8.0 CLI reference says avoid an alias matching a deployed branch and that `--alias` does not create a branch deploy."

### netlify create builds a project through an agent runner (2026-03-24)
- slug: netlify-create-builds-a-project-through-an-agent-runner-886f2a927e01
- score: 0.92

How to use it:

To create a Netlify project from a natural-language site description, run `netlify create` with the prompt; add `--agent <claude|codex|gemini>` to choose the runner, or `--git github` to create a GitHub repository and push the source.

Examples:

```
netlify create "<site description>" --agent <claude|codex|gemini>
```

```
netlify create "<site description>" --git github
```

- why_it_matters: Create a new Netlify project from a natural-language site description.
- sources: <https://github.com/netlify/cli/releases/tag/v24.5.0>, <https://github.com/netlify/cli/pull/8066>, <https://github.com/netlify/cli/blob/b100657432707e8a080c671154c8319c5f1e2c4a/docs/commands/create.md>
- gotchas: "Version: 24.5.0"; "prompt (required): Site description; accepted as a positional argument or with `--prompt`."; "--agent <type>: Agent type: `claude`, `codex`, or `gemini`."; "--git <provider>: Create a Git repository and push source code; example provider: `github`."; "--repo-owner <owner>: GitHub org or user to create the repository under."; "--account-slug <slug>: Account slug to create the project under."; "--name <name>: Project name (subdomain)."; "--no-download: Skip downloading source after the agent run completes."; "--no-wait: Return after starting the agent run, without polling for completion."; "--json: Output result as JSON."; "The command creates a new Netlify site, starts an AI agent runner that defaults to Claude, polls for completion, downloads generated source locally, and links the project."; "`--no-download` skips downloading source code locally."; "`--no-wait` returns immediately after starting the agent run."; "`--git github` optionally creates a private GitHub repository and pushes the source via Netlify's API."

### netlify deploy accepts --site-name and --team (2026-03-24)
- slug: netlify-deploy-accepts-site-name-and-team-2143b452f26e
- score: 0.98

How to use it:

When deploying an unlinked project as a new site under a team, run `netlify deploy --site-name <site-name> --team <team-slug>`. `--site-name` creates the site if it does not already exist; `--team` selects the team when creating it.

Examples:

```
netlify deploy --site-name <site-name> --team <team-slug>
```

- why_it_matters: Deploy an unlinked project as a new site under a specified team.
- before: The CLI prompted the user to select an existing site or create one on the first `netlify deploy`; the release note says unlinked-folder deploys could hang on interactive prompts.
- sources: <https://github.com/netlify/cli/releases/tag/v24.5.0>, <https://github.com/netlify/cli/pull/8083>, <https://github.com/netlify/cli/blob/v24.5.0/docs/commands/deploy.md>, <https://docs.netlify.com/api-and-cli-guides/cli-guides/get-started-with-cli/>
- gotchas: "Version: 24.5.0"; "--site-name <string> (required): Name for a new site; implies `--create-site` if the site does not already exist."; "--team <string> (required): Team slug to use when creating a site; works only with `--create-site` or `--site-name`."; "Prerequisite: Install Netlify CLI; its docs require Node.js 18.14.0 or later."; "Prerequisite: Netlify CLI authenticates with an access token; the docs describe obtaining one through the CLI or Netlify UI."; "`--team` only works with `--create-site` or `--site-name`."

### netlify teams:list discovers accessible teams (2026-03-24)
- slug: netlify-teams-list-discovers-accessible-teams-56bdff9e4a1a
- score: 0.92

How to use it:

When you need team slugs available to the authenticated user for project setup or deployment, run `netlify teams:list`. Add `--json` to output team data as JSON.

Examples:

```
netlify teams:list
```

```
netlify teams:list --json
```

- why_it_matters: Find the team slugs available for a Netlify project setup or deployment.
- before: The source says there was no programmatic way to discover teams.
- sources: <https://github.com/netlify/cli/releases/tag/v24.5.0>, <https://github.com/netlify/cli/pull/8083>, <https://github.com/netlify/cli/blob/v24.5.0/docs/commands/teams.md>
- gotchas: "Version: 24.5.0"; "--json: Output team data as JSON."; "--auth <token>: Netlify auth token; can run the command without logging in."; "--filter <application>: For monorepos, specify the application to run the command in."; "--debug: Print debugging information."; "The command lists teams the authenticated user has access to."; "The `auth` flag accepts a Netlify auth token and can be used to run the command without logging in."

### netlify switch selects a known account by email (2026-03-20)
- slug: netlify-switch-selects-a-known-account-by-email-25963f5d8f09
- score: 0.97

How to use it:

When the desired account is among the known accounts, run `netlify switch --email <email>` to select it.

Examples:

```
netlify switch --email <email>
```

- why_it_matters: Switch to a known Netlify account while maintaining a repository.
- before: Use the interactive selection experience to choose an account.
- sources: <https://github.com/netlify/cli/releases/tag/v24.4.0>, <https://github.com/netlify/cli/pull/8046>, <https://github.com/netlify/cli/blob/v24.4.0/docs/commands/switch.md>
- gotchas: "Version: 24.4.0"; "--email <email>: Switch to the account matching this email address."; "The email selects an account only if it is in the list of known accounts."
