# OmniContext CLI

A context-first, zero-telemetry coding assistant that extends into VS Code, Office, the browser, and mobile. Supports Anthropic, OpenAI, Gemini, and Responses API plus image generation via Google Imagen and OpenAI Images, with custom workflows, atlas navigation, and cross-session memory.

## Context-First Architecture

Every token matters. OmniContext CLI is engineered from the ground up to squeeze maximum value out of every context window.

- **Lean system prompts** - the built-in system prompts are short, focused, and free of boilerplate. Tool descriptions are minimal. Your context budget goes toward actual work, not framework overhead.
- **Agentic tools** - exploratory tasks (searching code, surveying project structure, previewing files) run as separate agentic tools, optionally on a dedicated agent model. Intermediate tool calls, file contents, and reasoning never enter your main context. You get a concise answer back; the scratch work stays off the books.
- **Atlas navigation** - code navigation knowledge is stored as lightweight topic-to-file maps, so assistants can jump to the right files before searching from scratch.
- **Context editing** - as a conversation grows, older rounds accumulate tool call payloads and thinking blocks that are no longer relevant. Context editing automatically compresses these, replacing bulky tool inputs and outputs with compact placeholders and stripping reasoning traces, so the model sees a clean, focused history.
- **Cross-session memory** - every time a conversation is compacted, the model distills key points and evaluates existing memories. Good insights accumulate weight, stale knowledge decays naturally. When the next session starts, accumulated memories are injected automatically so the assistant knows your preferences and project context from the first message.
- **Prompt caching** - you choose the cache TTL: 5 minutes for quick iteration, 1 hour for long work sessions. Cache control for Anthropic is applied automatically, so repeated context blocks are served from cache, cutting token usage and cost significantly.

## Workflow System

A workflow controls everything about how OmniContext CLI behaves: the system prompt, which tools are available, and how the assistant interacts with you. Five workflows ship built-in:

| Preset | Use Case | Description |
|--------|----------|-------------|
| **Programming** (default) | Terminal, VS Code | Coding assistant with base tools, agent tools, and MCP integration. Concise output, minimal overhead. |
| **General** | Office, desktop | Personal assistant for documents, spreadsheets, and presentations. Proactive with tools, conversational tone. |
| **Analytics** | Usage analysis | Query the local request analytics database to explore token usage, costs, latency, and model comparison. |
| **Memory** | Key point management | Browse, edit, and clean up cross-session key points stored in the project memory. |
| **Recall** | Session search | Search and review past chat sessions for decisions, context, and discussion history. |

The desktop app also installs a **Browser** workflow for the Chrome sidebar (tab, page content, bookmark, history, screenshot, and script execution access), a **Memo** workflow for personal reminders and notifications (with Apple Reminders sync on macOS), and a **Research** workflow for PDF-heavy study and analysis (PDF split, chunk reading, preview, and web search).

Create your own by dropping a markdown file in `~/.omx/workflows/` or `.omx/workflows/`. Each workflow is a markdown file with YAML frontmatter that defines the tool set and a body that becomes the system prompt:

```markdown
---
name: My Workflow
allowBuiltinTools: true
allowExternalTools: true
allowBuiltinAgents: true
allowExternalAgents: true
allowMcpTools: true
allowRemoteTools: true
---
Your system prompt here. Template variables like {{OS_TYPE}},
{{PLATFORM}}, {{ARCH}}, {{CWD}}, and {{TODAY}} are available.
```

Switch workflows at startup with `omx --workflow my-workflow` or save a default in OmniContext CLI's app config.

## Native Multi-Protocol

Each LLM API protocol has its own dedicated request builder and stream handler. Prompt caching, extended thinking, function calling, and other provider-specific features work in their native protocol shape. There is no translation layer. Anthropic requests are not converted into OpenAI format or vice versa.

| Protocol | Description |
|----------|-------------|
| **Anthropic** | Messages API with prompt caching, extended thinking, and streaming |
| **OpenAI** | Chat Completions API, compatible with any OpenAI-format endpoint |
| **Gemini** | generateContent API with native streaming and function calling |
| **Responses API** | OpenAI's Responses API with built-in tool orchestration |
| **Google Imagen** | Gemini generateContent with image output for image generation |
| **OpenAI Images** | OpenAI Images API (generations and edits) for image generation |

Provider-specific interceptors handle protocol and model-source quirks such as Anthropic next-gen/legacy models, DeepSeek, Responses API adjustments, Gemini legacy models, Kimi, MiniMax, OpenCode Go, generic OpenAI-compatible endpoints, xAI, Zhipu GLM, and Zenmux model routing without compromising the protocol.

