> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myfundedperpetuals.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Command-Line Interface

> Install the fperp CLI, authenticate, trade from your terminal, and keep the tool up to date.

## What is fperp?

`fperp` is the official command-line client for the MyFundedPerps REST
API. Every API operation is available as a command with matching flags, so
anything you can do with `curl` against the API you can do with less typing:

```bash theme={null}
fperp list-accounts
fperp get-market-quote "binance|BTCUSDT" --side buy --size 0.5
fperp create-order --data @order.json
```

Run `fperp help` for the full command list and `fperp help <command>` for a
command's flags.

## Install

### macOS and Linux

```bash theme={null}
curl -fsSL https://cli.myfundedperpetuals.com/install | sh
```

The installer detects your platform, downloads the latest release, verifies
its checksum, and installs to `/usr/local/bin` when that directory is
writable, otherwise to `~/.local/bin`. It never asks for elevated privileges:
if the target directory is not writable it stops and tells you instead of
running `sudo` for you.

Optional environment variables, set before running the installer:

| Variable            | Effect                                           |
| ------------------- | ------------------------------------------------ |
| `FPERP_VERSION`     | Install a specific release, for example `v1.2.0` |
| `FPERP_INSTALL_DIR` | Install into a different directory               |

### Windows

In PowerShell:

```powershell theme={null}
irm https://cli.myfundedperpetuals.com/install.ps1 | iex
```

The installer places `fperp.exe` in `%LOCALAPPDATA%\Programs\fperp` and adds
that directory to your user `PATH` (new terminals pick it up automatically).
Only x64 Windows builds are published.

### Verifying a download

Every release ships a `SHA256SUMS` file and an Ed25519 signature
(`SHA256SUMS.sig`) alongside its artifacts at
`https://cli.myfundedperpetuals.com/vX.Y.Z/`. The installers verify the
checksum of what they download, and `fperp upgrade` additionally verifies the
signature against a public key embedded in the binary, so a tampered release
is never installed.

## Authenticate

Create an API key in
[API Key Settings](https://myfundedperpetuals.com/settings?section=api-keys),
then run:

```bash theme={null}
fperp login
```

The key is stored in your operating system's credential store (macOS
Keychain, Windows Credential Manager, or the Linux Secret Service). Where no
credential store is available, it falls back to a `0600` config file; see
`fperp login --help` for the `--store` options. `FPERP_API_KEY` and
`--api-key` override the stored key for one-off use.

## Stay up to date

```bash theme={null}
fperp upgrade
```

`fperp upgrade` downloads the latest release, verifies the signed checksums,
and replaces the binary in place. Use `fperp upgrade --check` to see whether a
newer version exists without installing it, and
`fperp upgrade --version vX.Y.Z` to install a specific release.

The CLI also checks for new releases in the background at most once per day
and prints a one-line notice on stderr when one exists. It never installs
anything on its own. To disable the check entirely, set
`FPERP_NO_UPDATE_CHECK=1`; the check is also skipped automatically when the
`CI` environment variable is set.

## Uninstall

Run `fperp logout` first so no API key stays behind in your OS credential
store, then remove the binary (`which fperp` shows where it is) and delete the
`~/.config/fperp` directory.
