fargone / docs / cli-reference

The Fargone CLI manages everything from your terminal. Install it with:

npm install -g @fargone/cli

All commands support --json for machine-readable output and --host <url> to target a specific instance.

Authentication

fargone login              # sign in via browser (device flow)
fargone logout             # clear stored credentials
fargone whoami             # show current account
fargone status             # account, quota, and platform health

Credentials are stored in ~/.config/fargone/config.json (mode 0600). For headless/CI environments, set FARGONE_TOKEN instead.

Apps

fargone apps                                        # list apps
fargone apps create <name>                          # create an app
fargone apps create <name> --github <url>           # create with GitHub source
fargone apps create <name> --github <url> --branch develop
fargone apps create <name> --github <url> --auto-deploy
fargone apps create <name> --description "text"
fargone apps info <slug>                            # details, env, databases, deploys
fargone apps deploy <slug>                          # trigger redeploy
fargone apps deploy <slug> --watch                  # deploy + stream build logs
fargone apps stop <slug>                            # stop container
fargone apps restart <slug>                         # restart container
fargone apps delete <slug>                          # delete app and all data

Deploy from local

fargone deploy <slug> <directory>          # zip a folder and deploy
fargone deploy <slug> <file.zip>           # deploy a zip directly
fargone deploy <slug> <directory> --watch  # deploy + stream build logs

Logs

fargone logs <slug>                        # runtime logs (last 200 lines)
fargone logs <slug> --follow               # stream new lines
fargone logs <slug> --build                # build logs
fargone logs <slug> --follow --build       # stream build logs

Databases

fargone db <slug> list                     # list attached databases
fargone db <slug> add postgres             # add PostgreSQL
fargone db <slug> add redis                # add Redis
fargone db <slug> add mariadb              # add MariaDB
fargone db <slug> add mongo                # add MongoDB
fargone db <slug> add postgres --version 15 # specific version

Environment Variables

fargone env <slug>                         # list env vars
fargone env set <slug> KEY=VALUE           # set one or more
fargone env set <slug> K1=v1 K2=v2         # set multiple
fargone env unset <slug> KEY               # remove

Changes take effect on the next deploy.

CDN

fargone cdn                                # list files + storage used
fargone cdn upload <file>                  # upload a file
fargone cdn rm <id>                        # delete a file
fargone cdn env <slug>                     # print CDN env vars for local dev
fargone cdn rotate <slug>                  # rotate CDN token

Tunnels

fargone fwd <port>                         # open a tunnel
fargone fwd 3000,8080                      # multiple ports
fargone fwd --status                       # show active tunnel
fargone fwd --stop                         # close active tunnel

Quota

fargone quota                              # show current limits and usage
fargone quota request <type> <value> "reason"  # request a quota increase

Quota types: apps, cpu, mem, storage, cdn, builds, rate, file.

Utilities

fargone open                               # open dashboard in browser
fargone open <slug>                        # open app URL in browser
fargone doctor                             # diagnose config + connectivity

Global flags

Flag Description
--host <url> Override the platform URL (env: FARGONE_HOST)
--json Machine-readable JSON output
-h, --help Show help
-v, --version Print version