ollama

package module
v0.0.0-...-e264c66 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 13 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.

Documentation

Overview

Package ollama is the charly plugin OWNING the `charly ollama` command — the host-side management CLI for a DEPLOYED Ollama server (list / ps / pull / rm / show / cp / create / push / run / stop / version). The plugin owns the ENTIRE logic: the subcommand grammar AND the Ollama HTTP API calls, built on the official upstream client (github.com/ollama/ollama/api). There is no core ollama logic and no HostBuild seam.

The command talks to the server over plain HTTP, so it is fully self-contained and works IDENTICALLY compiled-in OR out-of-process: compiled-in (charly.yml compiled_plugins) the host dispatches Invoke(OpRun) in-process (dispatchInProcCommand); out-of-process the host fork/execs cmd/serve → CliMain running the SAME runOllamaCLI.

Endpoint resolution is deliberately lightweight: --server flag > OLLAMA_HOST env > http://127.0.0.1:11434. The ollama CANDY (candy/ollama) deploys the server; this plugin manages it — the two are independent surfaces (the candy's host shell `alias: ollama` execs the upstream CLI inside the container; this command runs on the host).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CliMain

func CliMain(args []string) int

CliMain is the CLI entrypoint (the out-of-process placement + the shared entry). The command is self-contained (plain HTTP to the server), so it runs runOllamaCLI directly — no reverse channel, works in either placement.

func NewMeta

func NewMeta() pb.PluginMetaServer

NewMeta advertises command:ollama — the COMPILED-IN registry path resolves it (registerCompiledPlugin → resolve(ClassCommand,"ollama") → dispatchInProcCommand → Invoke(OpRun)). A command plugin is input-less (pass-through CLI args), so it serves NO schema (nil FS) — same shape as plugin-candy / plugin-example-command.

func NewProvider

func NewProvider() pb.ProviderServer

NewProvider returns the ollama provider.

Types

This section is empty.

Directories

Path Synopsis
cmd
serve command
Command serve is the OUT-OF-PROCESS entrypoint for the ollama command plugin: dual-mode sdk.Main (serve OR CLI).
Command serve is the OUT-OF-PROCESS entrypoint for the ollama command plugin: dual-mode sdk.Main (serve OR CLI).

Jump to

Keyboard shortcuts

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