Manage the ɳSelf AI plugin and local LLM stack.
nself ai <subcommand> [flags] [args]
nself ai manages the AI plugin (plugin-ai) and the optional local Ollama runtime that powers zero-config inference. It groups three areas: the local Ollama stack (install, models, health, swap, benchmark), a one-shot chat for quick verification, and the Gemini API key pool for cloud routing.
The ai local subtree installs and inspects an Ollama daemon and the small set of models recommended for the host RAM tier. ai pool manages auto-provisioned Gemini keys (OAuth-onboarded Google accounts, GCP project creation, key rotation, daily quota tracking) so the AI plugin always has free or near-free capacity.
Most flags are non-destructive. Pulling models requires network access. Pool subcommands talk to the AI plugin over its internal HTTP API; if the plugin is not running, commands report a clear error.
Name Description local installInstall Ollama, systemd service, firewall, and recommended models local models listList installed and registered local models with diff local models add <model>Pull a model via Ollama and register with plugin-ai local models remove <model>Soft-delete a local model and uninstall from Ollama local models recommendPrint recommended models for this host local healthShow Ollama and plugin-ai health local swap <model>Hot-swap the default model for a task local benchmark [model]Run benchmark prompts against one or more models chat <message>Send a quick chat message to the local AI pool initInteractive wizard: add a Google account and auto-provision a Gemini key pool statusShow pool status (keys, usage, capacity) pool provisionNon-interactive provision using stored refresh token pool addAdd a Google account via OAuth (opens browser) pool removeRemove a key from the pool (soft-revoke + optional GCP delete) pool rotateRotate a key (create new GCP key, revoke old) pool testTest one or all keys with a 1-token Gemini request pool daily-resetManually trigger the daily counter reset
Top-level nself ai exposes no flags; flags belong to each subcommand.
Flag Default Description --yesfalse Non-interactive mode --no-modelsfalse Skip model pulls --model""Pull only this model --bind""host:port to bind Ollama to --jsonfalse Emit JSON output
Flag Default Description --installedfalse Show only installed --registeredfalse Show only registered --jsonfalse Emit JSON output
Flag Default Description --taskchatComma-separated task classes --defaultfalse Set as default for the tasks
Flag Default Description --forcefalse Remove even if default
Flag Default Description --tierautoForce a tier (auto, minimal, balanced, max)
Flag Default Description --watchfalse Re-poll every 2s --jsonfalse Emit JSON output
Flag Default Description --taskchatTask: chat, embed, classify, or all --reason""Free-text reason (audit log)
Flag Default Description --taskschatComma-separated tasks --iterations5Iterations per task
Flag Default Description --model""Model to use (default: AI_DEFAULT_MODEL or gemma2:2b) --jsonfalse Emit JSON output
Flag Default Description --jsonfalse Emit JSON output --verbosefalse Show per-key details
Flag Default Description --account""Google account email (required)
Flag Default Description --account""Google account email hint
Flag Default Description --account""Remove by Google account email --key-id""Remove by key index
Flag Default Description --key-id""Key index to rotate (required)
Flag Default Description --key-id""Test a specific key --allfalse Test all keys
Flag Default Description --dry-runfalse Show what would reset without resetting
# Install Ollama and pull recommended models for this host
nself ai local install --yes
# Send a quick verification chat
# See what models are recommended for the host RAM tier
nself ai local models recommend
# Pull and register a model, set as default for chat
nself ai local models add llama3.2:3b --default
# Onboard a new Google account and auto-provision a Gemini key
nself ai pool status --verbose
← Commands | Home →