onyx-cli
The skill queries an Onyx enterprise search platform to retrieve company documents and internal knowledge.
Identity proven by GitHub's verified organisation badge (greptileai)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode
- License
- MIT (permissive)
- Pin
- f5d66f3pinned Oct 9, 2026
- Context cost
- about 1,500 tokenswhen the skill loads
- GitHub stars
- 0on greptileai/demo-onyx
- Scripts
- 1 script
What it does
“Query the Onyx knowledge base using the onyx-cli command. Use when the user wants to search company documents, ask questions about internal knowledge, query connected data sources, or look up information stored in Onyx.”
Generated summary from the skill's own text
The skill queries an Onyx enterprise search platform to retrieve company documents and internal knowledge. It uses the onyx-cli command to search connected data sources like wikis, Confluence, Google Drive, and Slack. The agent can retrieve both plain text and structured JSON responses with citations.
When to use it
- User asks about company policies, processes, or internal documentation
- Need to search connected data sources like Confluence or Google Drive
- User explicitly requests to search Onyx or query internal knowledge
- Agent needs context from company wikis or connected applications
When not to
- Question is about general programming or open-source knowledge
- User is asking about code in the current repository
- Question does not require company-specific or internal data
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add greptileai/demo-onyx --skill onyx-cliInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install greptileai/demo-onyx onyx-cli@f5d66f389cb7fee12dfc5471fa6b82fe68b555adInstalls the commit we checked (f5d66f3).
Copy by hand
Download the folder at f5d66f3 and put it in .claude/skills/onyx-cli for Claude Code and in .agents/skills/onyx-cli for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "onyx-cli" by Greptile. Source, pinned to commit f5d66f389cb7fee12dfc5471fa6b82fe68b555ad: https://github.com/greptileai/demo-onyx/tree/f5d66f389cb7fee12dfc5471fa6b82fe68b555ad/cli/internal/embedded 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/onyx-cli/ for Claude Code and .agents/skills/onyx-cli/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/greptile/onyx-cli
SKILL.md at the pin
---
name: onyx-cli
description: Query the Onyx knowledge base using the onyx-cli command. Use when the user wants to search company documents, ask questions about internal knowledge, query connected data sources, or look up information stored in Onyx.
---
# Onyx CLI — Agent Tool
Onyx is an enterprise search and Gen-AI platform that connects to company documents, apps, and people. The `onyx-cli` CLI provides non-interactive commands to query the Onyx knowledge base and list available agents.
## Prerequisites
### 1. Check if installed
```bash
which onyx-cli
```
### 2. Install (if needed)
**Primary — pip:**
```bash
pip install onyx-cli
```
**From source (Go):**
```bash
go build -o onyx-cli github.com/onyx-dot-app/onyx/cli && sudo mv onyx-cli /usr/local/bin/
```
### 3. Check if configured
```bash
onyx-cli validate-config
```
This checks the config file exists, API key is present, and tests the server connection via `/api/me`. Exit code 0 on success, non-zero with a descriptive error on failure.
If unconfigured, you have two options:
**Option A — Interactive setup (requires user input):**
```bash
onyx-cli configure
```
This prompts for the Onyx server URL and API key, tests the connection, and saves config.
**Option B — Environment variables (non-interactive, preferred for agents):**
```bash
export ONYX_SERVER_URL="https://your-onyx-server.com" # default: https://cloud.onyx.app
export ONYX_API_KEY="your-api-key"
```
Environment variables override the config file. If these are set, no config file is needed.
| Variable | Required | Description |
| ----------------- | -------- | -------------------------------------------------------- |
| `ONYX_SERVER_URL` | No | Onyx server base URL (default: `https://cloud.onyx.app`) |
| `ONYX_API_KEY` | Yes | API key for authentication |
| `ONYX_PERSONA_ID` | No | Default agent/persona ID |
If neither the config file nor environment variables are set, tell the user that `onyx-cli` needs to be configured and ask them to either:
- Run `onyx-cli configure` interactively, or
- Set `ONYX_SERVER_URL` and `ONYX_API_KEY` environment variables
## Commands
### Validate configuration
```bash
onyx-cli validate-config
```
Checks config file exists, API key is present, and tests the server connection. Use this before `ask` or `agents` to confirm the CLI is properly set up.
### List available agents
```bash
onyx-cli agents
```
Prints a table of agent IDs, names, and descriptions. Use `--json` for structured output:
```bash
onyx-cli agents --json
```
Use agent IDs with `ask --agent-id` to query a specific agent.
### Basic query (plain text output)
```bash
onyx-cli ask "What is our company's PTO policy?"
```
Streams the answer as plain text to stdout. Exit code 0 on success, non-zero on error.
### JSON output (structured events)
```bash
onyx-cli ask --json "What authentication methods do we support?"
```
Outputs JSON-encoded parsed stream events (one object per line). Key event objects include message deltas, stop, errors, search-start, and citation payloads.
Each line is a JSON object with this envelope:
```json
{"type": "<event_type>", "event": { ... }}
```
| Event Type | Description |
| ------------------- | -------------------------------------------------------------------- |
| `message_delta` | Content token — concatenate all `content` fields for the full answer |
| `stop` | Stream complete |
| `error` | Error with `error` message field |
| `search_tool_start` | Onyx started searching documents |
| `citation_info` | Source citation — see shape below |
`citation_info` event shape:
```json
{
"type": "citation_info",
"event": {
"citation_number": 1,
"document_id": "abc123def456",
"placement": { "turn_index": 0, "tab_index": 0, "sub_turn_index": null }
}
}
```
`placement` is metadata about where in the conversation the citation appeared and can be ignored for most use cases.
### Specify an agent
```bash
onyx-cli ask --agent-id 5 "Summarize our Q4 roadmap"
```
Uses a specific Onyx agent/persona instead of the default.
### All flags
| Flag | Type | Description |
| ------------ | ---- | ---------------------------------------------- |
| `--agent-id` | int | Agent ID to use (overrides default) |
| `--json` | bool | Output raw NDJSON events instead of plain text |
## Statelessness
Each `onyx-cli ask` call creates an independent chat session. There is no built-in way to chain context across multiple `ask` invocations — every call starts fresh. If you need multi-turn conversation with memory, use the interactive TUI (`onyx-cli` or `onyx-cli chat`) instead.
## When to Use
Use `onyx-cli ask` when:
- The user asks about company-specific information (policies, docs, processes)
- You need to search internal knowledge bases or connected data sources
- The user references Onyx, asks you to "search Onyx", or wants to query their documents
- You need context from company wikis, Confluence, Google Drive, Slack, or other connected sources
Do NOT use when:
- The question is about general programming knowledge (use your own knowledge)
- The user is asking about code in the current repository (use grep/read tools)
- The user hasn't mentioned Onyx and the question doesn't require internal company data
## Examples
```bash
# Simple question
onyx-cli ask "What are the steps to deploy to production?"
# Get structured output for parsing
onyx-cli ask --json "List all active API integrations"
# Use a specialized agent
onyx-cli ask --agent-id 3 "What were the action items from last week's standup?"
# Pipe the answer into another command
onyx-cli ask "What is the database schema for users?" | head -20
```
From greptileai/demo-onyx at f5d66f3, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at f5d66f3Files
2 files, 6.3 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at f5d66f3More from Greptile
external-data-upload
Uploads test data files to Filebase IPFS storage using the S3 API, replacing them with .cid content links, and maintains a manifest file.
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.4K tokens · pinned 6 days ago
image-generation
This skill generates images using Google's Gemini API through text prompts or by modifying reference images with image-to-image mode.
Contains scripts
Claude Code, Codex, Cursor +3 · about 650 tokens · pinned 6 days ago
pptx
This skill enables agents to work with PowerPoint presentations through text extraction, visual analysis, template-based editing, and creation from scratch.
Contains scripts
Agents not labelled yet · about 2.2K tokens · pinned 6 days ago
Related in Productivity
suggest-automations
This skill suggests three relevant automations to users based on their team role and connected apps, then builds the chosen workflow using the build-workflow…
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 1.9K tokens · pinned 6 days ago
agent-mail-automation
This skill enables agents to automate email operations through Composio's Agent Mail toolkit via the Rube MCP server.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 700 tokens · pinned 6 days ago
inbox-manager
This skill transforms an overflowing inbox into a short prioritized list by reading email from Gmail, Microsoft 365, or pasted text, sorting messages into…
by AnthropicOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago
huggingface-papers
This skill retrieves and analyzes AI research papers from Hugging Face's paper index and arXiv by fetching paper content as markdown or structured metadata…
by Hugging FaceOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.2K tokens · pinned 6 days ago
curating-memory-palace
This skill lets the agent maintain a Memory Palace, a structured dashboard view that shows the user what the agent is working on, what it could do next, and…
by LettaOfficial publisher
Agents not labelled yet · about 3.1K tokens · pinned 6 days ago
scheduling-tasks
This skill lets you create and manage scheduled tasks using the letta cron CLI, sending prompts to the agent on a timer for reminders, periodic work, and…
by LettaOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago
Open roles at Greptile
5 of 6 open roles on the jobs board
- Product Engineer, Security
San Francisco, California, United States (On-site)
- Generalist Engineer
San Francisco, California, United States (On-site)
- Senior Generalist Engineer
San Francisco, California, United States (On-site)
- Infrastructure Engineer
San Francisco, California, United States (On-site)
- Staff Generalist Engineer
San Francisco, California, United States (On-site)