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
| Subcommand | Description |
|---|---|
| init | Create a config file for a new job with interactive prompts. |
| create | Create a new job using a config file. |
| list | View all your jobs. |
| start | Start a previously stopped job. |
| stop | Stop a running job. |
| update | Update the name of an existing job. |
| delete | Delete a job and its allocated resources. |
| logs | View logs of a specific job. |
| checkpoints | List checkpoints for a job. |
| shell | Connect to a GPU container terminal. |
| download | Download 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
| Option | Description |
|---|---|
--dir | Target 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.jsonjobs 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
| Option | Description |
|---|---|
--config | Path 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 listExample
$ 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
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job to start. |
jobs stop
Stops a running job.
Usage
npx cosmicac jobs stop <jobId>Arguments
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job to stop. |
jobs update
Updates the name of an existing job.
Usage
npx cosmicac jobs update <jobId> <newJobName>Arguments
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job to update. |
newJobName | Yes | New name for the job. |
Example
$ npx cosmicac jobs update 44c58f35-c4e1-4a73-b3ef-86ecce459a0b Model-Trainer
Job name updated successfullyjobs delete
Deletes a job and its allocated resources.
Usage
npx cosmicac jobs delete <jobId>Arguments
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID 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
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job to view logs for. |
Options
| Option | Description |
|---|---|
--start, -s | Start byte/line number |
--end, -e | End byte/line number |
--live, -l | Stream 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 100Press Ctrl+C to stop watching logs.
jobs checkpoints
List checkpoints for a job.
Arguments
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job to list checkpoints for. |
Options
| Option | Description |
|---|---|
--latest | Return 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-86ecce459a0bjobs 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
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job running the container you want to access. |
containerId | Yes | ID 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
| Argument | Required | Description |
|---|---|---|
jobId | Yes | ID of the job containing the model to download. |
Options
| Option | Description |
|---|---|
--dest | Local destination path for the model. |
Example
npx cosmicac jobs download --dest ./models/my-model 44c58f35-c4e1-4a73-b3ef-86ecce459a0b