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

@h4rsharma/corine-cli

v0.1.1

Published

Terminal trading through the Corine safe-by-construction spine. Quote, buy, sell, deploy agents, and hit the kill switch — human-readable by default, --json on every command. Your keys stay local.

Readme

@h4rsharma/corine-cli

Terminal trading through the Corine safe-by-construction spine.

corine quotes, buys, sells, deploys agents, and hits the kill switch from your terminal — human-readable by default, --json on every command for scripts and agents. It is the same guarded spine as @h4rsharma/corine-core: your keys stay local, and the per-trade cap, daily cap, and kill switch apply to every trade by construction.

Install

npm install -g @h4rsharma/corine-cli

Requires Node 18+.

Configure

The CLI reads everything from the environment. Your keys never leave your machine — the CLI never ships or transmits a key.

export CORINE_RPC_URL="https://your-rpc-endpoint"          # required
export CORINE_KEYPAIR="$HOME/.config/solana/id.json"       # keyfile path OR base58 secret — stays local

| Env var | Purpose | Default | | ----------------------- | ----------------------------------------------------------- | ------- | | CORINE_RPC_URL | Your Solana RPC endpoint. Required. | — | | CORINE_KEYPAIR | Solana keyfile path or base58 secret. Required to trade. Stays local. | — | | CORINE_MAX_PER_TX_USD | Per-trade cap (USD). | 100 | | CORINE_DAILY_CAP_USD | Daily cap (USD). | 500 | | CORINE_JUPITER_KEY | Optional Jupiter portal key. | — | | CORINE_RUG_GATE | Set to 1 to enable the (optional) rug gate. | off | | CORINE_STATE_FILE | Where the durable state (idempotency + daily ledger) lives. | ~/.corine/state.json |

price and quote are read-only and work without a keypair. buy, sell, and agents run require CORINE_KEYPAIR.

Commands

corine quote     Preview a route (read-only)    --in <mint> --out <mint> --usd <n>
corine buy       Guarded buy                     --out <mint> --usd <n> [--in <mint>]
corine sell      Guarded sell (to USDC)          --in <mint> --usd <n>
corine price     Live USD price                  <mint>
corine kill      Kill switch                     on | off | status
corine deploy    Deploy an agent                 --type DCA --out <mint> --usd <n> [--interval <sec>]
corine agents    List / run agents               list | run <id>
corine help      Show help

Global flags

| Flag | Effect | | ---------------- | ----------------------------------------------------------------------- | | --json | Structured envelope on every command (for scripts/agents). | | --yes | Skip the confirmation prompt on money-moving actions. | | --quote-only | Preview a buy/sell without executing. | | --slippage <bps> | Slippage in basis points (default: dynamic, clamped 10–300). | | --in <mint> / --out <mint> / --usd <n> | Input mint, output mint, and USD size. |

Every command in --json mode emits the same envelope:

{ "ok": true, "command": "quote", "data": { } }
{ "ok": false, "command": "buy", "error": { "code": "over_caps", "message": "…" } }

Confirmation & --json

Money-moving actions (buy, sell) confirm by default — pass --yes to skip. Because a prompt can't be answered by a script, --json mode requires --yes: a money-moving --json command without --yes fails with a confirmation error rather than hanging.

Examples

Well-known mints used below: SOL = So11111111111111111111111111111111111111112, USDC = EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v.

Preview a route (read-only, no key needed):

corine quote --in So11111111111111111111111111111111111111112 \
             --out EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v \
             --usd 10 --json
{"ok":true,"command":"quote","data":{"inputMint":"So111...","outputMint":"EPjFW...","amountUsd":10,"inAmount":"...","outAmount":"..."}}

A buy blocked by the per-trade cap (default CORINE_MAX_PER_TX_USD=100):

corine buy --out <mint> --usd 999 --json --yes
{"ok":false,"command":"buy","data":{"status":"blocked","txHash":null,"slippageBps":50,"rugScore":null},"error":{"code":"over_caps","message":"Amount $999 exceeds the per-trade cap of $100."}}

The cap is enforced by the spine, not the CLI — the same block you'd get from the SDK. Raise it with CORINE_MAX_PER_TX_USD if that is genuinely your policy.

A human-readable buy (confirms first):

corine buy --out <mint> --usd 25
# BUY $25 of <mint…> from <wallet…>? (y/N) y
# ✓ buy executed — tx 5xR…
#   https://solscan.io/tx/5xR…

Preview without executing:

corine buy --out <mint> --usd 25 --quote-only
# [quote-only] buy $25: in … → out … (atomic). Nothing executed.

Live price:

corine price So11111111111111111111111111111111111111112
# $148.20

Kill switch — halt everything:

corine kill on
# Kill switch ON — all trades halted.

corine kill status
# Kill switch: ON (cli)

corine kill off
# Kill switch OFF — trading resumed.

While the kill switch is on, every buy/sell (and every agent tick) is blocked with kill_switch.

Deploy and run an agent:

corine deploy --type DCA --out <mint> --usd 5 --interval 3600
# ✓ Deployed DCA agent agent_1_...
#   Run a tick: corine agents run agent_1_...

corine agents list
corine agents run agent_1_...
# ✓ agent_1_... ticked — executed (5xR…)

Deployed strategies are saved to ~/.corine/agents.json; agents run <id> re-instantiates the strategy and runs one tick. Scheduling is your concern — the CLI runs a tick when you invoke it (wire corine agents run <id> into cron or a worker for a real cadence). See Deploy and monitor.

Same spine, keys local

The CLI builds a Corine from your env with a durable FileStore, then routes every trade through the identical guarded spine the SDK uses:

kill-switch → idempotency → mint-sanity → per-tx cap → daily cap →
SOL-for-fees → freshness → rug (optional) → leg dispatch

Your keypair is loaded locally and used to sign locally — it is never transmitted. This is custodial to your own machine: whoever can run the CLI with your CORINE_KEYPAIR can sign for that wallet. The caps + kill switch are your backstops. Full gate semantics: safety model.

License

Apache-2.0. See LICENSE.