Cloudflare Docs
Workers
Visit Workers on GitHub
Set theme to dark (⇧+D)

Install/Update Wrangler

Wrangler is a command-line tool for building with Cloudflare developer products.

​​ Install Wrangler

To install Wrangler, ensure you have Node.js and npm installed, preferably using a Node version manager like Volta or nvm. Using a version manager helps avoid permission issues and allows you to easily change Node.js versions. Wrangler requires a Node.js version of 16.13.0 or later.

​​ Install Wrangler locally

To install Wrangler locally within your Worker project, run:

$ npm install wrangler

or install with yarn:

$ yarn add wrangler

​​ Install Wrangler globally

After you have installed npm and Node.js, run:

$ npm install -g wrangler

or install with Yarn:

$ yarn global add wrangler

​​ Update Wrangler

To check your Wrangler version, run:

$ wrangler version

​​ Update Wrangler locally

To update Wrangler only in your current directory containing a package.json, run:

$ npm install wrangler

​​ Update Wrangler globally

To update Wrangler globally, you must be outside of a project folder (and there is no parent directory containing a package.json) and run:

$ npm update -g wrangler

If you are using Volta to control your version of Node and need to update Wrangler globally, run:

$ volta install wrangler
  • Commands - A detailed list of the commands that Wrangler supports.
  • Configuration - Learn more about Wrangler’s configuration file.