Skip to main content

OpenCode llama.cpp Launcher

Launch OpenCode with a local model served by llama.cpp. The launcher starts llama-server, wires OpenCode to it, and cleans up when your session ends.

OpenCode llama.cpp Launcher demo

Requirements

  • OpenCode
  • llama.cpp's llama-server
  • A local GGUF model, such as Qwen, DeepSeek, or Gemma

The launcher finds llama-server on PATH, or you can set llama_server in your config.

Install OpenCode using its GitHub installation instructions. Install llama.cpp using its installation guide.

Install

For most users, install with pipx:

pipx install opencode-llama-cpp-launcher

Or install with pip:

python -m pip install opencode-llama-cpp-launcher

Check that the required external binaries are available:

opencode-llama doctor

Configure

Create opencode-llama.yaml in the project where you want OpenCode to run, or create ~/.config/opencode-llama.yaml for a user-wide default:

model: /absolute/path/to/model.gguf
ctx_size: 8192

# Optional
port: 8080
llama_server: /optional/path/to/llama-server

Config lookup order:

  1. The path passed with --config
  2. opencode-llama.yaml or opencode-llama.yml in the project directory
  3. ~/.config/opencode-llama.yaml

Usage

Run with an explicit config file:

opencode-llama --config opencode-llama.yaml

Or pass the model directly:

opencode-llama --model /absolute/path/to/model.gguf

Useful options:

opencode-llama --help
opencode-llama --dry-run
opencode-llama --config opencode-llama.yaml
opencode-llama --port 9001
opencode-llama --ctx-size 8192
opencode-llama --llama-server /absolute/path/to/llama-server

If llama-server fails before becoming healthy, the launcher includes a bounded tail of the server's startup output in the error message. Successful runs stay quiet.

Development

Install dependencies from this repository:

uv sync --dev

Run the test suite:

uv run pytest

Before publishing, check for local files:

git status --short --ignored

Do not commit local launcher configs, virtual environments, caches, build artifacts, or model paths.

License

MIT

Metadata

Release files for opencode-llama-cpp-launcher 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opencode-llama-cpp-launcher 0.1.5
File Size Uploaded
opencode_llama_cpp_launcher-0.1.5.tar.gz 328.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opencode-llama-cpp-launcher 0.1.5
File Interpreter ABI Platform
opencode_llama_cpp_launcher-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 344.4 kB

Release files / opencode_llama_cpp_launcher-0.1.5.tar.gz

Download URL opencode_llama_cpp_launcher-0.1.5.tar.gz
Size 328.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c9a78e6a1a55ad5705bb8e3218bdd9b5911ba9237e18ec26c9f76cac672a61a5
BLAKE2b-256 checksum
How to use checksums
43d7dc1e67565d214e7a6aa59b6b62f1a8027f168a1f47ad241dd01b44f3a20d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / opencode_llama_cpp_launcher-0.1.5-py3-none-any.whl

Download URL opencode_llama_cpp_launcher-0.1.5-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d7122d4dd3bd08cca56628383878f2dfdfba11ce93eb06040102c1e804c05f3
BLAKE2b-256 checksum
How to use checksums
4b5e109f7e16142489214a9d31e66330bcb690bd8e1983adf3c66830c6b7a478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page