ohana-cli
v0.1.3
Published
Official CLI for Ohana
Downloads
52
Readme
Ohana CLI
The official command-line interface for Ohana — an AI coding agent that reads, writes, and runs code directly in your terminal.
Installation
curl -fsSL https://ohanaai.dev/install | bashOr install directly via npm:
npm install -g ohana-cliRequires Node.js 18 or later.
Getting started
1. Login
ohana loginOpens your browser to complete authentication. Once authorized, credentials are saved to ~/.ohana/config.json.
2. Start a session
ohanaLaunches an interactive REPL. The agent can read and edit files in your current directory, run shell commands, search the web, and stream responses with syntax-highlighted markdown.
3. Run a single prompt
ohana "refactor this file to use async/await"
ohana --print "explain what this codebase does"Runs one prompt and exits — useful for scripting or quick one-off tasks.
CLI commands
| Command | Description |
| ---------------- | ------------------------------------ |
| ohana | Start an interactive chat session |
| ohana [prompt] | Run a single prompt and exit |
| ohana -p <msg> | Same as above (alias) |
| ohana login | Authenticate with your Ohana account |
| ohana logout | Remove stored credentials |
| ohana whoami | Show the currently logged-in user |
Session commands
Type these at the > prompt:
| Command | Description |
| -------- | ---------------------------------------- |
| /clear | Clear conversation history and start fresh |
| /exit | Exit the session (also Ctrl+C or Ctrl+D) |
| /quit | Alias for /exit |
Keyboard shortcuts
Input editing
| Shortcut | Action |
| ----------------- | --------------------------------------- |
| ← / → | Move cursor left / right |
| Home / Ctrl+A | Jump to start of line |
| End / Ctrl+E | Jump to end of line |
| Backspace | Delete character before cursor |
| Delete | Delete character after cursor |
| Ctrl+W | Delete word before cursor |
| Ctrl+U | Clear from cursor to beginning of line |
| Ctrl+K | Clear from cursor to end of line |
Multi-line input
| Shortcut | Action |
| ------------- | --------------------------------------------- |
| Alt+Enter | Insert a newline without sending |
| Paste (multi-line) | Collapsed to [Pasted N lines] badge — press Enter to send, Backspace to discard |
History
| Shortcut | Action |
| -------- | ----------------------------- |
| ↑ | Previous prompt in history |
| ↓ | Next prompt in history |
Navigating history saves your current draft and restores it when you arrow back down.
Session
| Shortcut | Action |
| -------- | ------ |
| Ctrl+C | Exit |
| Ctrl+D | Exit (on an empty prompt) |
What the agent can do
- Read files — views any file or a specific line range
- Edit files — creates, replaces, or inserts content with a live diff preview
- Run commands — executes shell commands and returns combined stdout/stderr
- Search files — finds files by glob pattern or searches content by regex
- Web fetch — retrieves and extracts text from any URL
- Web search — queries the web for real-time information
- Memory — persists notes and context across sessions in
~/.ohana/memory/ - Stream responses — renders markdown, code blocks with syntax highlighting, tables, bold/italic, and more in real time
Configuration
Credentials are stored at ~/.ohana/config.json with 600 permissions (owner read/write only). To switch accounts, run ohana logout then ohana login.
License
MIT
