# 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/download-and-install/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

[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)

[Dev Tools Developer Tools Explore developer tools designed to simplify CIAM development. developer tools](https://fusionauth.io/docs/dev-tools.md)

[Dev Tools JWT Decoder Learn how JWT refresh tokens work and how to use them to authenticate and authorize your APIs. developer tools](https://fusionauth.io/docs/dev-tools/jwt-decoder.md)
---

## Other pages in Operate

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

- [Deploy](https://fusionauth.io/docs/operate/deploy.md): Learn how to manage FusionAuth configuration changes over time.
- [Monitor](https://fusionauth.io/docs/operate/monitor.md): Understand how your FusionAuth instance operates through logs, alerts, and measurements.
- [Roadmap](https://fusionauth.io/docs/operate/roadmap.md): Learn more about the FusionAuth roadmap and planning process.
- [Secure](https://fusionauth.io/docs/operate/secure.md): Learn how to secure your installation by limiting network traffic.
- [Troubleshooting](https://fusionauth.io/docs/operate/troubleshooting.md): Learn how to troubleshoot issues that might arise while install or running FusionAuth.
