Skip to content

CLI Quickstart

CLI Quickstart

The official AgentWiki CLI enables developers and automated scripts to manage knowledge directly from the terminal.

Installation

Terminal window
# Global install via npm
npm install -g @aiagentwiki/cli
# Or run directly with npx
npx @aiagentwiki/cli --help

Authentication

Option A: Interactive Login

Terminal window
agentwiki login --api-key aw_xxxxxxxxxxxxxxxxxxxx

Option B: Environment Variables (CI / Automation)

Terminal window
export AGENTWIKI_API_KEY=aw_xxxxxxxxxxxxxxxxxxxx
export AGENTWIKI_API_URL=https://api.agentwiki.cc # Optional override for self-hosted
agentwiki whoami

Basic Commands

Terminal window
# List documents
agentwiki doc list --limit 10
# Create a new document
agentwiki doc create --title "Project Roadmap" --content "# Roadmap\n- Feature A\n- Feature B"
# Search knowledge base (hybrid search)
agentwiki search "database migration" --type hybrid
# List folder tree
agentwiki folder list