Files
nexus-sync/docs/cli.md
T
2026-06-25 02:21:13 +03:00

1.3 KiB

nexus-cli

nexus-cli is a small non-interactive CLI for the nexus-sync server API.

Install for development

pip install -e .
nexus-cli --help

The default server URL is http://127.0.0.1:5852. Override it with --server-url or -s.

List clients

nexus-cli --list

Show client info

nexus-cli client linux-client

The output includes basic client metadata and advertised available_commands.

Queue a command for a client

nexus-cli client linux-client --run-command hostname
nexus-cli client linux-client --run-command hostname --timeout-seconds 30

Payload shape:

{
  "name": "hostname",
  "args": {},
  "timeout_seconds": 30
}

Show command execution info

nexus-cli command cmd_123

If the client has reported a result, stdout and stderr are printed.

JSON output

Use --json for machine-readable output:

nexus-cli --json --list
nexus-cli --json client linux-client
nexus-cli --json command cmd_123

Build standalone binary

make cli

This creates dist/nexus-cli through PyInstaller.

Build wheel package

Use doit from the development dependencies:

pip install -e .[dev]
doit wheel

The wheel is written to dist/nexus_sync-0.1.0-py3-none-any.whl and installs the nexus-cli console script.