CLI Commands

Overview

The Fenwave Agent CLI provides a comprehensive set of commands for managing your local development environment. All commands are prefixed with fenwave.

fenwave --help       # View all available commands
fenwave --version    # Show agent version

Authentication Commands

fenwave login

Authenticate with the Fenwave platform via browser-based OAuth.

fenwave login
fenwave login --backend-url http://backstage.example.com
fenwave login --backend-url http://backstage.example.com --frontend-url http://frontend.example.com --save
Flag Description
--backend-url <url> Override backend URL for this session
--frontend-url <url> Override frontend URL for this session
--save Save the provided URLs to the agent config

fenwave logout

Clear the stored session and log out.

fenwave logout

If the agent is running, this triggers a graceful shutdown.

Setup Commands

fenwave init

Run the interactive setup wizard. Handles device registration, prerequisites verification, and DevApp image pull.

fenwave init
fenwave init --token <token> --backend-url http://backstage.example.com
fenwave init --skip-prerequisites
Flag Description
--token <token> Registration token from the IDP
--backend-url <url> Backend URL for registration
--frontend-url <url> Frontend URL for authentication
--skip-prerequisites Skip Docker/Node.js version checks

fenwave register

Register your device with Backstage (standalone, without the full setup wizard).

fenwave register --token <token>
fenwave register --token <token> --backend-url http://backstage.example.com

fenwave rotate-credentials

Rotate device credentials. Generates new credentials and invalidates the old ones.

fenwave rotate-credentials
fenwave rotate-credentials --backend-url http://backstage.example.com

fenwave uninstall

Remove agent configuration and data from your machine.

fenwave uninstall

Status Commands

fenwave status

Display the current state of session, device, and agent.

fenwave status

Output includes:

  • Session โ€” Active/expired, user, expiry time
  • Device โ€” Registered/unregistered
  • Agent โ€” Running/stopped, port, uptime

fenwave info

Display agent and system information.

fenwave info

Service Commands

See Service Management for detailed usage.

fenwave service run

Start the agent in foreground mode.

fenwave service run
fenwave service run --port 3005

fenwave service start

Start the agent as a background daemon.

fenwave service start
fenwave service start --port 3005

fenwave service stop

Stop the running daemon.

fenwave service stop

fenwave service restart

Stop and restart the daemon.

fenwave service restart
fenwave service restart --port 3005

fenwave service status

Show daemon status.

fenwave service status

fenwave service logs

View daemon logs.

fenwave service logs
fenwave service logs -f             # Follow in real time
fenwave service logs --tail 50      # Last 50 lines

Application Commands

fenwave apps

List applications registered in Fenwave and local Docker application groups.

fenwave apps

Output includes:

  • Name โ€” Application name
  • Description โ€” Short description
  • Versions โ€” Active version(s)
  • Status โ€” Runtime status (running / stopped)
  • Published โ€” Publication status (published / draft)
  • Containers โ€” Number of containers
  • Last Run โ€” Last run timestamp

Container Commands

fenwave containers

List Docker containers.

fenwave containers          # Running containers only (or fenwave ps)
fenwave containers -a       # Include stopped containers
fenwave containers --all    # Same as -a

fenwave start

Start one or more stopped containers.

fenwave start <container-id>
fenwave start <id1> <id2> <id3>

fenwave stop

Stop one or more running containers.

fenwave stop <container-id>
fenwave stop <id1> <id2> <id3>

fenwave restart

Restart one or more containers.

fenwave restart <container-id>

fenwave rm

Remove one or more stopped containers.

fenwave rm <container-id>
fenwave rm <id1> <id2>

fenwave logs

View container logs.

fenwave logs <container-id>
fenwave logs <container-id> -f          # Follow in real time
fenwave logs <container-id> --follow    # Same as -f
fenwave logs <container-id> -t 100      # Last 100 lines
fenwave logs <container-id> --tail 100  # Same as -t

fenwave exec

Execute a command inside a running container, or open an interactive shell session.

fenwave exec <container-id> <command>           # Run a one-off command
fenwave exec <container-id> ls -la /app         # Arguments are passed through
fenwave exec -i <container-id>                  # Interactive shell (/bin/sh)
fenwave exec -i <container-id> /bin/bash        # Interactive with specific shell
fenwave exec -w /app <container-id> cat config  # Set working directory
fenwave exec -e KEY=VAL <container-id> env      # Pass environment variables
Flag Description
-i, --interactive Open an interactive shell session
-w, --workdir Working directory inside the container
-e, --env Set environment variables (KEY=VALUE format)

When -i is used without a command, /bin/sh is opened by default. Options must appear before the container ID; everything after it is treated as the command.

Image Commands

fenwave images

List local Docker images.

fenwave images

fenwave pull

Pull one or more images from a registry.

fenwave pull <image:tag>
fenwave pull <image1:tag> <image2:tag>

fenwave rmi

Remove one or more local images.

fenwave rmi <image-id>
fenwave rmi <image-id> -f       # Force remove
fenwave rmi <image-id> --force  # Same as -f

Volume Commands

fenwave volumes

List Docker volumes.

fenwave volumes

fenwave volume-create

Create one or more volumes.

fenwave volume-create <name>
fenwave volume-create <name> -d local         # Specify driver
fenwave volume-create <name> --driver local   # Same as -d

fenwave volume-rm

Remove one or more volumes.

fenwave volume-rm <name>
fenwave volume-rm <name1> <name2>

Configuration Commands

See Configuration for detailed usage.

fenwave config show

Display the current agent configuration.

fenwave config show

fenwave config set

Update configuration values.

fenwave config set --backend-url http://backstage.example.com
fenwave config set --frontend-url http://frontend.example.com
fenwave config set --ws-port 3005
fenwave config set --container-port 3010

fenwave config reset

Reset configuration to defaults.

fenwave config reset

Environment Commands

fenwave local-env

Manage the DevApp container (local dashboard).

fenwave local-env --start       # Start the DevApp container
fenwave local-env --stop        # Stop the DevApp container
fenwave local-env --status      # Show container status
fenwave local-env --logs        # View container logs
fenwave local-env --logs-follow # Follow container logs

fenwave registries

List connected Docker registries.

fenwave registries

Debug Mode

Enable verbose logging for the service run command:

fenwave service run --debug

Or via environment variables:

DEBUG=true fenwave service start
FW_VERBOSE=true fenwave service start