Netlify

Netlify Cheatsheet #

Netlify is a cloud platform that automates deployment, scaling, and management of modern web projects, including static sites and serverless functions.

General Commands #

Command/OptionExampleDescription
netlify loginnetlify loginLog in to your Netlify account
netlify whoaminetlify whoamiShow information about the currently logged-in user
netlify regionsnetlify regionsList available regions for deployments

Site Management #

Command/OptionExampleDescription
netlify sites:listnetlify sites:listList all Netlify sites
netlify sites:createnetlify sites:create --name <site_name>Create a new site
netlify sites:deletenetlify sites:delete <site_id>Delete a site
netlify sites:infonetlify sites:info <site_id>Show information about a specific site

Deployment #

Command/OptionExampleDescription
netlify deploynetlify deploy --prodDeploy the current directory to production
netlify deploy --draftnetlify deploy --draftDeploy the current directory as a draft
netlify deploy:historynetlify deploy:historyView deployment history
netlify deploy:rollbacknetlify deploy:rollback <deploy_id>Roll back to a previous deployment

Environment Variables #

Command/OptionExampleDescription
netlify env:listnetlify env:listList environment variables for the current site
netlify env:setnetlify env:set <variable_name>=<value>Set an environment variable for the current site
netlify env:unsetnetlify env:unset <variable_name>Unset an environment variable for the current site

Functions Management #

Command/OptionExampleDescription
netlify functions:listnetlify functions:listList all serverless functions
netlify functions:createnetlify functions:create <function_name>Create a new serverless function
netlify functions:deletenetlify functions:delete <function_id>Delete a serverless function
netlify functions:invokenetlify functions:invoke <function_name>Invoke a serverless function

Redirects and Rewrites #

Command/OptionExampleDescription
netlify redirects:listnetlify redirects:listList all redirects for the current site
netlify redirects:addnetlify redirects:add /old-path /new-pathAdd a new redirect
netlify redirects:deletenetlify redirects:delete /old-pathDelete a redirect

Domain Management #

Command/OptionExampleDescription
netlify domains:listnetlify domains:listList all domains for the current site
netlify domains:addnetlify domains:add <domain_name>Add a new domain
netlify domains:deletenetlify domains:delete <domain_name>Delete a domain

This cheatsheet covers the most commonly used Netlify commands and options, helping you manage sites, deployments, functions, redirects, and domains efficiently.

Netlify

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.