Project: oh-my-onpremcode
Author: sionic-ai
Description: On-premise OpenCode plugin with local inference support for air-gapped environments
Fork of oh-my-opencode designed for enterprise on-premise deployments. Supports vLLM (Kubernetes) and Ollama for local inference. All internet-dependent features auto-disable in on-prem mode.
oh-my-onpremcode/
├── src/
│ ├── agents/ # AI agents (7): Sisyphus, oracle, librarian, explore, frontend, document-writer, multimodal-looker
│ ├── hooks/ # 21 lifecycle hooks - see src/hooks/AGENTS.md
│ ├── tools/ # LSP, AST-Grep, Grep, Glob, etc. - see src/tools/AGENTS.md
│ ├── mcp/ # MCP servers (disabled in onprem mode)
│ ├── inference/ # Local inference clients (vLLM, Ollama)
│ ├── features/ # Claude Code compatibility - see src/features/AGENTS.md
│ ├── config/ # Zod schema, TypeScript types
│ ├── auth/ # Google OAuth (disabled in onprem mode)
│ ├── shared/ # Utilities: deep-merge, pattern-matcher, logger, project-info
│ └── index.ts # Main plugin entry
├── script/ # build-schema.ts, publish.ts, generate-changelog.ts
├── assets/ # JSON schema
└── dist/ # Build output (ESM + .d.ts)
| File |
Purpose |
src/inference/vllm.ts |
vLLM client (OpenAI-compatible API) |
src/inference/ollama.ts |
Ollama client |
src/inference/index.ts |
InferenceManager with auto-failover |
src/config/schema.ts |
OnPremConfigSchema, VllmConfigSchema, etc. |
src/shared/project-info.ts |
Centralized project constants |
| Task |
Location |
Notes |
| Add agent |
src/agents/ |
Create .ts, add to builtinAgents in index.ts |
| Add hook |
src/hooks/ |
Create dir with createXXXHook() |
| Add tool |
src/tools/ |
Dir with index/types/constants/tools.ts |
| Modify inference |
src/inference/ |
vllm.ts, ollama.ts, index.ts |
| Config schema |
src/config/schema.ts |
Run bun run build:schema after changes |
| Project constants |
src/shared/project-info.ts |
Package name, org, URLs |
- Package manager: Bun only (
bun run, bun build, bunx)
- Types: bun-types (not @types/node)
- Build: Dual output -
bun build (ESM) + tsc --emitDeclarationOnly
- Exports: Barrel pattern -
export * from "./module" in index.ts
- Directory naming: kebab-case (
ast-grep/, claude-code-hooks/)
- Config file:
oh-my-onpremcode.json
{
"onprem": {
"mode": "onprem",
"vllm": {
"endpoints": [{ "url": "http://vllm:8000/v1", "model": "llama-3-70b" }],
"k8s_namespace": "default",
"k8s_service_name": "vllm-service",
"auto_discover": true
},
"ollama": {
"enabled": true,
"host": "localhost",
"port": 11434
},
"model_mapping": {
"anthropic/claude-opus-4-5": "meta-llama/Llama-3.1-70B-Instruct"
},
"branding": {
"company_name": "Sionic AI",
"welcome_message": "Welcome to Sionic AI"
}
}
}
| Feature |
Reason |
| context7 MCP |
Requires internet |
| websearch_exa MCP |
Requires internet |
| grep_app MCP |
Requires internet |
| Google OAuth |
Requires internet |
| Auto-update |
Requires npm registry |
bun install # Install dependencies
bun run build # ESM + declarations + schema
bun run build:schema # Schema only
bun test # Run tests
- Config locations:
- User:
~/.config/opencode/oh-my-onpremcode.json
- Project:
.opencode/oh-my-onpremcode.json
- OpenCode: Requires >= 1.0.150
- vLLM: OpenAI-compatible API on
/v1/chat/completions
- Ollama: Native API on
/api/chat