Skip to main content
The Nia OpenCode plugin integrates Nia’s knowledge tools directly into OpenCode, providing automatic research triggers, context saving for cross-agent handoffs, and full MCP tool access.
Automatic Detection: The plugin detects when you need docs or research and prompts the agent to use Nia tools automatically.

Demo


Features

Research Triggers

Automatically detects when you need documentation or research and prompts the agent to use Nia.

Save for Later

Detects when you want to save context for cross-agent handoffs between sessions.

AGENTS.md Setup

Automatically adds Nia workflow instructions to your project’s agent configuration.

MCP Integration

Connects to Nia’s MCP server for full tool access including search, grep, and explore.

Installation

Install the plugin using bunx:
bunx nia-opencode@latest install
The installer will prompt for your API key and configure everything automatically.

Non-Interactive Installation

For automated setups or CI environments:
bunx nia-opencode@latest install --no-tui --api-key nk_xxx
Get your API key from app.trynia.ai.

Keyword Triggers

The plugin listens for specific keywords in your conversations to automatically trigger Nia tools.

Research Triggers

Use these phrases to trigger documentation and code research:
PhraseAction
research...Initiates Nia research
look up...Searches documentation
find docs...Finds relevant documentation
search codebase...Searches indexed repositories
grep for...Runs pattern search
index this repoIndexes current repository

Save Triggers

Use these phrases to save context for later or hand off to other agents:
PhraseAction
save this contextSaves current session context
continue laterPersists work for future sessions
hand off to CursorPrepares context for Cursor handoff
pick this up tomorrowSaves context for later continuation

Available Tools

Once installed, the following Nia tools are available in OpenCode:
ToolDescription
nia.searchSemantic search across repositories and documentation
nia.nia_researchAI-powered research with quick, deep, and oracle modes
nia.indexIndex repositories, documentation, or local folders
nia.nia_readRead files from indexed sources
nia.nia_grepRegex search in indexed code
nia.nia_exploreExplore file structures of indexed sources
nia.manage_resourceList, rename, or delete indexed resources
nia.contextCross-agent context sharing and retrieval


Need Help? Join our Discord community or reach out through app.trynia.ai for support.