CLI

Global options go before the command:

OptionDefaultMeaning
--home DIR$GPULAYER_HOME or ~/.gpulayerlocal state directory
--url URL$GPULAYER_URLserver to talk to; unset means the embedded control plane
--token TOKEN$GPULAYER_TOKENclient token
--fingerprint FP$GPULAYER_FINGERPRINTpinned server certificate
--ca-file FILECA bundle for a server with a CA-signed certificate
-v LEVELWARNINGlog level

Servers and workers

CommandDescription
gpulayer up [--host --port --advertise-address --no-worker --name --label K=V --python --tls --tls-cert --tls-key --insecure-http]start a server and use this machine as a worker; prints join and connect commands
gpulayer join URL --token T [--fingerprint FP --name --label K=V --python --advertise-address --workdir --concurrency N --max-tasks N --idle-exit S]add this machine as a worker of a server; --concurrency sets how many tasks run at once (default one per GPU), --max-tasks exits after N tasks
gpulayer dashboard [--port 8471 --no-open]open the web dashboard for local jobs
gpulayer mcp [--read-only]MCP server on stdio for AI and coding agents (guide)
gpulayer metricsprint Prometheus metrics (embedded, or a server with --url)
gpulayer gc --older-than AGE [--delete-jobs --dry-run]remove logs and events of jobs that finished before AGE (e.g. 7d), optionally the jobs, plus unreferenced artifacts; admin only
gpulayer token create NAME [--role admin|submitter|join|metrics --ttl 12h]create a named token on the server machine (printed once)
gpulayer token listlist tokens with role and status, never their values
gpulayer token revoke NAMErevoke a token; a running server applies it on the next request
gpulayer server init [--rotate]create client and join tokens for server start (printed once)
gpulayer server start [--host --port --tls-cert --tls-key --allow-insecure-remote --public-url]serve the API only
gpulayer worker start [--name --label --join-token --python --advertise-address --workdir --concurrency --max-tasks --idle-exit]run a worker: embedded without --url, remote with it
gpulayer worker status [--json]registered workers
gpulayer worker revoke WORKER_IDrevoke a worker's credentials
gpulayer resources detect [--json --python]what this machine offers
gpulayer resources list [--json]same as worker status

Jobs

text
gpulayer submit [options] [-- COMMAND ...]
OptionMeaning
-f FILEsubmit a JobSpec JSON file
--name NAMEjob name
--target local|remote|cloud, --fallback TARGETplacement target and explicit fallbacks
--source DIRpackage and upload a directory; the command runs inside it
--input FILE[:DEST]stage a file into $GPULAYER_INPUT_DIR
--function MODULE:FUNC --arg JSON ...function job
--distributed --entrypoint SCRIPT --nodes N --procs-per-node P --backend gloo|nccltorchrun job
--accelerator cpu|cuda|mps|rocm --gpus N --gpu-memory GB --gpu-memory-kind dedicated|unified --cpus N --memory GBresources
--framework 'torch>=2.1'framework requirement
--profile pytorch-cudaruntime profile: fills in accelerator and frameworks (see JobSpec)
--worker ID, --label K=Vpin to workers
--provider NAME --max-hourly-cost Xallow provisioning through a provider adapter
--env K=V, --secret NAME=WORKER_ENV_KEYenvironment and secret references
--timeout SECONDS, --max-attempts Nlimits and retries
--detachprint the job id and return
--queue-if-unschedulablewait for a compatible worker instead of failing
CommandDescription
gpulayer job list [--limit N --json]recent jobs
gpulayer job status ID [--json]state, placement explanation, tasks
gpulayer job logs ID [-f --system --verbose]output
gpulayer job events ID [--json]lifecycle events
gpulayer job result ID [--download DIR]result JSON; optionally download outputs
gpulayer job cancel IDcancel

gpulayer submit without --detach exits with the job's exit code.