MCPcopy Index your code
hub / github.com/netlify/cli

github.com/netlify/cli @v26.1.0 sqlite

repository ↗ · DeepWiki ↗ · release v26.1.0 ↗
1,166 symbols 4,726 edges 505 files 34 documented · 3%
README

Netlify CLI

Coverage Status npm version downloads netlify-status security

Interact with Netlify from the comfort of your CLI.

See the CLI command line reference to get started and the docs on using Netlify Dev to run your site locally.

Table of Contents

Click to expand

Installation

Netlify CLI requires Node.js version 20.12.2 or above. To install, run the following command from any directory in your terminal:

npm install netlify-cli -g

When using the CLI in a CI environment we recommend installing it locally as a development dependency, instead of globally. To install locally, run the following command from the root directory of your project:

npm install --save-dev netlify-cli

Important: Running npm install netlify-cli -g in CI means you're always installing the latest version of the CLI, including breaking changes. When you install locally and use a lock file you guarantee reproducible builds. To manage CLI updates we recommend using an automated tool like renovate or dependabot.

Alternatively you may also use Homebrew: brew install netlify-cli (thanks @cglong).

Usage

Installing the CLI globally provides access to the netlify command.

netlify [command]

# Run `help` for detailed information about CLI commands
netlify [command] help

Documentation

To learn how to log in to Netlify and start deploying projects, visit the documentation on Netlify.

Commands

For a full command reference visit cli.netlify.com.

Contributing

See CONTRIBUTING.md for more info on how to make contributions to this project.

Development

You'll need to follow these steps to run Netlify CLI locally:

uninstall any globally installed versions of netlify-cli
clone and install deps for https://github.com/netlify/cli
npm link from inside the cli folder

Now you're both ready to start testing and to contribute to the project!

License

MIT. See LICENSE for more details.

Extension points exported contracts — how you extend this code

EdgeFunctionsRegistry (Interface)
(no doc) [2 implementers]
src/lib/edge-functions/registry.ts
Options (Interface)
(no doc)
types/lambda-local/index.d.ts
Options (Interface)
(no doc)
types/netlify-redirector/index.d.ts
LoggerOptions (Interface)
(no doc)
types/express-logging/index.d.ts
Tomlify (Interface)
(no doc)
types/tomlify-j04/index.d.ts
LiveSession (Interface)
(no doc)
src/utils/live-tunnel.ts
AddressInUseError (Interface)
(no doc)
src/commands/types.d.ts
ContextConfig (Interface)
(no doc)
src/recipes/ai-context/context.ts

Core symbols most depended-on inside this repo

log
called by 702
src/utils/command-helpers.ts
build
called by 417
tests/integration/utils/site-builder.ts
withSiteBuilder
called by 384
tests/integration/utils/site-builder.ts
withContentFile
called by 192
tests/integration/utils/site-builder.ts
withNetlifyToml
called by 178
tests/integration/utils/site-builder.ts
withDevServer
called by 174
tests/integration/utils/dev-server.ts
logAndThrowError
called by 171
src/utils/command-helpers.ts
callCli
called by 166
tests/integration/utils/call-cli.ts

Shape

Function 902
Interface 128
Method 116
Class 20

Languages

TypeScript100%

Modules by API surface

src/lib/edge-functions/registry.ts30 symbols
src/commands/deploy/deploy.ts27 symbols
tests/integration/utils/site-builder.ts26 symbols
src/commands/base-command.ts26 symbols
src/utils/proxy.ts25 symbols
src/utils/command-helpers.ts22 symbols
src/lib/functions/netlify-function.ts21 symbols
src/commands/functions/functions-create.ts21 symbols
src/commands/database/db-status.ts21 symbols
src/lib/functions/registry.ts17 symbols
src/utils/detect-server-settings.ts16 symbols
src/commands/logs/log-api.ts16 symbols

Dependencies from manifests, versioned

@astrojs/starlight0.37.7 · 1×
@babel/preset-react7.27.1 · 1×
@bugsnag/js8.6.0 · 1×
@eslint/compat1.4.1 · 1×
@eslint/js9.36.0 · 1×
@fastify/static9.1.1 · 1×
@netlify/ai0.4.1 · 1×
@netlify/api14.0.19 · 1×
@netlify/blobs10.7.7 · 1×
@netlify/build35.13.9 · 1×
@netlify/build-info10.5.1 · 1×
@netlify/config24.6.0 · 1×

Datastores touched

dbDatabase · 1 repos
netlifyDatabase · 1 repos
postgresDatabase · 1 repos
stubDatabase · 1 repos

For agents

$ claude mcp add cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact