Getting started with the CLI

Getting started with the CLI

Updated

The Synteq CLI () manages your servers, storage, apps, functions, billing, and support tickets from a terminal. It uses the same API as the portal, and every command can print JSON for scripts.

Install

The CLI needs Node.js 20 or newer.

npm install -g synteq
synteq --version

To upgrade:

npm install -g synteq@latest

If your version is below the minimum the portal supports, every command except , , and exits with code 4 and tells you to upgrade.

For tab completion in bash, zsh, or PowerShell, run and follow the printed steps.

Sign in

synteq login

The CLI opens the portal in your browser and prints the URL and a code. Confirm the code in the portal to finish signing in.

synteq whoami    # name, email, role, active team, and auth mode
synteq logout    # revoke the session and clear stored credentials

Credentials are stored in your OS keychain, or in a file only you can read when there's no keychain. Config lives in ( on Windows).

Sign in with an API key

An API key runs server, storage, ordering, catalog, and billing commands within its scopes. It doesn't run Apps, Functions, tickets, SSH keys, or account commands; those need a browser session. Create a key in the portal first; see Creating an API key.

echo "$SYNTEQ_API_KEY" | synteq login --with-token

verifies the key and stores it. With nothing piped, it prompts with masked input. To use a key for one shell without storing it:

export SYNTEQ_API_TOKEN=sk_...
synteq vps list

A command outside the key's scopes fails and names the missing scope. Under a key, lists only the commands the key can run.

Choose a team and project

Commands act on the active team (your portal organization) and its default project.

synteq team            # show the active team
synteq team --list     # list your teams
synteq team acme       # switch by name substring or id prefix
synteq projects        # list projects in the active team
synteq config          # active profile, team, project, and user

Most commands that create or list resources also take .

Connection profiles keep a separate login per API URL. overrides the active profile for one shell.

synteq config profile add staging https://api.staging.cloud.synteq.com
synteq config profile use staging
synteq config profile use default

Order and manage a server

asks what you want to order and walks you through plan, location, image, hostname, SSH key, and payment. To skip the first question, name the kind: , , , or .

synteq catalog            # products and plans
synteq os-images          # OS images and their short ids
synteq order vps

The same order without prompts, waiting until the server is running:

synteq order vps --plan <plan-id> --location <location-id> --image <image-id> \
  --hostname web-1.example.com --ssh-key <key-id> \
  --no-interactive --yes --wait

, , , and share one set of commands. Servers are named by short id, full id, hostname, or IP.

synteq vps list
synteq vps details web-1
synteq vps power web-1 reboot
synteq vps console web-1     # serial console; Ctrl-] to disconnect
synteq vps stats web-1

Power actions other than , reinstalls, and resizes ask for confirmation. Resizes and extra IP addresses show a prorated quote before they charge. Physical dedicated servers use . Every flag is in the CLI reference.

Add block storage

synteq storage order --name data --size 100     # prompts for location and payment
synteq storage list
synteq storage attach data --resource web-1
synteq storage detach data

A volume can attach to a server in the same location, and its data is kept when you detach it. To attach at order time, pass the server's full id from as . Volumes can grow with but can't shrink.

Deploy an app

Link the directory to an app, then deploy:

synteq link
synteq deploy

walks you through picking a team, project, and app, or creating one. Its optional steps set environment variables and connect GitHub; see Deploying and configuring an app. Subdirectories inherit the link, so later commands need no . In an unlinked directory, runs the walkthrough first.

uploads the directory, follows the build, and prints the URL when the release is live. A Dockerfile is used if there is one; otherwise Synteq detects the language and builds it.

synteq deploy --image registry.example.com/acme/my-api:v3   # roll out an existing image
synteq deploy --create my-api --location dfw                # create an app and deploy in one step
synteq status                                               # the linked app and its last build
synteq app logs -f                                          # tail live logs until Ctrl-C

Deploy a function

mkdir hello-fn && cd hello-fn
synteq function init hello-fn

creates or reuses the function, links the directory, and writes a starter handler if there isn't one. The default runtime is Node.js 22, with :

export default async function handler(event, context) {
  return { hello: "world", path: event.path };
}

starts from instead:

def handler(event, context):
    return {"hello": "world", "path": event["path"]}

If a handler already exists, infers the runtime and overwrites nothing. Then deploy and call it:

synteq function deploy
synteq function invoke --path /
synteq function logs --lines

calls without Synteq credentials, so you see what any caller sees. The upload limits and handler contract are in Writing and deploying a function.

Billing, SSH keys, and support

synteq credits                                   # account credit balance and history
synteq credits add 50 --payment-method <id>      # buy credit
synteq payments                                  # saved payment methods
synteq ssh-key add --name laptop --file ~/.ssh/id_ed25519.pub
synteq ticket create --subject "Disk is slow" --message "..." --department <key>
synteq ticket list

adds a member to the active team. See Roles and permissions for what each role can do.

The interactive app

Bare on a terminal opens an interactive app with your dashboard, resources, ordering, and billing. opens it explicitly. It needs a browser session.

Use in scripts

Output is a table on a terminal and JSON when piped or redirected. Force either with or .

synteq vps list -o json | jq -r '.[].hostname'

When stdout isn't a terminal, the CLI never prompts, opens a browser, or opens the interactive app. Pass values as flags, to wizards, and to commands that confirm. Use to block until an order, power action, or reinstall finishes. Exit codes and the JSON error format are in the CLI reference.

For an AI agent working in your repository, prints a short automation guide you can append to or .

When a command doesn't exist yet for an API endpoint, calls it directly with your credentials:

synteq api GET /resources

What next?

Was this helpful?