Skip to main content
The Nia skill for Clawdbot provides direct API access to Nia for indexing and searching code repositories, documentation, research papers, and HuggingFace datasets.
Shell-Based Integration: Uses lightweight shell scripts with curl and jq for maximum compatibility and portability.

Features

Repository Indexing

Index GitHub repositories and search through code with semantic and regex search.

Documentation Search

Index entire documentation sites and search across all pages.

Research Papers

Index arXiv papers by ID, URL, or PDF link for AI-powered research.

HuggingFace Datasets

Index and search HuggingFace datasets by name or URL.

Installation

1. Get Your API Key

Either run the guided wizard:
npx nia-wizard@latest
Or sign up at trynia.ai to get your key.

2. Store the Key

mkdir -p ~/.config/nia
echo "your-api-key-here" > ~/.config/nia/api_key

3. Requirements

  • curl
  • jq
Most systems have these pre-installed. On macOS, install with brew install jq if needed.

Nia-First Workflow

Before using web fetch or web search, you should:
  1. Check indexed sources first using repos-list.sh or sources-list.sh
  2. If source exists: Use search-universal.sh, repos-grep.sh, sources-read.sh for targeted queries
  3. If source doesn’t exist but you know the URL: Index it with repos-index.sh or sources-index.sh, then search
  4. Only if source unknown: Use search-web.sh or search-deep.sh to discover URLs, then index
Why this matters: Indexed sources provide more accurate, complete context than web fetches. Web fetch returns truncated/summarized content while Nia provides full source code and documentation.

Available Scripts

All scripts are in ./scripts/. Base URL: https://apigcp.trynia.ai/v2

Repositories

ScriptDescription
repos-list.shList indexed repos
repos-index.sh "owner/repo" [branch]Index a repo
repos-status.sh "owner/repo"Get repo status
repos-tree.sh "owner/repo" [branch]Get repo tree
repos-read.sh "owner/repo" "path/to/file"Read file
repos-grep.sh "owner/repo" "pattern"Grep code

Data Sources (Docs, Papers, Datasets)

ScriptDescription
sources-list.sh [type]List sources (documentation, research_paper, huggingface_dataset)
sources-index.sh "https://docs.example.com"Index docs
sources-tree.sh "source_id_or_name"Get source tree
sources-read.sh "source_id" "/path"Read from source
sources-grep.sh "source_id" "pattern"Grep content

Research Papers (arXiv)

ScriptDescription
papers-list.shList indexed papers
papers-index.sh "2312.00752"Index paper (ID, URL, or PDF URL)

HuggingFace Datasets

ScriptDescription
datasets-list.shList indexed datasets
datasets-index.sh "squad"Index dataset (name, owner/dataset, or URL)
ScriptDescription
search-universal.sh "query"Search ALL indexed sources
search-web.sh "query" [num_results]Web search
search-deep.sh "query"Deep research (Pro)
ScriptDescription
package-grep.sh "npm" "react" "pattern"Grep package (npm, py_pi, crates_io, golang_proxy)
package-hybrid.sh "npm" "react" "query"Semantic search in packages

Oracle Research (Pro)

ScriptDescription
oracle.sh "research query"Run autonomous research
oracle-sessions.shList research sessions

API Reference

TypeEndpointIdentifier Examples
RepositoryPOST /repositoriesowner/repo, microsoft/vscode
DocumentationPOST /data-sourceshttps://docs.example.com
Research PaperPOST /research-papers2312.00752, arXiv URL
HuggingFace DatasetPOST /huggingface-datasetssquad, owner/dataset


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