---
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-07-10T21:28:42.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

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

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

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_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/)