pillar-cli
v0.1.5
Published
CLI for Pillar — install, sync tools, manage knowledge, and test your AI copilot from the terminal
Maintainers
Readme
Pillar CLI
Command-line tool for Pillar — install the SDK, sync tools, manage knowledge sources, and test your AI copilot from the terminal.
npx pillar-cli initInstall
Run directly with npx (recommended):
npx pillar-cli <command>Or install globally:
npm install -g pillar-cli
pillar <command>Commands
pillar init
Set up Pillar in your project. Detects your framework, installs the SDK, generates provider and tool files, syncs tools, and creates knowledge sources from your docs.
npx pillar-cli initWhat it does:
- Detects your framework (Next.js, Vite+React, Vue, Angular, vanilla)
- Installs the correct SDK package
- Creates provider wrapper, starter tools, and
.env.local - Creates a sync secret and runs an initial tool sync
- Detects docs URLs in your project and creates knowledge sources (indexing starts in the background)
When authenticated, init provisions everything needed so pillar doctor passes. Without authentication, it writes placeholder values and tells you the remaining steps.
pillar sync
Scan your codebase for tool definitions and sync them to Pillar's backend.
pillar sync --scan ./src # One-time sync
pillar sync --scan ./src --watch # Watch and re-sync on change
pillar sync --scan ./src --force # Force sync even if unchanged
pillar sync status --scan ./src # Compare local vs remoteReads PILLAR_SLUG and PILLAR_SECRET from environment variables, ~/.pillar/config.json, or .env.local.
pillar knowledge
Manage knowledge sources — docs sites, help centers, and other content the copilot uses to answer questions.
pillar knowledge add https://docs.myapp.com
pillar knowledge list
pillar knowledge status <source-id>
pillar knowledge sync <source-id> # Re-crawl
pillar knowledge remove <source-id>pillar doctor
Check the health of your Pillar integration.
pillar doctorValidates: product key, sync secret (catches placeholder values), SDK version, tool sync status, knowledge source health, and embed config reachability.
pillar chat
Test your copilot from the terminal.
pillar chat "how do I export my data?" # Single question
pillar chat # Interactive mode
pillar chat --conversation <id> # Resume conversationpillar auth
Manage authentication for commands that need it (init, knowledge).
pillar auth login
pillar auth status
pillar auth logoutConfiguration
The CLI reads configuration from multiple sources (in priority order):
- Environment variables —
PILLAR_SLUG,PILLAR_SECRET,PILLAR_API_URL - Config file —
~/.pillar/config.json(created bypillar auth loginandpillar init) - Project env —
.env.localin the current directory
Migrating from pillar-sync in @pillar-ai/sdk
The pillar-sync command previously shipped with @pillar-ai/sdk. It continues to work, but new features (watch mode, status, config file) are only in this CLI.
To migrate, change your CI from:
npx -y -p @pillar-ai/sdk@latest pillar-sync --scan ./srcTo:
npx pillar-cli sync --scan ./srcCI/CD
Set PILLAR_SLUG and PILLAR_SECRET as environment variables in your CI provider, then:
# GitHub Actions
- name: Sync tools
run: npx pillar-cli sync --scan ./src
env:
PILLAR_SLUG: ${{ secrets.PILLAR_SLUG }}
PILLAR_SECRET: ${{ secrets.PILLAR_SECRET }}Development
git clone https://github.com/doublehq/pillar
cd pillar/packages/cli
npm install
npm run dev # Stub build for development
npm run build # Production build
npm test # Run testsLicense
MIT
