Skip to main content
NVIDIA
Explore
Models
Skills
Blueprints
GPUs
Docs
Help Center
Getting Started
  1. Create and verify your account to unlock full access to NVIDIA NIM APIs.
ResourcesDeveloper ForumsContact Support
FAQs
  • View All Playbooks
    View All Playbooks

    onboarding

    • Set Up Local Network Access
    • Open WebUI with Ollama

    data science

    • Single-cell RNA Sequencing
    • Portfolio Optimization
    • CUDA-X Data Science
    • Build Knowledge Graphs with txt2kg
    • Optimized JAX

    tools

    • DGX Dashboard
    • RAG Application in AI Workbench
    • Set up Tailscale on Your Spark
    • VS Code
    • Connect Three DGX Spark in a Ring Topology
    • Connect Multiple DGX Spark through a Switch

    fine tuning

    • FLUX.1 Dreambooth LoRA Fine-tuning
    • LLaMA Factory
    • Fine-tune with NeMo
    • Fine-tune with Pytorch
    • Unsloth on DGX Spark

    use case

    • Run Hermes Agent with a Local LLM
    • cuTile Kernels
    • CLI Coding Agent
    • Run NemoClaw with a Local LLM
    • 🦞 Set Up Example NemoClaw Agents 🦞
    • Live VLM WebUI
    • Install and Use Isaac Sim and Isaac Lab
    • Vibe Coding in VS Code
    • Build and Deploy a Multi-Agent Chatbot
    • Connect Two Sparks
    • NCCL for Multiple Sparks
    • Build a Video Search and Summarization (VSS) Agent
    • Spark & Reachy Photo Booth
    • Secure AI Agents with OpenShell
    • Run OpenClaw with a Local LLM

    inference

    • Generate Images and Videos with ComfyUI
    • Serve LLMs with vLLM
    • Speculative Decoding
    • Run models with llama.cpp on DGX Spark
    • Nemotron Model Family on DGX Spark
    • Serve LLMs with SGLang
    • TRT LLM for Inference
    • Quantize Models to NVFP4 with NVIDIA Model Optimizer
    • Multi-modal Inference
    • NIM on Spark
    • LM Studio on DGX Spark

    CLI Coding Agent

    20 MINS

    Build local CLI coding agents with Ollama

    • Claude Code
    • Codex
    • Coding
    • LLM
    • Ollama
    • OpenCode
    • Qwen
    OverviewOverviewClaude CodeClaude CodeOpenCodeOpenCodeCodex CLICodex CLITroubleshootingTroubleshooting

    Step 1
    Confirm your environment

    Description: Verify the OS version and GPU are visible before installing anything.

    cat /etc/os-release | head -n 2
    nvidia-smi
    

    Expected output should show Ubuntu 24.04.3 LTS (DGX OS 7.3.1 base) and a detected GPU.

    Step 2
    Install or update Ollama

    Description: Install Ollama or ensure it is recent enough to support ollama launch.

    curl -fsSL https://ollama.com/install.sh | sh
    ollama --version
    

    If Ollama is already installed, just verify the version:

    ollama --version
    

    Expected output should show Ollama v0.15 or newer.

    Step 3
    Pull Qwen3.6

    Description: Download the Qwen3.6 model weights to your Spark node.

    ollama pull qwen3.6
    

    Optional variants if you want different memory footprints or precision:

    ollama pull qwen3.6:35b-a3b-nvfp4   # NVIDIA FP4 build tuned for Blackwell (~22GB)
    ollama pull qwen3.6:35b-a3b-q8_0    # Higher-quality 8-bit quant (~39GB)
    ollama pull qwen3.6:35b-a3b-bf16    # Full precision (~71GB)
    

    Expected output should show qwen3.6 in ollama list.

    Step 4
    Test local inference (optional)

    Description: Run a quick prompt to confirm the model loads.

    ollama run qwen3.6
    

    Try a prompt like:

    Write a short README checklist for a Python project.
    

    Expected output should show the model responding. When you are done, type /bye or press Ctrl+D to exit before continuing.

    Step 5
    Launch OpenCode with Ollama

    Description: Use Ollama's built-in launch method to start OpenCode against your local model. No opencode.json provider configuration is required.

    ollama launch opencode --model qwen3.6
    

    If you want to pre-configure OpenCode without launching immediately:

    ollama launch opencode --config
    

    Expected output should show OpenCode starting with Ollama preselected as the provider and Qwen3.6 as the model. Qwen3.6 ships with a 256K context window by default.

    Step 6
    Complete a small coding task

    Description: Create a tiny repo and let OpenCode implement a function and tests.

    mkdir -p ~/cli-agent-demo
    cd ~/cli-agent-demo
    
    printf 'def add(a, b):\n    """Return the sum of a and b."""\n    pass\n' > math_utils.py
    printf 'import math_utils\n\n\ndef test_add():\n    assert math_utils.add(1, 2) == 3\n' > test_math_utils.py
    

    If you do not already have pytest installed:

    python3 -m venv .venv
    source .venv/bin/activate
    python3 -m pip install -U pytest
    

    In OpenCode:

    Please implement add() in math_utils.py and make sure the test passes.
    

    Run the test:

    python3 -m pytest -q
    

    Expected output should show the test passing. When you are done, run deactivate to exit the virtual environment.

    Step 7
    Cleanup and rollback

    Description: Remove the model and stop services if you no longer need them.

    To stop the service:

    sudo systemctl stop ollama
    

    WARNING

    This will delete the downloaded model files.

    ollama rm qwen3.6
    

    Step 8
    Next steps

    • Try the qwen3.6:35b-a3b-nvfp4 or bf16 variants for different quality/VRAM tradeoffs
    • Use OpenCode on multi-file changes or test-generation tasks
    • Explore the full 256K context window on larger codebases

    Resources

    • Ollama Documentation
    • Ollama Launch Method
    • Qwen3.6 Model Page
    • Claude Code + Ollama Guide
    • OpenCode Ollama Provider
    • Codex + Ollama Guide
    • DGX Spark Documentation
    • DGX Spark Forum
    Terms of Use
    Privacy Policy
    Your Privacy Choices
    Contact

    Copyright © 2026 NVIDIA Corporation