[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77JVP21WCGQDCCZ6ZC0NKHJ":3,"skill-same:01M77JVP21WCGQDCCZ6ZC0NKHJ":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M77JVP21WCGQDCCZ6ZC0NKHJ","jarvislabs-gpu",null,"Agent guide for running and monitoring GPU experiments with the jl CLI on JarvisLabs.ai.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fj\u002Fjarvislabs-gpu\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: jarvislabs-gpu\ndescription: Agent guide for running and monitoring GPU experiments with the jl CLI on JarvisLabs.ai.\nversion: 1.0.2\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - jl\n    install:\n      - kind: uv\n        package: jarvislabs\n        bins:\n          - jl\n    primaryEnv: JL_API_KEY\n    envVars:\n      - name: JL_API_KEY\n        required: false\n        description: Optional JarvisLabs API key. Users can also authenticate with `jl setup`.\n    homepage: https:\u002F\u002Fdocs.jarvislabs.ai\u002Fcli\u002F\n---\n\n# JarvisLabs GPU CLI (`jl`) — Agent Guide\n\n## Install The CLI\n\n```bash\nuv tool install jarvislabs\n```\n\nAlternative:\n\n```bash\npip install jarvislabs\n```\n\n## Getting Started\n\nVerify auth with `jl status --json` before doing anything. If not logged in, use `jl setup --token \u003Ctoken> --yes`. You can also authenticate via `export JL_API_KEY=\"...\"`.\n\nUse `--help` on any command to discover flags (e.g., `jl run --help`, `jl create --help`). If something goes wrong, use `jl run logs`, `jl run status`, and `jl exec` to diagnose — don't guess.\n\n## Mental Model\n\n- Machine commands (`jl create\u002Flist\u002Fget\u002Fpause\u002Fresume\u002Fdestroy\u002Frename\u002Fssh\u002Fexec\u002Fupload\u002Fdownload`) = GPU instance lifecycle and access.\n- `jl run` = managed job on an instance. Uploads code, sets up a Python environment, runs your script in the background with log tracking.\n- `jl exec` = run any command on an instance. Use for system checks (nvidia-smi, ps, df), debugging failed runs, inspecting files, or any raw shell access. No environment setup, no tracking. This is your escape hatch when `jl run` doesn't cover your use case.\n\n## Instances\n\n### Creating\n\n```bash\njl create --gpu L4 --storage 100 --yes --json\njl create --gpu L4 --spot --yes --json\njl create --vm --cpu --yes --json\n```\n\n`--gpu` is required for GPU instances. Use `--spot` only for GPU containers, not GPU VMs or CPU VMs. CPU VMs are created with `--vm --cpu`; omit `--vcpus\u002F--ram` to use the smallest available CPU plan from the backend. Run `jl create --help` for all available flags.\n\n### Lifecycle\n\nInstances have three states that matter: **Running** (billing active), **Paused** (compute billing stopped, storage billing continues, data persists), **Destroyed** (everything deleted).\n\n```bash\njl pause \u003Cid> --yes --json      # stop compute billing, keep data\njl resume \u003Cid> --yes --json     # restart a paused instance\njl destroy \u003Cid> --yes --json    # permanently delete\n```\n\nResume caveats:\n- Resume is **region-locked** — an instance always resumes in its original region. GPU swaps are only possible within that region.\n- Resume may return a **new machine_id**. Always use the returned ID for subsequent operations.\n- Spot resume is explicit: pass `--spot` when you want a paused GPU container to resume as spot. Without `--spot`, resume is on-demand.\n- CPU VM resume uses the CPU VM backend path. Pass both `--vcpus` and `--ram` if you want to change CPU size on resume.\n- Run `jl resume --help` for all available flags (GPU swap, storage expansion, rename, etc.).\n\nSSH, exec, upload, and download only work on **Running** instances.\n\n### Regions & GPUs\n\nValid region codes for new instances: `IN1`, `IN2`, `EU1`.\n\n`IN1` is Chennai (`india-chennai-01`). `IN2` is Noida (`india-noida-01`).\n\nIf `--region` is omitted, the CLI picks a region based on GPU availability.\n\nUse `jl resources --json` as the source of truth for GPU, region, and workload availability. VM instances require at least one SSH key and a matching `workload_type=\"vm\"` row.\n\nContainer template availability is not exposed in `jl resources --json`. Current CLI policy allows IN1 container creates only with `--template pytorch`; other IN1 container templates fail before launch until backend\u002Fproduct support is confirmed.\n\nRun `jl gpus` to check GPU availability and pricing. Output shows **GPU Containers** and **GPU VMs** tables with separate availability for each. Spot prices are shown only for GPU containers.\n\nRun `jl resources` when you also need CPU VM availability and pricing. It shows GPU containers, GPU VMs, and CPU VMs, with one shared available\u002Funavailable legend at the end.\n\nHow to read `jl gpus --json` availability:\n- `num_free_devices`: GPUs free right now. Spot creates use this count, and require `spot_price` to be present.\n- `effective_num_free_devices`: GPUs available for on-demand creates on that server, including GPUs currently used by spot instances that can be preempted. If missing, fall back to `num_free_devices`.\n- These counts are per server. They are not the complete regional GPU capacity.\n- `workload_type` tells which launch type the row belongs to:\n  - `\"container\"` means use it for normal GPU container creates.\n  - `\"vm\"` means use it for GPU VM creates.\n  - `null` means the same row applies to both containers and VMs.\n\n### Ports & Services\n\nContainer instances expose default HTTP ports (each gets its own HTTPS URL):\n\n| Port | Service |\n|---|---|\n| 8889 | JupyterLab (`url` field) |\n| 7007 | IDE (`vs_url` field) |\n| 6006 | Available on generic templates like pytorch (`endpoints[0]`) |\n\nVM instances (`jl create --gpu ... --vm`) get SSH-only access. VMs require at least one SSH key registered (`jl ssh-key add`). Use `ssh_command` from `jl get \u003Cid> --json`.\n\nTo expose a service (FastAPI, Gradio, etc.), bind to `0.0.0.0:6006` — it's accessible via `endpoints[0]` on generic templates. Use `--http-ports \"7860,8080\"` at creation or resume to expose custom ports. Custom port URLs appear in `endpoints` after the default 6006 entry.\n\nRun `jl get \u003Cid> --json` to find all service URLs (`url`, `vs_url`, `endpoints`).\n\n## Managed Runs\n\n### How `jl run` works\n\n`jl run` uploads your code to an instance, sets up a Python environment, and runs your script in the background with log and exit code tracking. You need either `--on \u003Cmachine_id>` (existing instance) or `--gpu \u003Ctype>` (creates a fresh instance).\n\n`run_id` is tracked locally under `~\u002F.jl\u002Fruns\u002F`. All run management commands (`logs`, `status`, `stop`, `list`) depend on these local records. Start and monitor runs from the same machine.\n\n### Run targets\n\n| Target | What happens |\n|---|---|\n| `train.py` | Uploads to `\u003Chome>\u002Ftrain.py`, runs in `\u003Chome>\u002F` with shared venv at `$HOME\u002F.venv` |\n| `.` or `.\u002Fproject` with `--script train.py` | Rsyncs the directory to `\u003Chome>\u002F\u003Cdirname>\u002F`, runs inside it with project venv at `\u003Chome>\u002F\u003Cdirname>\u002F.venv` |\n| No target, command after `--` | No upload. Runs from `~`. If `$HOME\u002F.venv` exists (from a previous file run), its `bin\u002F` is prepended to PATH so `python` and `pip` resolve to venv versions. Otherwise uses system Python. |\n\nOnly `.py` and `.sh` file targets are supported. For other file types, use a directory target or `jl upload` + `jl exec`. Directory targets require `rsync` installed locally.\n\n**Note:** File targets with the same basename overwrite each other on the remote (e.g., `foo\u002Ftrain.py` and `bar\u002Ftrain.py` both land at `\u002Fhome\u002Ftrain.py`). Use directory targets for projects with nested structure.\n\nPass script arguments after `--`:\n```bash\njl run train.py --on \u003Cid> --json --yes -- --epochs 50 --lr 0.001\n```\n\n### Environment & setup\n\n`jl run` manages a Python venv on the remote instance. Template packages (torch, etc.) are inherited via `--system-site-packages` — no need to install them. Venvs persist under the remote home directory across pause\u002Fresume.\n\n**Venv locations:**\n- **File targets:** shared instance-level venv at `$HOME\u002F.venv`. All file runs share it — deps installed for one script are available to all.\n- **Directory targets:** per-project venv at `\u003Chome>\u002F\u003Cdirname>\u002F.venv`. Isolated per project.\n- **Command mode:** no venv is created. If `$HOME\u002F.venv` exists from a previous file run, `python` and `pip` automatically resolve to it via PATH prepend.\n\n**How dependencies get installed:**\n\n- **Directory targets** — auto-detected. If your directory has `requirements.txt` or `pyproject.toml` (with `[project]`), deps are installed automatically. No flag needed.\n- **File targets** — no auto-detection. Pass `--requirements requirements.txt` if you need extra packages.\n- **`--requirements \u003Cfile>`** — overrides auto-detection. Uploads and installs the specified file instead.\n- **`--setup \u003Ccommand>`** — runs a shell command before your script (e.g., `--setup \"pip install flash-attn\"`). Runs inside the venv for file\u002Fdir targets, raw for command mode.\n\n```bash\n# Directory — auto-detects requirements.txt\njl run . --script train.py --on \u003Cid> --json --yes\n\n# Single file — pass requirements explicitly\njl run train.py --on \u003Cid> --requirements requirements.txt --json --yes\n\n# Extra setup command\njl run . --script train.py --on \u003Cid> --setup \"pip install flash-attn\" --json --yes\n```\n\n**Command mode** — when you pass a raw command after `--` with no file or directory target. Useful when code already exists on the instance (e.g., uploaded via `jl upload`, written via `jl exec`, or left by a previous run). If `$HOME\u002F.venv` exists from a prior file run, its `bin\u002F` is prepended to PATH so `python` and `pip` resolve to venv versions. You still get `jl run` log tracking (`logs`, `status`, `stop`), which is the main advantage over `jl exec`. `--requirements` is not supported in command mode.\n\n**Important:** Command mode runs from `~` (the remote shell home). Use absolute paths or `cd` explicitly for scripts in specific directories.\n\n```bash\njl run --on \u003Cid> --json --yes -- python3 \u002Fhome\u002Ftrain.py\njl run --on \u003Cid> --json --yes -- sh -lc 'cd \u002Fhome && torchrun --nproc_per_node=2 train.py'\n```\n\n### Running on an existing instance\n\n```bash\njl run train.py --on \u003Cmachine_id> --json --yes\njl run . --script train.py --on \u003Cmachine_id> --requirements requirements.txt --json --yes\n```\n\nLifecycle flags (`--keep`, `--pause`, `--destroy`) are not allowed with `--on` — the instance is not touched after the run.\n\n### Running on a fresh instance\n\n```bash\njl run . --script train.py --gpu L4 --keep --json --yes\njl run . --script train.py --gpu L4 --spot --keep --json --yes\n```\n\nCreates a new instance, uploads code, runs the script. Additional flags: `--spot` (fresh GPU containers only), `--vm` (VM instead of container, disallows `--template` and `--http-ports`), `--template` (default: pytorch; run `jl templates --json` to list available), `--storage` (default: 100GB), `--num-gpus` (default: 1), `--region`, `--http-ports`.\n\n**Lifecycle rules for fresh instances:**\n\n- **With `--json` or `--no-follow`:** `--keep` is required. The CLI rejects `--pause` and `--destroy` because it returns immediately and cannot apply lifecycle actions later. Use `--keep` and have the agent pause or destroy the instance after the run completes.\n- **Without `--json` or `--no-follow` (human mode):** the CLI stays attached, streams logs, and applies lifecycle when the run finishes. Default lifecycle is `--pause`.\n\nUse separate `jl create` when you need to inspect GPU availability, reuse machines across runs, or attach filesystems\u002Fscripts.\n\n## Monitoring & Control\n\n### Reading logs\n\nThe primary monitoring command:\n\n```bash\njl run logs \u003Crun_id> --tail 50\n```\n\nAlways use `--tail N` — without it, the entire log file is returned and can be enormous.\n\nThe output includes a **header** and **footer** with run state (in non-follow, non-JSON mode):\n\n```\n--- run r_abc | machine 123 | running ---\n\nstep=100 loss=2.31\nstep=200 loss=2.11\n\n--- still running | log: \u002Fhome\u002Fjl-runs\u002Fr_abc\u002Foutput.log ---\n```\n\nWhen done, the footer shows the final state:\n```\n--- succeeded | exit code: 0 | log: \u002Fhome\u002Fjl-runs\u002Fr_abc\u002Foutput.log ---\n```\n\nOr on failure:\n```\n--- failed | exit code: 1 | log: \u002Fhome\u002Fjl-runs\u002Fr_abc\u002Foutput.log ---\n```\n\nIf the instance is paused, missing, or SSH is unavailable, `jl run logs` fails before printing any output. Use `jl run status \u003Crun_id> --json` to check those states.\n\n### The agent monitoring loop\n\n1. **Start detached:** `jl run ... --json --yes` — extract `run_id` and `machine_id` from JSON\n2. **Early check (catch fast failures):** `sleep 15 && jl run logs \u003Crun_id> --tail 30` — if footer says `failed`, fix and retry immediately\n3. **Steady-state polling:** `sleep 120 && jl run logs \u003Crun_id> --tail 50`\n4. Read log body for loss values, errors, or progress\n5. Check footer:\n   - `still running` → repeat step 3\n   - `succeeded | exit code: 0` → download results\n   - `failed | exit code: N` → read error, fix, start a new run\n\nCadence: 60-120s (short experiments), 180-300s (long training), 300-600s (very long runs).\n\n### Checking status\n\n```bash\njl run status \u003Crun_id> --json\n```\n\nReturns run state, machine_id, exit_code, lifecycle_policy, launch_command, and more. Without `--refresh`, `jl run list` shows state as `\"saved\"` (a sentinel, not a real run state). Use `--refresh` or `--status` to get live state.\n\n### Stopping a run\n\n```bash\njl run stop \u003Crun_id> --json\n```\n\nKills the entire process group (training script + all child processes). Escalates to SIGKILL if the process doesn't exit after TERM.\n\n### System checks via exec\n\n```bash\njl exec \u003Cid> -- nvidia-smi\njl exec \u003Cid> -- ps -ef\njl exec \u003Cid> -- df -h\n```\n\nPrefer raw output for `jl exec` and `jl run logs` — easier to read and parse. Use `--json` when you need machine-readable state: `create`, `get`, `list`, `run start`, `run status`.\n\nExit code of the remote command is propagated. For pipes or shell syntax, wrap in `sh -lc`:\n\n```bash\njl exec \u003Cid> -- sh -lc 'grep \"loss\" \u002Fpath\u002Fto\u002Flog | tail -5'\n```\n\n## File Transfer & Persistence\n\n### Upload and download\n\n```bash\njl upload \u003Cid> .\u002Flocal \u002Fremote          # upload file or directory\njl download \u003Cid> \u002Fremote .\u002Flocal         # download file\njl download \u003Cid> \u002Fremote .\u002Flocal -r      # download directory\n```\n\nDefault destinations: upload without dest → remote home directory. Download without dest → `.\u002F\u003Cbasename>` in current local directory.\n\n### What persists across pause\u002Fresume\n\nThe remote home directory (`\u002Fhome\u002F` on containers, `\u002Fhome\u002F\u003Cuser>\u002F` on VMs) persists. Everything else is ephemeral.\n\n**Persists:**\n- Files and directories under the home directory\n- `$HOME\u002F.venv` (shared venv for file runs) and `\u003Cproject>\u002F.venv` (per-project venv for directory runs)\n- Attached filesystems (mounted at `\u002Fhome\u002Fjl_fs\u002F`)\n- Run metadata under `\u003Chome>\u002Fjl-runs\u002F\u003Crun_id>\u002F`\n\n**Lost on pause:**\n- System-level installs (`apt-get`, global pip packages outside the home directory)\n- Files outside the home directory (`\u002Ftmp`, `\u002Froot`, etc.)\n\nUse `--setup` for system-level reinstalls (e.g., `apt-get`). Python packages in the venv persist across pause\u002Fresume. For recurring system setup, use startup scripts (`jl scripts add`).\n\n### Remote file paths\n\n`\u003Chome>` is `\u002Fhome\u002F` on containers, `\u002Fhome\u002F\u003Cuser>\u002F` on VMs.\n\n- Uploaded files (via `jl run`): `\u003Chome>\u002F\u003Cfilename>` (e.g., `train.py` → `\u002Fhome\u002Ftrain.py`)\n- Uploaded directories (via `jl run`): `\u003Chome>\u002F\u003Cdirectory_name>\u002F`\n- Uploaded files (via `jl upload`): `\u003Chome>\u002F\u003Cfilename>`\n- Shared venv (file runs): `\u003Chome>\u002F.venv\u002F`\n- Project venv (directory runs): `\u003Chome>\u002F\u003Cdirectory_name>\u002F.venv\u002F`\n- Run metadata: `\u003Chome>\u002Fjl-runs\u002F\u003Crun_id>\u002F`\n\n### Filesystems & supporting commands\n\nAttach a filesystem at creation with `--fs-id \u003Cid>`. Attach a startup script with `--script-id \u003Cid>` (and `--script-args`). These flags work on both `jl create` and `jl resume`.\n\n```bash\njl templates --json                    # list available templates\njl ssh-key list --json                 # list registered SSH keys\njl ssh-key add \u003Cpubkey-file> --name x  # add SSH key (required for VMs)\njl scripts list --json                 # list startup scripts\njl filesystem list --json              # list filesystems\njl filesystem create --name x --storage 100 --json  # create filesystem\n```\n\n**Filesystem caveats:**\n- **Region-bound:** A filesystem can only attach to instances in the same region.\n- **ID changes on edit:** Expanding a filesystem (`jl filesystem edit`) may return a new `fs_id`. Always use the returned ID.\n- The CLI validates that `fs_id` exists and belongs to the same region before creating\u002Fresuming.\n\n## Agent Workflow (End-to-End)\n\n```bash\n# 1. Check GPUs and create instance\njl gpus --json\njl create --gpu L4 --storage 100 --yes --json\n\n# 2. Start detached run\njl run . --script train.py --on \u003Cmachine_id> --requirements requirements.txt --json --yes\n\n# 3. Early check (catch import\u002Fsyntax\u002Fpip failures fast)\nsleep 15 && jl run logs \u003Crun_id> --tail 30\n\n# 4. Steady-state monitoring (repeat until footer shows succeeded or failed)\nsleep 120 && jl run logs \u003Crun_id> --tail 50\n\n# 5. Download results (use \u002Fhome\u002F\u003Cuser>\u002F for VMs instead of \u002Fhome\u002F)\njl download \u003Cmachine_id> \u002Fhome\u002Fresults .\u002Fresults -r\n\n# 6. Cleanup\njl pause \u003Cmachine_id> --yes --json\n```\n\nFor fresh instances without a pre-created instance:\n\n```bash\n# Creates instance inline, runs detached — agent must clean up after\njl run . --script train.py --gpu L4 --keep --json --yes\n# ... monitor with jl run logs ...\njl pause \u003Cmachine_id> --yes --json\n```\n\n## Error Handling\n\nWhen `--json` is active, CLI validation and API failures are emitted as `{\"error\": \"...\"}` to stdout.\n\nNot all non-zero exits use that shape. `jl exec --json` returns its own structured payload with `stdout`, `stderr`, and `exit_code` fields.\n\nAgent rule:\n- First inspect the JSON shape\n- If it has an `error` key, treat it as a CLI failure\n- Otherwise inspect command-specific fields (`exit_code`, `state`, `run_exit_code`)\n\n## Anti-Patterns\n\n- Do not use `jl run logs --follow` — blocks forever, will timeout. `--json` is also incompatible with `--follow`.\n- Always use `--json` when starting runs — it returns immediately. Without `--json`, the CLI streams logs and blocks.\n- Do not read full logs without `--tail N` — can return megabytes of output.\n- Do not poll every few seconds — use 60-600s intervals based on expected run duration.\n- Do not use lifecycle flags (`--keep`, `--pause`, `--destroy`) with `--on` — they are rejected. Only for fresh instances.\n- Do not use `--pause` or `--destroy` with `--json` for fresh instances — rejected. Use `--keep --json` and clean up yourself.\n- Do not use `jl exec` for long-running tasks — it blocks until the command finishes. Use `jl run` which runs in the background with log tracking.\n- Do not trust `jl run list` without `--refresh` — state shows as `\"saved\"` (stale). Use `--refresh` or `--status` for live state.\n- Do not assume `machine_id` is stable after `jl resume` — it may return a new ID. Always use the returned ID.\n- Do not forget to pause\u002Fdestroy instances after experiments — they cost money.\n\n## Command Discovery\n\nEvery command supports `--help` for full flag details:\n\n```bash\njl create --help       jl run --help       jl ssh-key --help\njl resume --help       jl run logs --help  jl filesystem --help\n```\n","# JarvisLabs GPU CLI (`jl`) — Agent Guide\n\n## Install The CLI\n\n```bash\nuv tool install jarvislabs\n```\n\nAlternative:\n\n```bash\npip install jarvislabs\n```\n\n## Getting Started\n\nVerify auth with `jl status --json` before doing anything. If not logged in, use `jl setup --token \u003Ctoken> --yes`. You can also authenticate via `export JL_API_KEY=\"...\"`.\n\nUse `--help` on any command to discover flags (e.g., `jl run --help`, `jl create --help`). If something goes wrong, use `jl run logs`, `jl run status`, and `jl exec` to diagnose — don't guess.\n\n## Mental Model\n\n- Machine commands (`jl create\u002Flist\u002Fget\u002Fpause\u002Fresume\u002Fdestroy\u002Frename\u002Fssh\u002Fexec\u002Fupload\u002Fdownload`) = GPU instance lifecycle and access.\n- `jl run` = managed job on an instance. Uploads code, sets up a Python environment, runs your script in the background with log tracking.\n- `jl exec` = run any command on an instance. Use for system checks (nvidia-smi, ps, df), debugging failed runs, inspecting files, or any raw shell access. No environment setup, no tracking. This is your escape hatch when `jl run` doesn't cover your use case.\n\n## Instances\n\n### Creating\n\n```bash\njl create --gpu L4 --storage 100 --yes --json\njl create --gpu L4 --spot --yes --json\njl create --vm --cpu --yes --json\n```\n\n`--gpu` is required for GPU instances. Use `--spot` only for GPU containers, not GPU VMs or CPU VMs. CPU VMs are created with `--vm --cpu`; omit `--vcpus\u002F--ram` to use the smallest available CPU plan from the backend. Run `jl create --help` for all available flags.\n\n### Lifecycle\n\nInstances have three states that matter: **Running** (billing active), **Paused** (compute billing stopped, storage billing continues, data persists), **Destroyed** (everything deleted).\n\n```bash\njl pause \u003Cid> --yes --json      # stop compute billing, keep data\njl resume \u003Cid> --yes --json     # restart a paused instance\njl destroy \u003Cid> --yes --json    # permanently delete\n```\n\nResume caveats:\n- Resume is **region-locked** — an instance always resumes in its original region. GPU swaps are only possible within that region.\n- Resume may return a **new machine_id**. Always use the returned ID for subsequent operations.\n- Spot resume is explicit: pass `--spot` when you want a paused GPU container to resume as spot. Without `--spot`, resume is on-demand.\n- CPU VM resume uses the CPU VM backend path. Pass both `--vcpus` and `--ram` if you want to change CPU size on resume.\n- Run `jl resume --help` for all available flags (GPU swap, storage expansion, rename, etc.).\n\nSSH, exec, upload, and download only work on **Running** instances.\n\n### Regions & GPUs\n\nValid region codes for new instances: `IN1`, `IN2`, `EU1`.\n\n`IN1` is Chennai (`india-chennai-01`). `IN2` is Noida (`india-noida-01`).\n\nIf `--region` is omitted, the CLI picks a region based on GPU availability.\n\nUse `jl resources --json` as the source of truth for GPU, region, and workload availability. VM instances require at least one SSH key and a matching `workload_type=\"vm\"` row.\n\nContainer template availability is not exposed in `jl resources --json`. Current CLI policy allows IN1 container creates only with `--template pytorch`; other IN1 container templates fail before launch until backend\u002Fproduct support is confirmed.\n\nRun `jl gpus` to check GPU availability and pricing. Output shows **GPU Containers** and **GPU VMs** tables with separate availability for each. Spot prices are shown only for GPU containers.\n\nRun `jl resources` when you also need CPU VM availability and pricing. It shows GPU containers, GPU VMs, and CPU VMs, with one shared available\u002Funavailable legend at the end.\n\nHow to read `jl gpus --json` availability:\n- `num_free_devices`: GPUs free right now. Spot creates use this count, and require `spot_price` to be present.\n- `effective_num_free_devices`: GPUs available for on-demand creates on that server, including GPUs currently used by spot instances that can be preempted. If missing, fall back to `num_free_devices`.\n- These counts are per server. They are not the complete regional GPU capacity.\n- `workload_type` tells which launch type the row belongs to:\n  - `\"container\"` means use it for normal GPU container creates.\n  - `\"vm\"` means use it for GPU VM creates.\n  - `null` means the same row applies to both containers and VMs.\n\n### Ports & Services\n\nContainer instances expose default HTTP ports (each gets its own HTTPS URL):\n\n| Port | Service |\n|---|---|\n| 8889 | JupyterLab (`url` field) |\n| 7007 | IDE (`vs_url` field) |\n| 6006 | Available on generic templates like pytorch (`endpoints[0]`) |\n\nVM instances (`jl create --gpu ... --vm`) get SSH-only access. VMs require at least one SSH key registered (`jl ssh-key add`). Use `ssh_command` from `jl get \u003Cid> --json`.\n\nTo expose a service (FastAPI, Gradio, etc.), bind to `0.0.0.0:6006` — it's accessible via `endpoints[0]` on generic templates. Use `--http-ports \"7860,8080\"` at creation or resume to expose custom ports. Custom port URLs appear in `endpoints` after the default 6006 entry.\n\nRun `jl get \u003Cid> --json` to find all service URLs (`url`, `vs_url`, `endpoints`).\n\n## Managed Runs\n\n### How `jl run` works\n\n`jl run` uploads your code to an instance, sets up a Python environment, and runs your script in the background with log and exit code tracking. You need either `--on \u003Cmachine_id>` (existing instance) or `--gpu \u003Ctype>` (creates a fresh instance).\n\n`run_id` is tracked locally under `~\u002F.jl\u002Fruns\u002F`. All run management commands (`logs`, `status`, `stop`, `list`) depend on these local records. Start and monitor runs from the same machine.\n\n### Run targets\n\n| Target | What happens |\n|---|---|\n| `train.py` | Uploads to `\u003Chome>\u002Ftrain.py`, runs in `\u003Chome>\u002F` with shared venv at `$HOME\u002F.venv` |\n| `.` or `.\u002Fproject` with `--script train.py` | Rsyncs the directory to `\u003Chome>\u002F\u003Cdirname>\u002F`, runs inside it with project venv at `\u003Chome>\u002F\u003Cdirname>\u002F.venv` |\n| No target, command after `--` | No upload. Runs from `~`. If `$HOME\u002F.venv` exists (from a previous file run), its `bin\u002F` is prepended to PATH so `python` and `pip` resolve to venv versions. Otherwise uses system Python. |\n\nOnly `.py` and `.sh` file targets are supported. For other file types, use a directory target or `jl upload` + `jl exec`. Directory targets require `rsync` installed locally.\n\n**Note:** File targets with the same basename overwrite each other on the remote (e.g., `foo\u002Ftrain.py` and `bar\u002Ftrain.py` both land at `\u002Fhome\u002Ftrain.py`). Use directory targets for projects with nested structure.\n\nPass script arguments after `--`:\n```bash\njl run train.py --on \u003Cid> --json --yes -- --epochs 50 --lr 0.001\n```\n\n### Environment & setup\n\n`jl run` manages a Python venv on the remote instance. Template packages (torch, etc.) are inherited via `--system-site-packages` — no need to install them. Venvs persist under the remote home directory across pause\u002Fresume.\n\n**Venv locations:**\n- **File targets:** shared instance-level venv at `$HOME\u002F.venv`. All file runs share it — deps installed for one script are available to all.\n- **Directory targets:** per-project venv at `\u003Chome>\u002F\u003Cdirname>\u002F.venv`. Isolated per project.\n- **Command mode:** no venv is created. If `$HOME\u002F.venv` exists from a previous file run, `python` and `pip` automatically resolve to it via PATH prepend.\n\n**How dependencies get installed:**\n\n- **Directory targets** — auto-detected. If your directory has `requirements.txt` or `pyproject.toml` (with `[project]`), deps are installed automatically. No flag needed.\n- **File targets** — no auto-detection. Pass `--requirements requirements.txt` if you need extra packages.\n- **`--requirements \u003Cfile>`** — overrides auto-detection. Uploads and installs the specified file instead.\n- **`--setup \u003Ccommand>`** — runs a shell command before your script (e.g., `--setup \"pip install flash-attn\"`). Runs inside the venv for file\u002Fdir targets, raw for command mode.\n\n```bash\n# Directory — auto-detects requirements.txt\njl run . --script train.py --on \u003Cid> --json --yes\n\n# Single file — pass requirements explicitly\njl run train.py --on \u003Cid> --requirements requirements.txt --json --yes\n\n# Extra setup command\njl run . --script train.py --on \u003Cid> --setup \"pip install flash-attn\" --json --yes\n```\n\n**Command mode** — when you pass a raw command after `--` with no file or directory target. Useful when code already exists on the instance (e.g., uploaded via `jl upload`, written via `jl exec`, or left by a previous run). If `$HOME\u002F.venv` exists from a prior file run, its `bin\u002F` is prepended to PATH so `python` and `pip` resolve to venv versions. You still get `jl run` log tracking (`logs`, `status`, `stop`), which is the main advantage over `jl exec`. `--requirements` is not supported in command mode.\n\n**Important:** Command mode runs from `~` (the remote shell home). Use absolute paths or `cd` explicitly for scripts in specific directories.\n\n```bash\njl run --on \u003Cid> --json --yes -- python3 \u002Fhome\u002Ftrain.py\njl run --on \u003Cid> --json --yes -- sh -lc 'cd \u002Fhome && torchrun --nproc_per_node=2 train.py'\n```\n\n### Running on an existing instance\n\n```bash\njl run train.py --on \u003Cmachine_id> --json --yes\njl run . --script train.py --on \u003Cmachine_id> --requirements requirements.txt --json --yes\n```\n\nLifecycle flags (`--keep`, `--pause`, `--destroy`) are not allowed with `--on` — the instance is not touched after the run.\n\n### Running on a fresh instance\n\n```bash\njl run . --script train.py --gpu L4 --keep --json --yes\njl run . --script train.py --gpu L4 --spot --keep --json --yes\n```\n\nCreates a new instance, uploads code, runs the script. Additional flags: `--spot` (fresh GPU containers only), `--vm` (VM instead of container, disallows `--template` and `--http-ports`), `--template` (default: pytorch; run `jl templates --json` to list available), `--storage` (default: 100GB), `--num-gpus` (default: 1), `--region`, `--http-ports`.\n\n**Lifecycle rules for fresh instances:**\n\n- **With `--json` or `--no-follow`:** `--keep` is required. The CLI rejects `--pause` and `--destroy` because it returns immediately and cannot apply lifecycle actions later. Use `--keep` and have the agent pause or destroy the instance after the run completes.\n- **Without `--json` or `--no-follow` (human mode):** the CLI stays attached, streams logs, and applies lifecycle when the run finishes. Default lifecycle is `--pause`.\n\nUse separate `jl create` when you need to inspect GPU availability, reuse machines across runs, or attach filesystems\u002Fscripts.\n\n## Monitoring & Control\n\n### Reading logs\n\nThe primary monitoring command:\n\n```bash\njl run logs \u003Crun_id> --tail 50\n```\n\nAlways use `--tail N` — without it, the entire log file is returned and can be enormous.\n\nThe output includes a **header** and **footer** with run state (in non-follow, non-JSON mode):\n\n```\n--- run r_abc | machine 123 | running ---\n\nstep=100 loss=2.31\nstep=200 loss=2.11\n\n--- still running | log: \u002Fhome\u002Fjl-runs\u002Fr_abc\u002Foutput.log ---\n```\n\nWhen done, the footer shows the final state:\n```\n--- succeeded | exit code: 0 | log: \u002Fhome\u002Fjl-runs\u002Fr_abc\u002Foutput.log ---\n```\n\nOr on failure:\n```\n--- failed | exit code: 1 | log: \u002Fhome\u002Fjl-runs\u002Fr_abc\u002Foutput.log ---\n```\n\nIf the instance is paused, missing, or SSH is unavailable, `jl run logs` fails before printing any output. Use `jl run status \u003Crun_id> --json` to check those states.\n\n### The agent monitoring loop\n\n1. **Start detached:** `jl run ... --json --yes` — extract `run_id` and `machine_id` from JSON\n2. **Early check (catch fast failures):** `sleep 15 && jl run logs \u003Crun_id> --tail 30` — if footer says `failed`, fix and retry immediately\n3. **Steady-state polling:** `sleep 120 && jl run logs \u003Crun_id> --tail 50`\n4. Read log body for loss values, errors, or progress\n5. Check footer:\n   - `still running` → repeat step 3\n   - `succeeded | exit code: 0` → download results\n   - `failed | exit code: N` → read error, fix, start a new run\n\nCadence: 60-120s (short experiments), 180-300s (long training), 300-600s (very long runs).\n\n### Checking status\n\n```bash\njl run status \u003Crun_id> --json\n```\n\nReturns run state, machine_id, exit_code, lifecycle_policy, launch_command, and more. Without `--refresh`, `jl run list` shows state as `\"saved\"` (a sentinel, not a real run state). Use `--refresh` or `--status` to get live state.\n\n### Stopping a run\n\n```bash\njl run stop \u003Crun_id> --json\n```\n\nKills the entire process group (training script + all child processes). Escalates to SIGKILL if the process doesn't exit after TERM.\n\n### System checks via exec\n\n```bash\njl exec \u003Cid> -- nvidia-smi\njl exec \u003Cid> -- ps -ef\njl exec \u003Cid> -- df -h\n```\n\nPrefer raw output for `jl exec` and `jl run logs` — easier to read and parse. Use `--json` when you need machine-readable state: `create`, `get`, `list`, `run start`, `run status`.\n\nExit code of the remote command is propagated. For pipes or shell syntax, wrap in `sh -lc`:\n\n```bash\njl exec \u003Cid> -- sh -lc 'grep \"loss\" \u002Fpath\u002Fto\u002Flog | tail -5'\n```\n\n## File Transfer & Persistence\n\n### Upload and download\n\n```bash\njl upload \u003Cid> .\u002Flocal \u002Fremote          # upload file or directory\njl download \u003Cid> \u002Fremote .\u002Flocal         # download file\njl download \u003Cid> \u002Fremote .\u002Flocal -r      # download directory\n```\n\nDefault destinations: upload without dest → remote home directory. Download without dest → `.\u002F\u003Cbasename>` in current local directory.\n\n### What persists across pause\u002Fresume\n\nThe remote home directory (`\u002Fhome\u002F` on containers, `\u002Fhome\u002F\u003Cuser>\u002F` on VMs) persists. Everything else is ephemeral.\n\n**Persists:**\n- Files and directories under the home directory\n- `$HOME\u002F.venv` (shared venv for file runs) and `\u003Cproject>\u002F.venv` (per-project venv for directory runs)\n- Attached filesystems (mounted at `\u002Fhome\u002Fjl_fs\u002F`)\n- Run metadata under `\u003Chome>\u002Fjl-runs\u002F\u003Crun_id>\u002F`\n\n**Lost on pause:**\n- System-level installs (`apt-get`, global pip packages outside the home directory)\n- Files outside the home directory (`\u002Ftmp`, `\u002Froot`, etc.)\n\nUse `--setup` for system-level reinstalls (e.g., `apt-get`). Python packages in the venv persist across pause\u002Fresume. For recurring system setup, use startup scripts (`jl scripts add`).\n\n### Remote file paths\n\n`\u003Chome>` is `\u002Fhome\u002F` on containers, `\u002Fhome\u002F\u003Cuser>\u002F` on VMs.\n\n- Uploaded files (via `jl run`): `\u003Chome>\u002F\u003Cfilename>` (e.g., `train.py` → `\u002Fhome\u002Ftrain.py`)\n- Uploaded directories (via `jl run`): `\u003Chome>\u002F\u003Cdirectory_name>\u002F`\n- Uploaded files (via `jl upload`): `\u003Chome>\u002F\u003Cfilename>`\n- Shared venv (file runs): `\u003Chome>\u002F.venv\u002F`\n- Project venv (directory runs): `\u003Chome>\u002F\u003Cdirectory_name>\u002F.venv\u002F`\n- Run metadata: `\u003Chome>\u002Fjl-runs\u002F\u003Crun_id>\u002F`\n\n### Filesystems & supporting commands\n\nAttach a filesystem at creation with `--fs-id \u003Cid>`. Attach a startup script with `--script-id \u003Cid>` (and `--script-args`). These flags work on both `jl create` and `jl resume`.\n\n```bash\njl templates --json                    # list available templates\njl ssh-key list --json                 # list registered SSH keys\njl ssh-key add \u003Cpubkey-file> --name x  # add SSH key (required for VMs)\njl scripts list --json                 # list startup scripts\njl filesystem list --json              # list filesystems\njl filesystem create --name x --storage 100 --json  # create filesystem\n```\n\n**Filesystem caveats:**\n- **Region-bound:** A filesystem can only attach to instances in the same region.\n- **ID changes on edit:** Expanding a filesystem (`jl filesystem edit`) may return a new `fs_id`. Always use the returned ID.\n- The CLI validates that `fs_id` exists and belongs to the same region before creating\u002Fresuming.\n\n## Agent Workflow (End-to-End)\n\n```bash\n# 1. Check GPUs and create instance\njl gpus --json\njl create --gpu L4 --storage 100 --yes --json\n\n# 2. Start detached run\njl run . --script train.py --on \u003Cmachine_id> --requirements requirements.txt --json --yes\n\n# 3. Early check (catch import\u002Fsyntax\u002Fpip failures fast)\nsleep 15 && jl run logs \u003Crun_id> --tail 30\n\n# 4. Steady-state monitoring (repeat until footer shows succeeded or failed)\nsleep 120 && jl run logs \u003Crun_id> --tail 50\n\n# 5. Download results (use \u002Fhome\u002F\u003Cuser>\u002F for VMs instead of \u002Fhome\u002F)\njl download \u003Cmachine_id> \u002Fhome\u002Fresults .\u002Fresults -r\n\n# 6. Cleanup\njl pause \u003Cmachine_id> --yes --json\n```\n\nFor fresh instances without a pre-created instance:\n\n```bash\n# Creates instance inline, runs detached — agent must clean up after\njl run . --script train.py --gpu L4 --keep --json --yes\n# ... monitor with jl run logs ...\njl pause \u003Cmachine_id> --yes --json\n```\n\n## Error Handling\n\nWhen `--json` is active, CLI validation and API failures are emitted as `{\"error\": \"...\"}` to stdout.\n\nNot all non-zero exits use that shape. `jl exec --json` returns its own structured payload with `stdout`, `stderr`, and `exit_code` fields.\n\nAgent rule:\n- First inspect the JSON shape\n- If it has an `error` key, treat it as a CLI failure\n- Otherwise inspect command-specific fields (`exit_code`, `state`, `run_exit_code`)\n\n## Anti-Patterns\n\n- Do not use `jl run logs --follow` — blocks forever, will timeout. `--json` is also incompatible with `--follow`.\n- Always use `--json` when starting runs — it returns immediately. Without `--json`, the CLI streams logs and blocks.\n- Do not read full logs without `--tail N` — can return megabytes of output.\n- Do not poll every few seconds — use 60-600s intervals based on expected run duration.\n- Do not use lifecycle flags (`--keep`, `--pause`, `--destroy`) with `--on` — they are rejected. Only for fresh instances.\n- Do not use `--pause` or `--destroy` with `--json` for fresh instances — rejected. Use `--keep --json` and clean up yourself.\n- Do not use `jl exec` for long-running tasks — it blocks until the command finishes. Use `jl run` which runs in the background with log tracking.\n- Do not trust `jl run list` without `--refresh` — state shows as `\"saved\"` (stale). Use `--refresh` or `--status` for live state.\n- Do not assume `machine_id` is stable after `jl resume` — it may return a new ID. Always use the returned ID.\n- Do not forget to pause\u002Fdestroy instances after experiments — they cost money.\n\n## Command Discovery\n\nEvery command supports `--help` for full flag details:\n\n```bash\njl create --help       jl run --help       jl ssh-key --help\njl resume --help       jl run logs --help  jl filesystem --help\n```\n",{"name":5,"version":24,"metadata":25,"description":7},"1.0.2",{"openclaw":26},{"envVars":27,"install":31,"homepage":37,"requires":38,"primaryEnv":29},[28],{"name":29,"required":20,"description":30},"JL_API_KEY","Optional JarvisLabs API key. Users can also authenticate with `jl setup`.",[32],{"bins":33,"kind":35,"package":36},[34],"jl","uv","jarvislabs","https:\u002F\u002Fdocs.jarvislabs.ai\u002Fcli\u002F",{"bins":39},[34],"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fj\u002Fjarvislabs-gpu",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill jarvislabs-gpu",{"tool":55,"command":56},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill jarvislabs-gpu",{"tool":58,"command":59},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill jarvislabs-gpu","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fj\u002Fjarvislabs-gpu\u002FSKILL.md",true,[],[64,71,78,85,92,99],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]