skaft / ygg / docs

Ygg documentation

Local agent.
Explicit
context.

Local models are first class. Extension API 0.2 keeps product capabilities replaceable and supervised. Context, authority, sessions, delegated work, Pi migration, and terminal diagnostics stay inspectable.

core Rust extensions API 0.2 · supervised subprocesses hotfixes worker evidence · cursor-correct TUI
01

Start

Install. Pick a model. Work.

Requirements

  • macOS (Intel or Apple silicon) or GNU/Linux x86-64
  • rg on your PATH
  • No Rust toolchain for the prebuilt install

Install 0.6.2

curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/skaft-software/ygg/releases/download/v0.6.2/install-ygg.sh | sh

Restart the shell, then run ygg --version.

The signed installer selects and verifies a target-specific binary and installs both ygg and ygg-host. Its explicit --from-source mode requires Rust 1.86 or newer.

Anthropic

export ANTHROPIC_API_KEY='...'
ygg --model claude-sonnet-4-6

OpenAI

export OPENAI_API_KEY='...'
ygg --model gpt-5.4

ChatGPT subscription

ygg --login codex
ygg --model gpt-5.6
Install the optional loopback-only Ygg Serve web app
ygg extension install ygg-serve
ygg serve

The official package must exactly match Ygg 0.6.2. See the application-package documentation ↗ for lifecycle and security boundaries.

Upgrade from v0.4.0 or earlier

Pre-0.5.0 releases do not include ygg update. Re-run the 0.6.2 installer above with the same YGG_INSTALL_DIR, or re-run the pinned Cargo install if Cargo installed Ygg. Configuration, credentials, sessions, and other ~/.ygg data are preserved.

hash -r
ygg --version
ygg extension update ygg-serve

Starting with v0.5.0, use ygg update --check and ygg update. Serve remains a separately version-matched package.

The first v0.6.2 startup also refreshes managed v0.6.0 and v0.6.1 first-party bundles and Serve to the exact hotfix version, removes the retired ygg-hermes-memory bundle while preserving its external data, and continues startup if a download is unavailable.

Connect a local OpenAI-compatible endpoint

Create ~/.ygg/credentials/custom.json with owner-only permissions.

{
  "version": 1,
  "providers": {
    "local": {
      "label": "Local Qwen",
      "base_url": "http://127.0.0.1:8000/v1/",
      "auth": { "kind": "none" },
      "auto_discover": false,
      "models": [{
        "api_name": "Qwen/Qwen3-Coder-Next",
        "context_window": 131072,
        "max_output_tokens": 16384,
        "tools": true,
        "parallel_tool_calls": false,
        "vision": false,
        "structured_output": false,
        "reasoning": true,
        "reasoning_values": ["none", "default"],
        "reasoning_default": "default"
      }]
    }
  }
}
chmod 600 ~/.ygg/credentials/custom.json
ygg --offline --model 'custom/local/Qwen/Qwen3-Coder-Next'

--offline skips optional startup discovery. Inference still reaches the selected endpoint.

For the optional Apple Foundation Models provider, Ygg skips the /v1/models discovery request when the local fm serve health endpoint is unavailable; other provider errors remain visible.

02

Use

Three frontends. One session model.

interactiveygg

Rich terminal UI with native scrollback.

plainygg --plain

Chronological ASCII without cursor control.

printygg -p "review this"

Headless, response-only output.

0.6.2 uses Pi's retained-frame renderer: first render materializes every row, ordinary updates repaint only the exact changed range, and changes above the viewport clear saved lines before one complete replay. Terminal-owned resume eagerly materializes the complete active branch; resizing reflows it at the new width and replays it once. The interactive composer's hardware cursor remains visible across the default retained-frame renderer, application-owned viewport, panel transitions, resize/replay, renderer resume, and narrow-width fallback.

The startup card reports permissions: full access by default, with full access bold and red. Run ygg --safe-mode to show permissions: safe mode, with safe mode bold and accent-colored (blue in the default theme), and require approval for each bash call and workspace mutation.

Keys

Enter
submit the current prompt
Shift+Enter
insert a newline with enhanced key events
Ctrl+O
toggle reasoning and retained tool evidence
Ctrl+C
clear a draft or abort active work
Ctrl+D
close Ygg and settle child cleanup
PageUp / PageDown
navigate transcript history
Tab
complete filesystem paths
@
fuzzy-complete workspace file mentions

Slash commands

conversation

/new/resume [id]/fork/clone/tree/checkout <id>/compact/goal ...

model

