Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 2.26 KB

File metadata and controls

66 lines (46 loc) · 2.26 KB

OpenCode

OpenCode is an AI coding agent built for the terminal that helps with code review, refactoring, testing, and general development tasks.

Overview

OpenCode natively supports Hugging Face Inference Providers, giving you access to open models from 17+ providers through a single interface.

Prerequisites

Configuration

Quick Setup

  1. Create a Hugging Face token with Inference Providers permissions at huggingface.co/settings/tokens

  2. Run opencode auth login and select Hugging Face:

$ opencode auth login

┌  Add credential
│
◆  Select provider
│  ● Hugging Face
│  ...
└
  1. Enter your Hugging Face token when prompted:
┌  Add credential
│
◇  Select provider
│  Hugging Face
│
◇  Enter your API key
│  hf_...
└
  1. Run the /models command in OpenCode to select a model.

Once configured, OpenCode will use your selected model for all operations. You can switch models anytime using the /models command in the OpenCode TUI (Terminal User Interface).

GitHub Actions Integration

OpenCode can also be used to run open models in GitHub Actions via Inference Providers. See our GitHub Actions guide for setting up automated PR reviews.

Resources