ghost

command module
v4.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Ghost

▄████ ██░ ██ ▒█████ ██████ ████████ ██▒ ▀█▒▓██░ ██▒▒██▒ ██▒ ██ ▒ ██ ▒██░▄▄▄░▒██▀▀██░▒██░ ██▒ ▓██▄ ██ ░▓█ ██▓░▓█ ░██ ▒██ ██░ ▒ ██▒ ██ ░▒▓███▀▒░▓█▒░██▓░ ████▓▒░▒██████▒▒ ██ ░▒ ▒ ▒ ░░▒░▒░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░ ░ ░ ░ ▒ ░▒░ ░ ░ ▒ ▒░ ░ ░▒ ░ ░ ░ ░ ░ ░ ░░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░

One prompt enters the wire. One local response comes back.

Ghost is a local-first terminal AI companion powered by Ollama.

The project is being rebuilt from first principals as a TUI-first cyberdeck: local inference, precise terminal behavior, and a cyberpunk interface designed for the glow of the command line.

Boot Sequence

Before opening the uplink, install:

  • Go 1.26.5
  • Ollama, running locally
  • An Ollama chat model

Ghost currently expects the Ollama API at: http://localhost:11434/api

Load a Construct

Pull the small model used by the documented examples:

ollama pull qwen3:0.6b

Confirm that it is available in local model storage:

ollama ls

From the repository root:

go run . --model qwen3:0.6b "Reply with one short sentence confirming Ghost is online."

Ghost streams its response to standard output as content arrives.

Press CTRL+C to cancel the request. Cancellation or failure exits with a nonzero status and leaves any partial response visible. Diagnostics go to standard error.

System Diagnostics

Ghost has two validation circuits: isolated repository checks and an explicit live connection test.

Offline checks

These commands do not require Ollama or network access:

go build ./...
go test ./...
golangci-lint run

The tagged end-to-end test connects to a real local Ollama instance. Ollama must be running, and the selected model must already be installed

go test -tags=e2e -v .

To validate another installed model:

GHOST_E2E_MODEL=<model-name> go test -tags=e2e -v .

The end-to-end test is intentionally excluded from the normal test suite and continuous integration. Nothing reaches the live wire unless explicitly requested.

Signal Recovery

Ollama node unavailable

Start the Ollama server:

ollama serve

When Ghost cannot establish a connection, the error chain begins with:

ghost // uplink failure: request Ollama chat response:
send Ollama chat request:

The remaining text comes from the operating system and may differ between platforms.

Requested model missing

Inspect the models available in local storage:

ollama ls

Pull the requested model when necessary:

ollama pull <model-name>

A missing-model failure includes:

ghost // uplink failure: request Ollama chat response:
Ollama chat request failed: 404 Not Found:

Archived Construct

The previous v3 implementation is preserved on the archive/v3 branch and at the archive-v3-2026-08-22 tag.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL