KosmoKrator

data

Netlify CLI for AI Agents

Use the Netlify CLI from KosmoKrator to call Netlify tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Netlify CLI Setup

Netlify can be configured headlessly with `kosmokrator integrations:configure netlify`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure netlify --set access_token="$NETLIFY_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor netlify --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
access_token NETLIFY_ACCESS_TOKEN Secret secret yes Personal Access Token
url NETLIFY_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call netlify.netlify_create_deploy '{"site_id":"example_site_id","title":"example_title","branch":"example_branch","framework":"example_framework","body":"example_body"}' --json
Provider shortcut
kosmo integrations:netlify netlify_create_deploy '{"site_id":"example_site_id","title":"example_title","branch":"example_branch","framework":"example_framework","body":"example_body"}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs netlify --json
kosmo integrations:docs netlify.netlify_create_deploy --json
kosmo integrations:schema netlify.netlify_create_deploy --json
kosmo integrations:search "Netlify" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

netlify.netlify_create_deploy

Trigger a new deploy for a Netlify site. Optionally specify a title, branch, or framework override.

Write write
Parameters
site_id, title, branch, framework, body
Generic call
kosmo integrations:call netlify.netlify_create_deploy '{"site_id":"example_site_id","title":"example_title","branch":"example_branch","framework":"example_framework","body":"example_body"}' --json
Shortcut
kosmo integrations:netlify netlify_create_deploy '{"site_id":"example_site_id","title":"example_title","branch":"example_branch","framework":"example_framework","body":"example_body"}' --json

netlify.netlify_create_site

Create a new Netlify site. Provide a name and optional configuration like custom domain, build settings, or repository.

Write write
Parameters
name, custom_domain, repo, body
Generic call
kosmo integrations:call netlify.netlify_create_site '{"name":"example_name","custom_domain":"example_custom_domain","repo":"example_repo","body":"example_body"}' --json
Shortcut
kosmo integrations:netlify netlify_create_site '{"name":"example_name","custom_domain":"example_custom_domain","repo":"example_repo","body":"example_body"}' --json

netlify.netlify_delete_site

Delete a Netlify site permanently. This removes all deploys, forms, and associated data. This action cannot be undone.

Write write
Parameters
site_id
Generic call
kosmo integrations:call netlify.netlify_delete_site '{"site_id":"example_site_id"}' --json
Shortcut
kosmo integrations:netlify netlify_delete_site '{"site_id":"example_site_id"}' --json

netlify.netlify_get_current_user

Get details of the currently authenticated Netlify user. Returns user ID, email, name, and account info.

Read read
Parameters
none
Generic call
kosmo integrations:call netlify.netlify_get_current_user '{}' --json
Shortcut
kosmo integrations:netlify netlify_get_current_user '{}' --json

netlify.netlify_get_deploy

Get detailed information about a specific Netlify deploy, including its state, build log, and commit details.

Read read
Parameters
deploy_id
Generic call
kosmo integrations:call netlify.netlify_get_deploy '{"deploy_id":"example_deploy_id"}' --json
Shortcut
kosmo integrations:netlify netlify_get_deploy '{"deploy_id":"example_deploy_id"}' --json

netlify.netlify_get_site

Get detailed information about a specific Netlify site, including its ID, name, URL, build settings, and deploy status.

Read read
Parameters
site_id
Generic call
kosmo integrations:call netlify.netlify_get_site '{"site_id":"example_site_id"}' --json
Shortcut
kosmo integrations:netlify netlify_get_site '{"site_id":"example_site_id"}' --json

netlify.netlify_list_deploys

List deploys for a Netlify site. Returns deploy IDs, states, branches, and commit references.

Read read
Parameters
site_id, page, per_page
Generic call
kosmo integrations:call netlify.netlify_list_deploys '{"site_id":"example_site_id","page":1,"per_page":1}' --json
Shortcut
kosmo integrations:netlify netlify_list_deploys '{"site_id":"example_site_id","page":1,"per_page":1}' --json