/model [id]/thinking [level]/status/cost/cache

view

/verbose [on|off]/reload/update

local system

/prompt [name] [arguments]/skills [subcommand]/extensions [reload]/subagents/export [path]

identity

/login [provider]/logout [provider]/name [name]/quit
03

Models

Local first. Cloud ready.

Ygg keeps one conversation model across OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages.

OpenAIAnthropicDeepSeekOpenRouterGroqCerebrasxAITogether AIFireworks AINVIDIAHugging FaceMoonshot AIXiaomiMiniMaxOpenCode Zencustom

Choose

ygg --model provider/model
/model

Reasoning

Ygg normalizes the selected model's actual capability. Depending on the model, the picker exposes off, on, effort levels, or a budget.

ygg --reasoning high
/thinking

Ultra + delegation

When live Codex metadata advertises Ultra and V2 collaboration, Ygg enables up to eight bounded child agents with inherited tools, policy, model, and context limits. The TUI keeps the complete bounded worker roster visible, not just a disclosure tail. When owning-run cleanup removes the live host tree, terminal summaries, fatal errors, usage, and sibling rows remain inspectable; missing active workers settle as explicit orphaned diagnostic records instead of disappearing. It never infers this capability from a model name.

ygg --model gpt-5.6-sol \
  --reasoning ultra
04

Context

You decide what the model sees.

default base prompt

2,752 tested scaffold bytes, plus dynamic paths.

The 0.6.2 regression test enables read, edit, write, and bash, subtracts the workspace and invocation-directory path lengths, and asserts a 2,752-byte scaffold (≈688 tokens). The reported number excludes those path strings. Tool schemas and optional project context are additional request layers; changing the enabled tool set changes the tool-name portion.

Read the release test ↗

AGENTS.md

Global by default. Project only with trust.

~/.ygg/AGENTS.md loads globally. Workspace files load root to current directory only with --workspace-trusted. Disable all context files with --no-context-files.

compaction

Automatic at 85%.

Local compaction keeps an approximately token-bounded 20,000-token recent tail by default. Native Responses compaction remains available on compatible routes. Active skill state survives compaction and resume.

Prompt templates

Markdown or TOML. Deterministic arguments, workspace variables, bounded file includes, and content hashes.

ygg --prompt local-review "focus"
/prompt local-review focus
ygg --debug-prompt --prompt local-review

Skills

Discovery reads metadata only. Loading is explicit. Supporting files under references/ and templates/ load lazily.

/skills search rust review
/skills load local-model-review
/skills active
/skills off local-model-review
05

Tools + safety

Small surface. Explicit authority.

core workspace tools

readeditwritebashsearch opt-in

The default model-visible surface also includes search_skills, load_skill, and read_skill_resource. Activated skills can add more tools. Ygg defaults to full host access: authoritatively classified effects use the current user's authority after the tool and capability gates pass. Use --safe-mode for ControlledBashApproval: workspace mutations and every bash call require approval, other ambient host effects stay denied, and external paths are forced off. Unknown effects still fail closed; --no-* flags and remote-read opt-ins remain enforced. Ygg is not an operating-system sandbox. --safe remains a hidden alias; the former --yolo flag and configuration/environment forms are removed.

review only
ygg --tools read,search \
  --no-context-files --offline
no mutation
ygg --no-edit

Disables edit and write.

no commands
ygg --no-process

--no-shell is the same authority gate.

safe mode
ygg --safe-mode

Approve each bash call and workspace mutation.

exact set
ygg --tools read,edit,bash
ygg --exclude-tools write

Default Bash timeout is 120 seconds and captured tool output is bounded to 1 MiB by default. Unresolved mutating calls after a crash are marked indeterminate and are never replayed automatically.

06

Sessions

Durable. Branchable. Local.

Conversations are bounded append-only JSONL, namespaced by workspace. Checkout moves the durable head without deleting ancestry.

continue

ygg --continue
ygg --resume
ygg --resume <id>
ygg --fork <id>
ygg --fork

inspect

ygg sessions list --query review
ygg sessions inspect <id>
ygg sessions tag <id> rust local-model

export + repair

ygg sessions export <id>
ygg sessions repair <id>
ygg sessions delete <id>

Export validates and redacts by default. Delete moves files to recoverable trash. Repair only removes an interrupted final append after a private backup. The 0.6.2 release retains durable session goals, isolated child sessions with private delegation provenance, deferred tool-schema loading, and fork/clone branching.

07

Customize

Everything important is inspectable.

