CosmicAC Logo

Job Management

Create, manage, and monitor CosmicAC jobs. Every workload on CosmicAC runs as a job. Use these commands to manage your jobs throughout their lifecycle.

Command

npx cosmicac jobs <subcommand> [options]

Subcommands

SubcommandDescription
initCreate a config file for a new job with interactive prompts.
createCreate a new job using a config file.
listView all your jobs.
startStart a previously stopped job.
stopStop a running job.
updateUpdate the name of an existing job.
deleteDelete a job and its allocated resources.
logsView logs of a specific job.
checkpointsList checkpoints for a job.
shellConnect to a GPU container terminal.
downloadDownload a trained model to a local destination.

jobs init

Creates a configuration file for a new job with interactive prompts. By default, it generates job.config.json in your current directory.

Usage

npx cosmicac jobs init [--dir <targetDir>]

Options

OptionDescription
--dirTarget directory for the config file.

Example

# Create config in current directory
$ npx cosmicac jobs init
? Enter the name of the project: Training a new model
? Enter the tags (comma-separated): model-training,gpu-container-in
? Select the type: GPU_CONTAINER
? Select the GPU type: RTX A400
? Enter the GPU count: 1
? Enter your country code (2-letter, e.g., us, in, gb): IN
? Enter the container image name: ubuntu:24.04
? Enter maximum cost limit (USD): 9999
? Select the alerts you want to enable: Cost Exceeded, Errors
Job config file created at: /Users/user/Desktop/tether/cosmic-ac/cosmicac-cli/job.config.json

# Create config in a specific directory
$ npx cosmicac jobs init --dir ./my-project
? Enter the name of the project: Training a new model
? Enter the tags (comma-separated): model-training,gpu-container-in
? Select the type: GPU_CONTAINER
? Select the GPU type: RTX A400
? Enter the GPU count: 1
? Enter your country code (2-letter, e.g., us, in, gb): IN
? Enter the container image name: ubuntu:24.04
? Enter maximum cost limit (USD): 9999
? Select the alerts you want to enable: Cost Exceeded, Errors
Job config file created at: /Users/user/Desktop/tether/cosmic-ac/cosmicac-cli/my-project/job.config.json

jobs create

Creates a new job using a configuration file. By default, searches for job.config.json in your current directory.

Usage

npx cosmicac jobs create [--config <configFilePath>]

Options

OptionDescription
--configPath to configuration file.

Example

# Create job using default config location
$ npx cosmicac jobs create
Job Created Successfully.

# Create job using specific config file
$ npx cosmicac jobs create --config ./configs/training-job.json
Job Created Successfully.

jobs list

Displays all your jobs in a formatted table.

Usage

npx cosmicac jobs list

Example

$ npx cosmicac jobs list
┌─────────────────────────────────────────────┬────────────────────┬─────────────────────────┬────────────────────┐
 id name tags status
├─────────────────────────────────────────────┼────────────────────┼─────────────────────────┼────────────────────┤
 44c58f35-c4e1-4a73-b3ef-86ecce459a0b test-gpu-containe… test, gpu, cli running
└─────────────────────────────────────────────┴────────────────────┴─────────────────────────┴────────────────────┘

jobs start

Starts a previously stopped job.

Usage

npx cosmicac jobs start <jobId>

Arguments

ArgumentRequiredDescription
jobIdYesID of the job to start.

jobs stop

Stops a running job.

Usage

npx cosmicac jobs stop <jobId>

Arguments

ArgumentRequiredDescription
jobIdYesID of the job to stop.

jobs update

Updates the name of an existing job.

Usage

npx cosmicac jobs update <jobId> <newJobName>

Arguments

ArgumentRequiredDescription
jobIdYesID of the job to update.
newJobNameYesNew name for the job.

Example

$ npx cosmicac jobs update 44c58f35-c4e1-4a73-b3ef-86ecce459a0b Model-Trainer
Job name updated successfully

jobs delete

Deletes a job and its allocated resources.

Usage

npx cosmicac jobs delete <jobId>

Arguments

ArgumentRequiredDescription
jobIdYesID of the job to delete.

Example

$ npx cosmicac jobs delete 44c58f35-c4e1-4a73-b3ef-86ecce459a0b
Job deleted successfully. Please check again later.

jobs logs

View logs for a specific job. Connects to the job's log stream using the Hyperswarm protocol.

Usage

npx cosmicac jobs logs <jobId> [options]

Arguments

ArgumentRequiredDescription
jobIdYesID of the job to view logs for.

Options

OptionDescription
--start, -sStart byte/line number
--end, -eEnd byte/line number
--live, -lStream logs in real-time (default: true)

Example

# View all logs in real-time
$ npx cosmicac jobs logs 44c58f35-c4e1-4a73-b3ef-86ecce459a0b

# View logs from line 100 to 200 (non-streaming)
$ npx cosmicac jobs logs 44c58f35-c4e1-4a73-b3ef-86ecce459a0b --start 100 --end 200

# View logs from line 100 to the end in real-time
$ npx cosmicac jobs logs 44c58f35-c4e1-4a73-b3ef-86ecce459a0b --start 100

Press Ctrl+C to stop watching logs.


jobs checkpoints

List checkpoints for a job.

Arguments

ArgumentRequiredDescription
jobIdYesID of the job to list checkpoints for.

Options

OptionDescription
--latestReturn only the latest checkpoint.

Example

# List all checkpoints
$ npx cosmicac jobs checkpoints 44c58f35-c4e1-4a73-b3ef-86ecce459a0b

# Get only the latest checkpoint
$ npx cosmicac jobs checkpoints --latest 44c58f35-c4e1-4a73-b3ef-86ecce459a0b

jobs shell

Connects to the CLI terminal of a GPU container using Hyperswarm. Provides real-time input and output over the stream connection.

Usage

npx cosmicac jobs shell <jobId> <containerId>

Arguments

ArgumentRequiredDescription
jobIdYesID of the job running the container you want to access.
containerIdYesID of the container to connect to.

Example

$ npx cosmicac jobs shell 44c58f35-c4e1-4a73-b3ef-86ecce459a0b 0
root@67420e77-d6fd-417f-b34f-f9cabde4fd2c:~# nvidia-smi
Fri Feb  6 18:20:30 2026
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.274.02             Driver Version: 535.274.02   CUDA Version: 12.4     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA RTX A400                Off | 00000000:0E:00.0 Off |                  N/A |
| 30%   38C    P8              N/A /  50W |      1MiB /  4094MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |
+---------------------------------------------------------------------------------------+
root@67420e77-d6fd-417f-b34f-f9cabde4fd2c:~#

Type exit and press Enter to close the shell session.


jobs download

Downloads a trained model to a local destination.

Usage

npx cosmicac jobs download --dest <destinationPath> <jobId>

Arguments

ArgumentRequiredDescription
jobIdYesID of the job containing the model to download.

Options

OptionDescription
--destLocal destination path for the model.

Example

npx cosmicac jobs download --dest ./models/my-model 44c58f35-c4e1-4a73-b3ef-86ecce459a0b

On this page