Skip to Content
gyblosdocs

Run the buyer without the app

View Markdown

The desktop app is the simplest way to use Gyblos. This page is for developers who prefer a terminal, or who run coding agents on a machine without a desktop. The gyblos command runs the same buyer the app runs, on your own computer, and serves the OpenAI and Anthropic APIs on a local address.

Your prompt reaches the seller that answers it. That seller's machine runs the model and can read your prompt. Don't send passwords, keys or other secrets. See Data and privacy.

Like the desktop app, the released buyer uploads signed receipts and content-free observations to the Gyblos metrics collector. Receipts can't be turned off; observations can, with GYBLOS_OBSERVATIONS=off.

This page covers free models. For paid models and API keys with a spending limit, use the desktop app's API keys.

Install

npm install -g gyblos

It works on macOS (Apple Silicon), Linux (x64 and arm64, glibc) and Windows 10/11 (x64). The package brings its own runtime: npm only installs it. The buyer keeps its data in ~/.gyblos/buyer (%USERPROFILE%\.gyblos\buyer on Windows). gyblos buyer --help lists every buyer command.

To update, run npm install -g gyblos@latest.

Set up the buyer

gyblos buyer init

It needs an interactive terminal. Press Enter at the first question to use any seller registered on the network. Setup creates the buyer's identity and settings, then shows a summary and asks before saving. It starts with a zero maximum per response, so the buyer uses free offers only. It sends no payment and changes nothing that already exists.

Start the buyer

gyblos buyer start

Keep it running while your tools use it. It listens on http://127.0.0.1:4031, on your computer only. The first start creates a private token in ~/.gyblos/buyer/api-token. Every request must carry it, and the buyer never prints it.

Anyone who can read that file, or run programs as your user, can use your buyer. Run it only on a machine you control. To replace the token, stop the buyer, delete the file and start it again.

Connect a coding agent

In the shell where you start your agent, put the token in a variable, then let gyblos write the agent's configuration:

export GYBLOS_API_KEY="$(cat ~/.gyblos/buyer/api-token)"
gyblos buyer agent codex --write --token-env GYBLOS_API_KEY

On Windows, in PowerShell:

$env:GYBLOS_API_KEY = Get-Content "$HOME\.gyblos\buyer\api-token"
gyblos buyer agent codex --write --token-env GYBLOS_API_KEY

Replace codex with opencode, pi or claude. With --write, the command updates only the Gyblos part of the tool's own configuration file and keeps a copy of the previous file. Without --write, it prints the configuration instead. Claude Code reads its settings from the shell, so for claude the command prints the lines to run there.

Other programs that speak the OpenAI or Anthropic API use the same address and token:

curl http://127.0.0.1:4031/v1/models -H "Authorization: Bearer $GYBLOS_API_KEY"

Keep one paid channel

gyblos buyer existing-channel on

Run it with the buyer stopped, after your first paid answer has funded a channel. Your tools then use only that channel, even after a restart. When it runs out, settles or expires, paid requests fail before any new deposit or answer, even for the same seller. API keys can't change this. To allow a new deposit, stop the buyer and run gyblos buyer existing-channel off. Setting a renewal budget with gyblos buyer budget also lifts this restriction.

On this page