precog-cli
v0.2.1
Published
Interactive Precog CLI — Base MCP wallet, markets, positions, favorites
Readme
precog-cli
Terminal app for Precog prediction markets on Base and Arbitrum.
Browse markets, track positions, save favorites, and trade — all from your terminal. Your wallet connects through Base Account (no private keys stored here).
Quick start
Requirements: Node.js 20+ and a Base Account.
npm install -g precog-cli
precogTry it once without installing:
npx precog-cliFirst-time setup
- Run
precog. - Choose Login with Base wallet.
- Your browser opens for Base Account authorization.
- After approving, return to the terminal — you should see your wallet address.
- Choose Enter app to open the main menu.
Session is saved locally, so you usually only log in once. Use Log out / switch wallet to sign out or connect a different account.
Using the app
Main menu
After login:
| Option | What it does | |--------|----------------| | Check markets | Browse open markets on Base and Arbitrum, view prices, buy/sell | | Check my positions | See your holdings across both chains | | Check my favorite markets | Open markets you saved | | Log out / switch wallet | Sign out and clear the saved session | | Back to welcome | Return to the welcome screen |
Markets
The markets list merges Base and Arbitrum in one view with a Chain column.
Open any market to see:
- Leading outcome and probability
- Buy prices per outcome
- You hold column (when logged in)
From market detail you can Buy, Sell (if you hold shares), or Add to favorites.
Trading
- Open a market → Buy or Sell
- Pick an outcome and enter share count
- Review the quote and confirm
- Approve the transaction in Base Account (browser link if needed)
Trades run on the market’s chain. Base Account handles signing on both Base and Arbitrum.
You need collateral on the market’s chain (e.g. USDC on Arbitrum, MATE on Base).
Favorites
Add favorites from any market detail screen. They are stored on your machine at ~/.precog/favorites.json.
Command-line options
precog # arrow-key menus (default)
precog --typed # type 1, 2, 3… and press Enter
precog -t # shorthand for --typed
precog --help # show all flags
precog --version # show version| Mode | Flag | How to choose |
|------|------|----------------|
| Arrows (default) | (none) or --arrows | ↑↓ and Enter |
| Typed | --typed or -t | Type the option number and Enter |
Share counts and confirmations always use the keyboard.
Where data is stored
| File | Purpose |
|------|---------|
| ~/.precog/session.json | Logged-in wallet |
| ~/.precog/base-mcp.json | Base Account OAuth tokens |
| ~/.precog/favorites.json | Saved markets |
| ~/.precog/config.json | Optional settings (see below) |
Optional configuration
The Precog API key is included with the CLI. To use your own key:
Environment variable:
export PRECOG_API_KEY=your-key-here # macOS / LinuxConfig file (~/.precog/config.json):
{
"precogApiKey": "your-key-here"
}Updating
npm update -g precog-cliSupport
Questions or issues? Join the Precog Discord:
https://discord.com/invite/frgXQfM3KZ
Development
For contributors working from source:
git clone <repo-url>
cd precog-cli
npm install
npm run build
npm link # optional: global `precog` command
precogRun tests:
npm run checkPublish (maintainers):
npm run check
npm publish