prompt~/.ygg/prompts/*.{md,toml}.ygg/prompts/*.{md,toml}--prompt-template
skill~/.ygg/skills/*/SKILL.md.ygg/skills/*/SKILL.md--skill-dir
extension~/.ygg/extensions/*/extension.toml.ygg/extensions/*/extension.toml--extension-dir

Resolution is global, trusted project, then explicit paths. Later definitions win. Files must be regular and non-symlink. One broken resource becomes a diagnostic instead of blocking startup.

Theme customization is disabled in v0.6.2: terminal and graphical Serve always use the compiled default. Legacy theme options are ignored or fall back, and the schema is reserved for a later release.

Default presentation

The /theme command is not registered, and Ygg does not discover or load theme files in this release. The default terminal and Serve presentation stay one known, tested surface.

Extensions

Bounded JSON-RPC subprocesses can add tools, commands, hooks, context, and status. API 0.2 adds cancellation, progress, structured and media results, lifecycle events, verified artifacts, dynamic tool catalogs, resource-owner fencing, and supervised restart. The first-party catalog contains ygg-browse, ygg-mcp, ygg-subagents, and ygg-web-search.

ygg extension install ygg-web-search
ygg extension list
08

Migrate from Pi

Inventory first. No token spend.

Dry-run inventory

ygg migrate pi --dry-run
ygg migrate pi --dry-run --json > pi-migration.json

Ygg reads bounded Pi user/project settings, package manifests, resources, source, and lockfiles, then stops before normal configuration, provider discovery, extension startup, or model bootstrap.

What it reports

Resources and packages are hashed and classified as direct, replace, bridge, native_port, manual, or blocked. The report is a plan, not an automatic migration.

Package code is never executed; the scan sends nothing to a model or network service and changes no files.

Link a reviewed local tool

ygg pi install ./path/to/extension.ts
ygg pi list

This creates an inert wrapper for an existing source under ~/.ygg/extensions/. It does not install dependencies, run lifecycle scripts, or enable the result.

Trust remains explicit

ygg --enable-extension pi-extension-name \
  --trust-extension pi-extension-name

The initial bridge requires Node and an installed Pi package. Unsupported TUI, provider, session, and mutation surfaces remain explicit migration diagnostics.

09

Reference

Defaults with nowhere to hide.

built-in~/.ygg/config.tomltrusted .ygg/config.tomlenvironmentCLI

Project config can tighten user authority and resource limits, never relax them. It cannot grant executable extension trust.

Common configuration
model = "custom/local/Qwen/Qwen3-Coder-Next"
reasoning = "high"
cache_retention = "short"
color = "auto"
mouse = "auto"
bash_timeout_secs = 120
# Full host access is the default. Use --safe-mode for approvals.
max_output_bytes = 1048576
context_files = true
offline = false

[compaction]
mode = "local"
threshold_fraction = 0.85
keep_recent_tokens = 20000
Launch controls

--workspace PATHselect workspace root

--workspace-trustedload project config, AGENTS.md, and skills

--model MODELoverride model

--reasoning VALUEoff, on, effort level, or budget

--cache-retention POLICYnone, short, or long

--plainchronological ASCII frontend

-p, --printheadless response-only frontend

--continue / --resume / --fork [ID]return to or branch a session

--tools NAMESexact tool allowlist

defaultfull host access for classified effects

--safe-modeapprove each bash call and workspace mutation

--no-edit / --no-processremove authority

--offlineskip optional discovery

--strict-configreject unknown configuration keys

--helpcomplete current CLI reference

docs track

current release

This reference matches the 0.6.2 release: Pi's retained-frame terminal renderer and complete terminal-owned resume hydration; a hardware cursor that remains visible across renderer paths, panels, resize/replay, and resume; complete bounded subagent rosters through eight workers, with terminal summaries, fatal errors, usage, sibling rows, and explicit orphaned diagnostics surviving owning-run cleanup; Apple Foundation Models discovery that skips an unavailable optional fm serve health endpoint; zero-token Pi setup inventory and an explicitly trusted compatibility bridge; automatic managed v0.6.0/v0.6.1 bundle and Serve refresh with retired-package cleanup; executable-extension API 0.2 and supervision; deferred tool-schema loading; metadata-gated Ultra reasoning with bounded task delegation; durable goals; token-bounded compaction; ygg update; the native ygg-host protocol; the compiled default theme; and exact-version first-party packages for ygg-browse, ygg-mcp, ygg-subagents, and ygg-web-search.

release notes ↗ security ↗ changelog ↗