Wow! The Netlify CLI (Command-line Interface) sure has come a long way since it was demoed at Jamstack Conf NYC way back in 2019.
Thanks to continuous iterations on the CLI, which includes both Netlify Dev and Netlify Live, today’s version 8.1 is stable, robust, and ready for teams to integrate into daily development workflows.
Here are a few of the tricks the Netlify CLI can do to make your local development better, easier, and more productive:
- Automatically detect your framework and suggest settings
- Pull in environment variables from the Netlify UI, eliminating the need to copy / paste
- Run serverless functions so you can debug locally
- Preview and test headers, redirects, and edge logic
- Start a Netlify Live tunnel, allowing you to live stream your dev server to a URL for instant collaboration in real-time
Netlify Live makes it easy to debug in real-time
While Netlify’s collaborative Deploy Previews are our go-to for asynchronous feedback, sometimes you need to drop everything and pair on an issue together. That’s when Netlify Live really shines.
For example, just last week, our team was working quickly to debug some funky edge case issues with authentication for the Your Year on Netlify project. Zach Leatherman, who was working on the fix, spun up a local version of the app with Netlify Live. Within minutes, he was able to see the logs, identify the issue, and make a few changes. Meanwhile, I was able to test out the fix before it was ever deployed—without pulling down a copy of his latest version from a repo. Netlify CLI to the rescue and problem solved!
Learn more about the CLI
This December, the Developer Experience team at Netlify has been keeping busy with one blog post every day, spotlighting all the Netlify features you don’t want to miss. Check out these great posts for step-by-step walkthroughs of common CLI use cases:
- Publish your site assets with the Netlify CLI
- Supercharge your local development with Netlify Dev
- Using “netlify open” to jump directly to your project’s admin page
- More tips for environment variables and Netlify CLI
- How to test serverless functions locally
You can also find the full list of Netlify CLI commands at cli.netlify.com or visit the Docs for a getting started guide.
Download the Netlify CLI today
Run npm install netlify-cli -g
in your terminal and start developing!