npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dawnai/cli

v1.2.5

Published

User-facing Dawn CLI

Readme

@dawnai/cli

The Dawn CLI — build and run autonomous prediction market trading strategies from your terminal.

Requirements

  • Node.js 20+
  • Python 3.12+ (managed automatically via the bundled SDK)
  • OpenWallet (ows) for live trading

Install

npm install -g @dawnai/cli

Verify:

dawn --version

Quick Start

Option 1 — Run a template strategy (recommended)

No wallet needed. Runs with simulated funds in paper mode.

# 1. Authenticate
dawn auth login

# 2. Browse available templates
dawn template list

# 3. Launch a template in paper mode
dawn template launch <name> --name "my-run"

# 4. Monitor
dawn strategy logs <run_id> --tail 50

# 5. Stop
dawn strategy stop <run_id>

Option 2 — Build a strategy from scratch

# 1. Authenticate
dawn auth login

# 2. Explore SDK tools and docs
dawn tool docs polymarket
dawn tool run polymarket_event_search --input '{"query": "NBA finals", "limit": 5}'

# 3. Write a strategy and launch it
dawn strategy launch strategy.py --name "my-strategy"        # paper mode
dawn strategy launch strategy.py --name "my-strategy" --live # live mode

# 4. Monitor
dawn strategy logs <run_id> --tail 50

# 5. Stop
dawn strategy stop <run_id>

Commands

Auth

dawn auth login       # authenticate via browser (Google OAuth)
dawn auth status      # check current auth state
dawn auth logout      # clear stored credentials
dawn auth url [<url>] # view or set the API base URL

Wallet

Wallets are managed by OpenWallet (ows). Dawn stores your active wallet selection locally.

dawn wallet list                    # list all ows wallets
dawn wallet use <address-or-name>   # select active wallet
dawn wallet current                 # show active wallet + Polygon balances

Templates

Pre-built strategies ready to run. Downloaded to ~/.dawn-cli/templates/<name>.py — fully editable after download.

dawn template list                                   # browse available templates
dawn template launch <name> --name <run-name>         # download and run in paper mode
dawn template launch <name> --name <run-name> --live  # run live (requires funded wallet)

Modifying a template:

dawn template launch <name> --name <run-name>   # 1. download + launch
dawn strategy stop <run_id>                     # 2. stop
# edit ~/.dawn-cli/templates/<name>.py          # 3. change BUDGET_USD, logic, etc.
dawn strategy launch ~/.dawn-cli/templates/<name>.py --name <run-name>  # 4. relaunch

Strategy

Strategies are plain Python files with a time loop. They run as local background processes.

dawn strategy launch <strategy.py> --name <name> [--live]
dawn strategy list
dawn strategy logs <run_id> [--tail N]
dawn strategy stop <run_id>
dawn strategy positions <run_id>
  • Without --live, strategies run in paper mode — trades are simulated, no real funds used.
  • --live requires a wallet selected via dawn wallet use.
  • Each run gets a unique run_id. Multiple strategies can run simultaneously.
  • Budget is set in the strategy code via BUDGET_USD — the strategy enforces it, there is no CLI flag.

Portfolio

View and manage live on-chain positions.

dawn portfolio current                          # show active wallet balances + positions
dawn portfolio <wallet-address>                 # show positions for a specific address
dawn portfolio sell <token_id> [--amount <n>]   # sell a position (prompts for confirmation)
dawn portfolio redeem <token_id>                # redeem a resolved winning position

Tools

Browse and call Dawn SDK tools directly without writing a strategy.

dawn tool list                           # list all available tools
dawn tool run <tool_name> --input <json> # call a tool with JSON input
dawn tool docs                           # list available doc modules
dawn tool docs <module>                  # print full reference for a module

Available doc modules: overview, directive, polymarket, portfolio, crypto, social, sports, web, utils

Skills

Install Dawn skills for AI assistants (Claude Code, Gemini CLI, Codex CLI).

dawn skill list
dawn skill install [--force] [--dir <path>]

Update

dawn update   # install the latest version from npm + refresh SDK and skills

Writing Strategies

Strategies are plain Python files. The recommended pattern is a simple time loop:

import time
from decimal import Decimal
from dawnai.strategy.tools import polymarket_buy_token, read_portfolio, get_state, set_state

BUDGET_USD = Decimal("100")   # hard limit — strategy never spends more than this
ITERATIONS = 12               # run for ~1 hour
INTERVAL_SECONDS = 300        # 5 minutes between iterations

def run_once():
    # Budget guard — always check before buying
    total_invested = Decimal(str(get_state("total_invested") or "0"))
    remaining = BUDGET_USD - total_invested
    if remaining < Decimal("1"):
        print(f"Budget exhausted (${total_invested}/${BUDGET_USD}). Holding.")
        return

    # your strategy logic here

def main():
    print(f"Strategy starting | Budget: ${BUDGET_USD} (hard limit)")
    for i in range(ITERATIONS):
        print(f"[{i+1}/{ITERATIONS}] Running...")
        try:
            run_once()
        except Exception as e:
            print(f"Error: {e}")
        if i < ITERATIONS - 1:
            time.sleep(INTERVAL_SECONDS)

if __name__ == "__main__":
    main()

Run dawn tool docs directive for the full strategy coding guidelines, and dawn tool docs polymarket for the complete Polymarket tool reference.


Live Trading

Live trading uses OpenWallet (ows) for local key management — your private keys never leave your machine.

  1. Install ows and create a wallet:
    ows wallet create --name main
  2. Fund the wallet on Polygon:
    • USDC.e — the stablecoin used for trades. ⚠️ This is not the same as regular USDC. When funding, select the Polygon network and specifically USDC.e. Sending regular USDC will not work for trading.
    • POL — small amount needed for gas fees (~$1–2 is enough)
  3. Select the wallet in Dawn:
    dawn wallet use main
    dawn wallet current   # confirm balances
  4. Launch with --live:
    dawn strategy launch strategy.py --name "my-strategy" --live

When a trade executes, the API returns an unsigned EIP-1559 transaction. The CLI signs it locally via ows sign tx and broadcasts it directly to Polygon via RPC — no private keys are sent to the Dawn backend.


Environment Variables

| Variable | Description | |---|---| | DAWNAI_API_KEY | Auth token. Set automatically on dawn auth login. Can be set manually for headless/CI use. | | DAWN_LOCAL_WALLET_NAME | ows wallet name for live trading. Set automatically from dawn wallet use. | | DAWN_LOCAL_WALLET_ADDRESS | EOA address for the active wallet. Set automatically from dawn wallet use. | | DAWN_CLI_HOME | Override config directory (default: ~/.dawn-cli). |

File Locations

| Path | Description | |---|---| | ~/.dawn-cli/config.json | Auth token and active wallet selection | | ~/.dawn-cli/runs.json | Strategy run metadata (run_id, pid, mode, logs path) | | ~/.dawn-cli/logs/<run_id>.log | Per-run strategy output logs | | ~/.dawn-cli/templates/<name>.py | Downloaded template strategies | | ~/.dawn-cli/.venv/ | Python virtual environment with the Dawn SDK | | ~/.ows/bin/ows | OpenWallet CLI binary |