netlify.netlify_list_dns_zones

List all DNS zones configured in Netlify. Returns zone IDs, domain names, and nameservers.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call netlify.netlify_list_dns_zones '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:netlify netlify_list_dns_zones '{"page":1,"per_page":1}' --json

netlify.netlify_list_forms

List all forms for a Netlify site. Returns form IDs, names, paths, and submission counts.

Read read
Parameters
site_id
Generic call
kosmo integrations:call netlify.netlify_list_forms '{"site_id":"example_site_id"}' --json
Shortcut
kosmo integrations:netlify netlify_list_forms '{"site_id":"example_site_id"}' --json

netlify.netlify_list_sites

List all Netlify sites. Returns site IDs, names, URLs, and build status. Use this to discover site identifiers needed for deploy and form operations.

Read read
Parameters
name, page, per_page
Generic call
kosmo integrations:call netlify.netlify_list_sites '{"name":"example_name","page":1,"per_page":1}' --json
Shortcut
kosmo integrations:netlify netlify_list_sites '{"name":"example_name","page":1,"per_page":1}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

netlify.netlify_create_deploy 5 parameters
Schema command
kosmo integrations:schema netlify.netlify_create_deploy --json
ParameterTypeRequiredDescription
site_id string yes The Netlify site ID.
title string no Title for the deploy.
branch string no Branch to deploy (e.g., "main", "staging"). Defaults to the site's production branch.
framework string no Framework override (e.g., "nextjs", "nuxt", "hugo", "gatsby").
body object no Additional deploy configuration fields.
netlify.netlify_create_site 4 parameters
Schema command
kosmo integrations:schema netlify.netlify_create_site --json
ParameterTypeRequiredDescription
name string yes Name for the site. Used as the default subdomain (e.g., "my-site" becomes my-site.netlify.app).
custom_domain string no Custom domain to assign to the site (e.g., "www.example.com").
repo object no Repository configuration for continuous deployment. Includes provider, repo path, branch, build command, and publish directory.
body object no Additional site configuration fields (e.g., password, processing_settings).
netlify.netlify_delete_site 1 parameters
Schema command
kosmo integrations:schema netlify.netlify_delete_site --json
ParameterTypeRequiredDescription
site_id string yes The Netlify site ID to delete.
netlify.netlify_get_current_user 0 parameters
Schema command
kosmo integrations:schema netlify.netlify_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
netlify.netlify_get_deploy 1 parameters
Schema command
kosmo integrations:schema netlify.netlify_get_deploy --json
ParameterTypeRequiredDescription
deploy_id string yes The deploy identifier.
netlify.netlify_get_site 1 parameters
Schema command
kosmo integrations:schema netlify.netlify_get_site --json
ParameterTypeRequiredDescription
site_id string yes The site identifier or site name (e.g., "abc123" or "mysite.netlify.app").
netlify.netlify_list_deploys 3 parameters
Schema command
kosmo integrations:schema netlify.netlify_list_deploys --json
ParameterTypeRequiredDescription
site_id string yes The site identifier.
page integer no Page number for pagination (default: 1).
per_page integer no Number of deploys per page (default: 30).
netlify.netlify_list_dns_zones 2 parameters
Schema command
kosmo integrations:schema netlify.netlify_list_dns_zones --json
ParameterTypeRequiredDescription
page integer no Page number for pagination.
per_page integer no Number of DNS zones per page.
netlify.netlify_list_forms 1 parameters
Schema command
kosmo integrations:schema netlify.netlify_list_forms --json
ParameterTypeRequiredDescription
site_id string yes The site identifier.
netlify.netlify_list_sites 3 parameters
Schema command
kosmo integrations:schema netlify.netlify_list_sites --json
ParameterTypeRequiredDescription
name string no Filter by site name.
page integer no Page number for pagination (default: 1).
per_page integer no Number of sites per page (default: 30).

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.