# FusionAuth CLI

Learn about the FusionAuth CLI tool.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

The FusionAuth command line interface (CLI) allows you to manipulate FusionAuth from the command line. The focus of the CLI is on allowing easy management of commonly modified customization code and markup, such as emails, themes or lambdas. It is not a full featured replacement for any of the [client libraries](https://fusionauth.io/docs/sdks.md), which wrap all of the API.

## Prerequisites

The CLI tool requires node. It's tested with version 22 but should work with modern versions of node.

## Installation

You can install this tool using `npm`.

```shell-session
$ npm i -g @fusionauth/cli
```

## Functionality

This tool allows you to easily retrieve and publish FusionAuth configuration from the command line. This includes:

*   emails
*   lambdas
*   messages
*   themes

The CLI is designed to work with complex version controlled configuration and includes support for localized content.

It also can be used to:

*   generate fake user data suitable for the [User Import API](https://fusionauth.io/docs/apis/users/import.md)
*   check an instance to see that [suggested common configuration](https://fusionauth.io/docs/get-started/first-time-setup.md) has been performed
*   run example instances of FusionAuth

## Usage

Currently, the CLI supports the following commands:

*   Common config check
    *   `fusionauth check:common-config` - Checks to make sure common configuration settings are set.
*   Emails
    *   `fusionauth email:download` - Download a specific template or all email templates from a FusionAuth server.
    *   `fusionauth email:duplicate` - Duplicate an email template locally.
    *   `fusionauth email:html-to-text` - Convert HTML email templates to text, where the text template is missing.
    *   `fusionauth email:upload` - Upload a specific template or all email templates to a FusionAuth server.
    *   `fusionauth email:watch` - Watch the email template directory and upload changes to a FusionAuth server.
    *   `fusionauth email:create` - Create a new email template locally.
*   Fake user generation
    *   `fusionauth import:generate` - Generate JSON for importing fake users for testing.
*   Kickstart FusionAuth example instances (beta)
    *   `fusionauth kickstart:install [dir]` - Generate the appropriate files to generate an example FusionAuth instance via Docker
    *   `fusionauth kickstart:start` - runs a FusionAuth Docker image, when executed in the same directory as the Docker configuration
    *   `fusionauth kickstart:stop` - stops a FusionAuth Docker image, when executed in the same directory as the Docker configuration
    *   `fusionauth kickstart:kill` - shuts down and wipes the FusionAuth instance when executed in the same directory as the Docker configuration
*   Lambdas
    *   `fusionauth lambda:update` - Update a lambda on a FusionAuth server.
    *   `fusionauth lambda:delete` - Delete a lambda from a FusionAuth server.
    *   `fusionauth lambda:retrieve` - Download a lambda from a FusionAuth server.
*   Messages
    *   `fusionauth message:download` - Download a specific message template or all message templates from a FusionAuth server.
    *   `fusionauth message:upload` - Upload a specific message template or all message templates to a FusionAuth server.
*   Themes
    *   `fusionauth theme:download` - Download a theme from a FusionAuth server.
    *   `fusionauth theme:upload` - Upload a theme to a FusionAuth server.
    *   `fusionauth theme:watch` - Watch a theme directory and upload changes to a FusionAuth server.

## Usage Data Collection

By default, the FusionAuth CLI collects data about your usage. We use this to judge effectiveness of the CLI, check performance and reliability, and help drive new features and improvements.

If you'd prefer not to send usage data, run the following command:

```shell-session
$ npx fusionauth telemetry:disable
```

If you change your mind and decide to share usage data with us, run this command:

```shell-session
$ npx fusionauth telemetry:enable
```

## Examples

Download a theme:

```shell-session
$ fusionauth theme:download -k <APIKEY> <themeid>
```

Upload a theme:

```shell-session
$ fusionauth theme:upload -k <APIKEY> <themeid>
```

To learn more about the commands, use the `--help` switch.

```shell-session
$ fusionauth --help
```

## Update

To update to the most recent version, use `npm update`.

```shell-session
$ npm update -g @fusionauth/cli
```

## Source Code

The FusionAuth CLI is open source and we welcome pull requests.

You can [view the source code](https://github.com/FusionAuth/fusionauth-node-cli) and [the npm package](https://www.npmjs.com/package/@fusionauth/cli).

Related

[Deploy Manage FusionAuth Configuration Across Environments Learn how to keep FusionAuth configuration in code and promote changes from one environment to another. configuration management](https://fusionauth.io/docs/deploy.md)

[Deploy Manage FusionAuth With Terraform Learn how to create and change FusionAuth configuration with the FusionAuth Terraform provider. configuration management](https://fusionauth.io/docs/deploy/production/terraform.md)

[Dev Tools Base64 Encoder/Decoder Convert text to Base64 or decode Base64-encoded data for secure encoding and transmission. developer tools](https://fusionauth.io/docs/dev-tools/base64-encoder-decoder.md)

[Dev Tools Epoch/Unix Time Converter Convert Unix and epoch times using our online epoch Time Converter tool. developer tools](https://fusionauth.io/docs/dev-tools/date-time.md)
---

## Other pages in Production

> For the full index of this section, see [Deploy](https://fusionauth.io/docs/llms-deploy.txt).

- [Configure a FusionAuth sCluster](https://fusionauth.io/docs/deploy/production/cluster.md): Learn how to set up a multi-node FusionAuth cluster.
- [Configuration Reference](https://fusionauth.io/docs/deploy/production/configuration.md): Learn about the configuration options for FusionAuth.
- [Air-gapping](https://fusionauth.io/docs/deploy/production/install/air-gapping.md): Run FusionAuth with no network access (air-gapped).
- [Install a Database](https://fusionauth.io/docs/deploy/production/install/database.md): Learn how to install the database that FusionAuth will use to store user data.
- [Customize Docker Images](https://fusionauth.io/docs/deploy/production/install/docker-configuration.md): Learn how to configure a Docker image containing FusionAuth to meet the needs of your application.
- [Install FusionAuth App](https://fusionauth.io/docs/deploy/production/install/fusionauth-app.md): Learn how to install FusionAuth App on a production server with Docker or from a package.
- [Packages](https://fusionauth.io/docs/deploy/production/install/packages.md): Learn how to determine which installation packages you need.
- [Install a Search Engine](https://fusionauth.io/docs/deploy/production/install/search.md): Learn how to install a search engine for your FusionAuth instance.
- [Silent Mode](https://fusionauth.io/docs/deploy/production/install/silent-mode.md): This is a guide to using silent mode during FusionAuth install and updates.
- [Microsoft Azure Kubernetes Service (AKS)](https://fusionauth.io/docs/deploy/production/kubernetes/aks.md): Learn how to provision an AKS cluster in Microsoft Azure.
- [Elastic Kubernetes Service (EKS)](https://fusionauth.io/docs/deploy/production/kubernetes/eks.md): Learn how to provision an EKS cluster in AWS.
- [Deploy with k8s](https://fusionauth.io/docs/deploy/production/kubernetes/fusionauth-deployment.md): Learn how to deploy FusionAuth in a Kubernetes Cluster.
- [Google Kubernetes Engine (GKE)](https://fusionauth.io/docs/deploy/production/kubernetes/gke.md): Learn how to provision a GKE cluster in Google Cloud (GCP).
- [Kubernetes](https://fusionauth.io/docs/deploy/production/kubernetes.md): Learn how to deploy and test FusionAuth using Kubernetes.
- [Local Cluster with minikube](https://fusionauth.io/docs/deploy/production/kubernetes/minikube.md): Learn how to provision minikube for local development and testing of FusionAuth kubernetes deployments.
- [AWS](https://fusionauth.io/docs/deploy/production/marketplaces/aws.md): Learn how to use FusionAuth with the AWS Marketplace.
- [DigitalOcean](https://fusionauth.io/docs/deploy/production/marketplaces/digitalocean.md): Learn how to use FusionAuth with the DigitalOcean Marketplace.
- [Google Cloud](https://fusionauth.io/docs/deploy/production/marketplaces/google-cloud.md): Learn how to use FusionAuth with the GCP Marketplace.
- [Install from a Marketplace](https://fusionauth.io/docs/deploy/production/marketplaces.md): Learn how to install FusionAuth using cloud marketplaces or templates.
- [Render](https://fusionauth.io/docs/deploy/production/marketplaces/render.md): Set FusionAuth up on Render from a Blueprint.
- [Proxy FusionAuth](https://fusionauth.io/docs/deploy/production/proxy-setup.md): Learn more about HTTP proxies and FusionAuth.
- [Server Layout](https://fusionauth.io/docs/deploy/production/server-layout.md): Learn about the different server layouts that FusionAuth can be installed with to optimize performance and security.
- [Start and Stop a Production Instance](https://fusionauth.io/docs/deploy/production/start-and-stop.md): Learn how to start and stop the FusionAuth services on a production server, in Docker, and in Kubernetes.
- [System Requirements](https://fusionauth.io/docs/deploy/production/system-requirements.md): Learn the minimum system requirements required to install and run FusionAuth.
- [Manage FusionAuth With Terraform](https://fusionauth.io/docs/deploy/production/terraform.md): Learn how to create and change FusionAuth configuration with the FusionAuth Terraform provider.
