# FeatherCli

> FeatherCli is the command line client for FeatherPanel. Install it, configure an API key, manage servers, files, backups and schedules, and migrate from Pterodactyl.

Source: https://featherpanel.com/docs/cli/feathercli/

FeatherCli (`feathercli`) talks to a FeatherPanel over its API with your API key. Use it to control servers from a
terminal or a script, and to [migrate from Pterodactyl](https://featherpanel.com/docs/migrating/pterodactyl). It is a .NET program shipped as a
single binary. It is separate from the [panel CLI](https://featherpanel.com/docs/cli/panel), which runs maintenance commands inside the panel.

Every command and option is listed in the [FeatherCli command reference](https://featherpanel.com/docs/cli/feathercli-commands), which is
generated from the CLI source.

## Install

The installer's `[3] CLI` entry downloads `feathercli-linux-x64`, `feathercli-linux-arm64` or `feathercli-linux-arm` from
the latest GitHub release to `/usr/local/bin/feathercli`. By hand:

```bash
sudo curl -fL -o /usr/local/bin/feathercli \
  https://github.com/MythicalLTD/FeatherPanel-CLI/releases/latest/download/feathercli-linux-x64
sudo chmod +x /usr/local/bin/feathercli
```

## Configure

```bash
feathercli config setup     # asks for the panel URL and API key
feathercli config show
feathercli config set api_url https://panel.example.com
feathercli config set api_key <key>
feathercli config test
```

Create the API key in your account settings on the panel. The configuration is a `.env` file per user:

| OS | Path |
|----|------|
| Linux | `~/.config/feathercli/.env` |
| macOS | `~/Library/Application Support/FeatherCli/.env` |
| Windows | `%LOCALAPPDATA%\FeatherCli\.env` |

## Servers

```bash
feathercli server list
feathercli server info --uuid <uuid>
feathercli server start|stop|restart|kill --uuid <uuid>
feathercli server command --uuid <uuid> --command "say hello"
feathercli server logs --uuid <uuid>
feathercli server install-logs --uuid <uuid>
feathercli server reinstall --uuid <uuid>
feathercli server connect --uuid <uuid>     # live console over the Wings websocket
```

| Group | Subcommands |
|-------|-------------|
| `server backups` | `list`, `create`, `delete`, `restore`, `download`, `lock`, `unlock` |
| `server files` | `list`, `read`, `write`, `delete`, `mkdir` |
| `server databases` | `list`, `hosts`, `create`, `delete` |
| `server schedules` | `list`, `create`, `delete`, `run`, `toggle` |

Run any command with `--help` for its options.

## Account

| Command | Purpose |
|---------|---------|
| `account me` | Show the current session |
| `account ssh-keys list\|add\|delete` | Manage SSH keys for SFTP |
| `account notifications list\|dismiss` | Read and dismiss notifications |

## OAuth2 helpers

`feathercli oauth2` has `docs`, `playground`, `consent`, `validate` and `exchange` subcommands for building and testing
[OAuth2](https://featherpanel.com/docs/api/oauth2) integrations against your panel.

## Migration

`feathercli migrate` and `feathercli migrate check` are covered in [Migrating from Pterodactyl](https://featherpanel.com/docs/migrating/pterodactyl).
