jaspervault_cli
v1.0.26
Published
JasperVault CLI for interacting with the JasperVault Manager API
Maintainers
Readme
JasperVault CLI
Trade perpetuals on JasperVault through AI conversation. Install this CLI and connect your AI assistant (OpenClaw, Cursor, Claude Code) — then just talk to place orders, set take-profits, and manage positions without touching the command line.
Quick Start (OpenClaw)
1. Install the CLI
npm install -g jaspervault_cliVerify:
jv --version2. Install JasperVault Skill to OpenClaw
jv skill install --ai openclawThis installs the trading skill to ~/.openclaw/skills/jasper-vault-cli/SKILL.md. OpenClaw will now know how to trade on your behalf.
If the skill already exists, add
--forceto overwrite:jv skill install --ai openclaw --force
3. Initialize Your Wallet (One-Time Setup)
In OpenClaw, say:
"I want to start trading"
OpenClaw will call jv vault setup, which displays a QR code. Scan it with your mobile wallet (MetaMask Mobile, Rabby, etc.) and confirm the delegation signature on your phone. Done — no private key export required.
Or run it manually in the terminal:
jv vault setup --network jaspervault --pretty4. Start Trading
Just talk to OpenClaw. Examples:
- "Go long JBTC with 100 JUSDC, 50x leverage"
- "Set take-profit for order 99 at 105000"
- "Show my current positions"
Install for Other AI Platforms
jv skill install --ai cursor # Cursor (current project)
jv skill install --ai cursor --global # Cursor (user-level)
jv skill install --ai claude # Claude Code (current project)
jv skill install --ai claude --global # Claude Code (user-level)
jv skill install --ai all # All platforms at onceOptions:
--global— Install to user home instead of current project (cursor/claude only)--force— Overwrite existing skill file without prompting
Configuration
All configuration is done via environment variables. For most users, no configuration is needed — the CLI connects to the JasperVault test environment by default.
| Variable | Required | Description | Default |
|----------|----------|-------------|---------|
| JV_API_URL | No | Trading API base URL | https://trading-api-test.jaspervault.pro |
| JV_API_KEY | No | Bearer token for API authentication | — |
| JV_TIMEOUT | No | Request timeout in ms | 30000 |
| JV_DELEGATION_KEY | No | Delegation wallet private key override; auto-generated on first vault init | from ~/.jaspervault/keys.json |
| JV_BASE_RPC_URL | No | Base chain RPC URL override (for deposit) | built-in |
| JV_JASPERVAULT_RPC_URL | No | JasperVault chain RPC URL override | built-in |
| JV_SUBGRAPH_URL | No | Subgraph endpoint override | built-in per network |
| WC_PROJECT_ID | No | WalletConnect Cloud project ID (get one at cloud.reown.com) | — |
| PRIVATE_KEY | No* | EOA wallet private key; when set, deposit and vault init execute directly without WalletConnect | — |
* Not required when using the WalletConnect flow (vault setup, deposit).
Connecting to a Different Environment
Add to ~/.zshrc or ~/.bashrc:
export JV_API_URL=https://your-api-endpoint.example.comThen restart your terminal or run source ~/.zshrc.
How Credentials Are Stored
After the first successful jv vault init or jv vault setup, the delegation wallet is saved to ~/.jaspervault/keys.json and your vault profile to ~/.jaspervault/profile.json. The CLI reads these automatically — no manual configuration needed for subsequent operations.
Funding Your Account (Optional)
To deposit tokens from Base to JasperVault, tell OpenClaw:
"Deposit 100 JUSDC into my vault"
Or run it directly:
jv deposit --token jusdc --amount 100 --prettyThe CLI auto-detects how to sign:
PRIVATE_KEYset → signs and sends the transaction directly- No
PRIVATE_KEY→ displays a WalletConnect QR code; scan with your mobile wallet to approve on your phone
Full Command Reference
For a complete list of available commands and trading examples, see the documentation:
- User Guide — Full CLI reference including all commands and options
- OpenClaw Setup Guide — Detailed walkthrough for OpenClaw users
Development
cd cli
npm install
npm run build
npm link # makes `jv` available globally from local source
npm run typecheck # TypeScript type checking
npm test # Run tests
npm run dev -- orders list --pretty # Run via tsx without building