Get Started with the CLI¶
This tutorial is a first value path, not just setup. You will:
- Initialize Sage locally.
- Connect a wallet.
- Discover existing skills/libraries.
- Create a local library and add a prompt.
- Prepare for publish/governance actions.
Tested with sage 0.9.23 (March 5, 2026).
Prerequisites¶
- Node.js v18+
- npm v8+
Step 1: Install and initialize Sage¶
Optional diagnostics:
Step 2: Connect your wallet (Privy)¶
Browser flow:
Headless/device-code flow:
Verify:
Step 3: Discover useful capabilities first¶
Before publishing anything, discover what already exists:
sage search "code review" --search-type skills --scope both --limit 5
sage library discover --limit 10
sage suggest skill "improve prompt workflow"
Step 4: Create a local library and add your first prompt¶
Create a new library:
sage library create "my-first-library" --description "Starter library"
sage library use "my-first-library" --only
Create a prompt file:
mkdir -p prompts
cat > prompts/my-first-prompt.md <<'EOF'
# My First Prompt
Goal: Help improve workflow quality.
Steps:
1. Clarify objective
2. Propose options
3. Return concise recommendation
EOF
Add the prompt to your library:
sage library prompt add my-first-prompt --library "my-first-library" --file prompts/my-first-prompt.md
sage library prompt list --library "my-first-library"
Step 5: Prepare to publish and govern¶
Preview publishing cost/impact:
For governance actions (DAO create, proposal vote), ensure you have testnet SXXX and delegation:
Then move to DAO/governance guides:
What you now have¶
- A working Sage CLI environment
- Wallet-connected session
- Discovery workflow for existing skills/libraries
- A local library with your first prompt
- A clean path into publish/governance flows