Documentation
Contents
Installation
curl -sSL onnai.ai/install | sh
This installs the onnai CLI and onnaid daemon. Works on macOS and Linux.
Quick Start
# Link your account
onnai --dropin you@example.com
# Basic usage
onnai "your prompt"
# Pipe anything
cat file.txt | onnai "summarize"
Working with Mimics
Mimics are specialized AI personas. Add them with --add, remove with --drop.
# Add a Mimic
onnai --add Coder
# Use it (symlink created automatically)
Coder "review this function"
# List your Mimics
onnai --list
# Remove a Mimic
onnai --drop Coder
Context Files
Drop a .context file in any directory. Onnai walks up the tree and includes it automatically.
# .context example
Python 3.11 project using FastAPI and PostgreSQL.
Follow PEP 8. Prefer type hints. Use async where possible.
Custom Personas
Create your own Mimics with .persona files.
# reviewer.persona
# DIRECTIVES
- You are a senior code reviewer
- Be thorough but constructive
- Focus on security and performance
- Suggest specific improvements
Bring Your Own Key
Set environment variables for your preferred provider:
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
export CEREBRAS_API_KEY=...
Then use the -p flag:
onnai -p anthropic "your prompt"
onnai -p mlx -m llama3 "your prompt"
Chat Mode
Run onnai without arguments to enter chat mode.
onnai
> what's using all my disk space?
...
> /exit
Chat history is saved to .chat in the current directory.