---
title: "Publishing your site assets with the Netlify CLI"
description: "Learn how the Netlify command line interface (CLI) can publish your web site assets to the Netlify hosting infrastructure for you with a single command."
source: "https://www.netlify.com/blog/2021/12/01/publish-your-site-assets-with-the-netlify-cli/"
last_updated: "2026-08-05T04:39:12.000Z"
---
> Throughout December we’ll be [highlighting a different Netlify feature each day](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=devex-ph&utm_source=netlify&utm_medium=blog&utm_content=adventure-cli-deploy). It might just be the thing you need to unlock those creative juices, and [dust off that domain](https://www.netlify.com/blog/2021/12/01/dusty-domains-your-forgotten-domains-raise-money-for-charity/?utm_campaign=devex-ph&utm_source=netlify&utm_medium=blog&utm_content=adventure-cli-deploy) you registered but never deployed! Keep an eye [on the blog](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=devex-ph&utm_source=netlify&utm_medium=blog&utm_content=adventure-cli-deploy) and on [Twitter](https://twitter.com/netlify) for each feature!

Did you know that you can publish your sites to the web without leaving the comfort of your command line?

The open source [Netlify CLI](https://github.com/netlify/cli) includes lots of helpful features (expect to see learn more about that in upcoming post this month!) and deploying production or preview versions of your site can be done with the handy command: `netlify deploy`

> 💡 Install the Netlify CLI for all sorts of web development helpers and utilities with this command: `npm install -g netlify-cli`

The first time you run `netlify deploy` from a local project folder, it will give you the option of deploying to an existing site or creating a new site in a project team, and then deploy your specified folder to Netlify.

For added safety, the default target for a `netlify deploy` is a unique preview URL which the CLI helpful returns to you as a link to inspect and share. Ready to deploy to production? Then you’ll want to use the `prod` flag:

`netlify deploy —-prod`

More powerful deployment pipelines await you via [Netlify’s build infrastructure](https://www.netlify.com/products/build/?utm_campaign=devex-ph&utm_source=twitter&utm_medium=social&utm_content=adventure-cli-deploy), but this command is very useful for sending your assets to Netlify where we’ll publish them to the [global hosting infrastructure](https://www.netlify.com/products/edge/?utm_campaign=devex-ph&utm_source=twitter&utm_medium=social&utm_content=adventure-cli-deploy) for you.

Happy deploying!

## More information

-   [Getting started with the Netlify CLI](https://docs.netlify.com/cli/get-started/?utm_campaign=devex-ph&utm_source=twitter&utm_medium=social&utm_content=adventure-cli-deploy)
-   [Netlify CLI 2.0 rebuilt from the ground up](https://www.netlify.com/blog/2018/09/10/netlify-cli-2.0-now-in-beta/?utm_campaign=devex-ph&utm_source=twitter&utm_medium=social&utm_content=adventure-cli-deploy)

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Publish your site assets with the Netlify CLI&url=https://www.netlify.com/blog/2021/12/01/publish-your-site-assets-with-the-netlify-cli//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2021%2F12%2F01%2Fpublish-your-site-assets-with-the-netlify-cli%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2021/12/01/publish-your-site-assets-with-the-netlify-cli//)
-   [Bluesky](https://bsky.app/intent/compose?text=Publish your site assets with the Netlify CLI+https://www.netlify.com/blog/2021/12/01/publish-your-site-assets-with-the-netlify-cli//)

* * *

### Tags

-   [Tips](/blog/tags/tips/)
-   [Features](/blog/tags/features/)
-   [CLI](/blog/tags/cli/)

## Keep reading

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials November 17, 2021

[

### Pair programming with the Netlify CLI

](/blog/2021/11/17/pair-programming-with-the-netlify-cli/)

-   ![Profile picture of Charlie Gerard](/_astro/62135565aa5522e47233c7bfac5d3c145ed33056-80x80_ZHxG3a.webp)
    
    Charlie Gerard
    

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials July 12, 2021

[

### Managing environment variables from your terminal with Netlify CLI

](/blog/2021/07/12/managing-environment-variables-from-your-terminal-with-netlify-cli/)

-   ![Profile picture of Phil Hawksworth](/_astro/9cfe2bbe94bcb555ce3ac7683ac7905ad3fd32b1-400x400_Z18H6R1.webp)
    
    Phil Hawksworth
    

## Recent posts

Opinions & Insights July 28, 2026

[

### Open Weights and the 2nd World

](/blog/open-weights-and-the-2nd-world)

-   ![Profile picture of Mathias Biilmann](/_astro/f193d4707a6391d843d5aaa73338b5a5971ec5cc-960x960_1Yylqm.webp)
    
    Mathias Biilmann
    

Tools & Services July 28, 2026

[

### MCP goes stateless and extensible

](/blog/mcp-goes-stateless-and-extensible)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

News & Announcements July 28, 2026

[

### New Netlify projects are now private by default

](/blog/new-netlify-projects-are-now-private-by-default)

-   ![Profile picture of Taylor Barnett-Torabi](/_astro/cf4624da8c1286738397b6fecb53bad504df140b-400x400_ZsvK0s.webp)
    
    Taylor Barnett-Torabi
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)