Nebul Docs

Kilo CLI

Run the Kilo CLI terminal agent on Nebul models with an OpenAI-compatible custom provider.

Kilo CLI is Kilo Code's terminal agent: a fork of OpenCode that shares its configuration format, with agent modes, skills, session management, and CI-friendly automation. Because it speaks the OpenAI API format, it runs directly on your Nebul project's models.

Prerequisites

Installation

npm install -g @kilocode/cli

Verify it runs, then start it in your project directory:

kilo --version
cd /to/your/project
kilo

Connect it to Nebul

Kilo CLI stores provider credentials separately from provider configuration, so setup has two steps.

1. Store your API key

Inside the kilo TUI, run:

/connect

Scroll to Other, enter a provider ID such as nebul, and paste your Nebul API key when prompted. The provider ID must match the key you use in the config file in the next step.

2. Register the provider

Kilo CLI reads the same config format as OpenCode. Create or edit kilo.jsonc in your project root, or ~/.config/kilo/kilo.jsonc for a global setup:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "nebul/zai-org/GLM-5.3",
  "provider": {
    "nebul": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Nebul Inference API",
      "options": {
        "baseURL": "https://api.inference.nebul.io/v1"
      },
      "models": {
        "zai-org/GLM-5.3": {
          "name": "GLM 5.3",
          "limit": {
            "context": 1048576,
            "output": 16384
          }
        }
      }
    }
  }
}

Notes on the fields:

  • model is written as provider_id/model_id, so nebul/zai-org/GLM-5.3 here.
  • The key under models must exactly match a catalog model ID.
  • limit.context and limit.output shape how Kilo manages context and compaction. Take context from /v1/model/info; a conservative output cap like the one above is fine.

3. Select the model

Run /models inside Kilo, pick the Nebul model, and start coding. kilo models nebul from your shell lists the models registered on the provider.

Upgrading from opencode

Kilo no longer reads config from .opencode directories. Move your global config into ~/.config/kilo/ and any project config into ./kilo.jsonc or ./.kilo/.

Automation

For CI and scripts, Kilo runs without interaction:

kilo run "Explain what this repo does" --auto

In autonomous mode, operations that are not auto-approved are rejected rather than prompted, so review your permission config first. Resume your last session with kilo --continue.

Troubleshooting

  • Provider not listed after /connect: the provider ID you entered must match the key under provider in the config file.
  • 404 on requests: the base URL must be https://api.inference.nebul.io/v1, with the /v1 suffix.
  • Model not found: the model key in config must exactly match a catalog ID, including vendor prefix and casing.
  • Config edits not picked up: restart the CLI after editing kilo.jsonc, or run /reload inside a session.

Data and telemetry

Kilo's telemetry is on by default and can be disabled in ~/.config/kilo/kilo.jsonc:

{
  "experimental": {
    "openTelemetry": false
  }
}

If you want telemetry routed to your own observability stack instead, leave it on and set OTEL_EXPORTER_OTLP_ENDPOINT to your collector.

Requests to Nebul are covered by Privacy & Security.

On this page