When an image generation model is configured, workflows that allow the `ImageGen` tool can generate images directly from chat and keep the result as an artifact. For direct image work, Image Workshop opens with `omx --serve --image-workshop` and supports generation, edits with reference images and masks, result sessions, and artifact folder access.

One command to add all models from a provider:

```bash
omx --list-providers
omx --add-provider openrouter --api-key sk-...
omx --remove-provider openrouter
```

Built-in providers: **Zenmux**, **DeepSeek**, **Kimi for Coding**, **MiniMax**, **OpenCode Go**, **OpenRouter**, **Zhipu (GLM)**

## Atlas Navigation

The atlas is a persistent code navigation index for large or frequently revisited projects. Each map covers a concept, feature, or subsystem and links to the key files, directories, and symbols involved, so future sessions can jump straight to the important code instead of rediscovering it. The atlas is stored in `~/.omx/projects/<project-id>/atlas.sqlite` and exposed through the built-in `AtlasList`, `AtlasRead`, `AtlasUpdate`, and `AtlasDelete` tools.

Use the built-in `/save-atlas` skill to review the current session and save durable navigation knowledge after meaningful investigations or multi-file changes.

## Cross-Session Memory

Memory extraction runs automatically when a conversation is compacted. The model reflects on the session, pulls out key points, and evaluates existing ones. Each point carries a score that starts at 0 and shifts based on how useful it was in the conversation:

| Rating | Delta |
|--------|-------|
| Helpful | +3 |
| Neutral | -1 |
| Harmful | -6 |

Points that reach -10 or lower are pruned. This means good insights accumulate weight over multiple sessions while bad advice is flushed quickly and stale knowledge decays on its own. Every project keeps its memory in `~/.omx/projects/<project-id>/memory.json`. Edit it directly, use the built-in memory tools, or use the web client's memory panel for full control.

## Desktop & Integrations

Terminal is home base, but OmniContext CLI extends into every tool you use. The desktop app ties it all together as a lightweight server launcher that connects your IDE, browser, and Office apps to a single OmniContext CLI instance.

- **Desktop App** - workspace management, model configuration, proxy and approval settings, LAN access, memo and reminder system, PDF tools (split, chunk, preview via embedded pdfcpu), hook-driven desktop pets and completion notifications, and one-click server launch that bridges all the integrations below
- **VS Code Extension** - IDE integration with file context, diagnostics, and diff views
- **Chrome Extension** - sidebar on any webpage for summarization, data extraction, tab control, screenshots, and browser automation
- **Office Add-in** - AI panel inside Word, Excel, and PowerPoint
- **Web Client** - browser UI with login support, session rewind, LaTeX, Mermaid diagrams, file attachments, drag-and-drop, memory management, tool approval, and Image Workshop for desktop image generation and editing
- **Mobile Access** - run `omx --serve --host 0.0.0.0` and connect from your phone

## Extensibility

Custom workflows, agents, skills, hooks, external tools, MCP servers, and remote tool clients. Most extension points are markdown files, JSON configs, or small JavaScript modules.

- **Custom Workflows** - define your own system prompt and control exactly which tools are available: base tools, agents, MCP servers, and remote tools.
- **Custom Agentic Tools** - write a markdown file with a prompt template, parameter schema, and tool permissions. It becomes a callable agentic tool instantly. Add `AGENTS.md` for agent-specific instructions, or fall back to `OMX.md` project instructions automatically.
- **Custom Skills** - directory-based prompt capabilities invoked as slash commands (`/skill-name`). Skills inject instructions into the current conversation for domain-specific knowledge and workflows. Compatible with Claude Code skill format.
- **Model Prompts** - add markdown files with frontmatter in `~/.omx/model-prompts/` or `.omx/model-prompts/` to append extra system prompt text for matching model names.
- **External Tools** - drop JavaScript or ESM tool modules into `~/.omx/tools/` or `.omx/tools/` and they are registered alongside built-in tools.
- **MCP Servers** - connect external tools and data sources via Model Context Protocol. Stdio and HTTP transports supported.
- **Hooks** - run command or HTTP handlers on chat and tool lifecycle events. They can observe events like compaction and completion, or block prompts, selected tools, and compaction before they run.
- **Remote Tools** - Browser, Office, Desktop, and SDK-based clients can inject tools over HTTP long-poll. They show up as `Remote_<clientType>_<toolName>`.
- **Project Instructions** - drop an `OMX.md` or `CLAUDE.md` in your repo root and everyone on the team gets the same conventions and context.

## Documentation

**https://bluenoah1991.github.io/omni-context-cli-landing/docs/**
