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

@sentimentor/pinenode-cli

v0.1.0

Published

Sentimentor PineNode CLI — run PineNode strategies, fetch market data, optimize parameters, and deploy to paper/live trading from your terminal.

Readme

@sentimentor/pinenode-cli

The PineNode command-line interface. Run PineNode strategies, fetch market data, optimize parameters, and deploy to paper / live trading — all from your terminal.

Plan-aware. The CLI is part of every Sentimentor subscription. Pro runs local backtests against your own data; anything that calls a Sentimentor API (data fetch, sentimentor inputs, optimizer, cloud library, deploy) requires Elite or Trader; live deploy is Trader-only. See the plan matrix.

Install

npm install -g @sentimentor/pinenode-cli

This installs a sentimentor binary. The pinenode keyword is the CLI's namespace:

sentimentor pinenode help

(Plain sentimentor run ... also works — the pinenode prefix is optional.)

Authentication

The CLI is free to install. Most features need a Sentimentor account:

sentimentor pinenode login

That opens https://app.sentimentor.com/account/cli-tokens. Click Generate token, copy the value, paste it back at the CLI prompt. The token is stored in ~/.config/sentimentor/credentials.json (mode 600). To check what's saved:

sentimentor pinenode whoami

Sign out (revokes the token server-side too):

sentimentor pinenode logout

Commands

Backtest (pinenode run)

Local backtest against your own data — all plans (Pro, Elite, Trader):

sentimentor pinenode run strategy.pinenode --bars bars.json
sentimentor pinenode run strategy.pine     --bars bars.csv --capital 25000 --json

Fetched bars + optional Sentimentor inputs — Elite or Trader:

sentimentor pinenode run strategy.pinenode --ticker NVDA --days 365 --timeframe 1d
sentimentor pinenode run strategy.pinenode --ticker NVDA --sentimentor

Data (pinenode fetch)

Pull historical OHLCV bars to disk — Elite or Trader:

sentimentor pinenode fetch --ticker AAPL --days 730 --timeframe 1d --out aapl.json

Optimize (pinenode optimize)

Grid-search every pn.param(...) declaration in the strategy on Sentimentor's optimizer service — Elite or Trader:

sentimentor pinenode optimize strategy.pinenode --ticker NVDA --days 365
sentimentor pinenode optimize strategy.pinenode --ticker NVDA --grid grid.json --json

grid.json shape:

{
  "Fast Period": { "min": 5, "max": 50, "step": 5 },
  "Slow Period": { "min": 20, "max": 200, "step": 10 }
}

When --grid is omitted, the optimizer uses the bounds declared in each pn.param(...) call.

Cloud library (pinenode push / pull)

Round-trip strategies through your Sentimentor cloud library — Elite or Trader:

sentimentor pinenode push strategy.pinenode --name "NVDA EMA Cross"
sentimentor pinenode pull                         # list saved strategies
sentimentor pinenode pull <id> --out strat.pinenode

Deploy (pinenode deploy)

Paper trading — Elite or Trader:

sentimentor pinenode deploy strategy.pinenode --ticker NVDA --paper --capital 10000

Live trading — Trader (prompts for confirmation unless --yes):

sentimentor pinenode deploy strategy.pinenode --ticker NVDA --live --capital 5000 \
  --stop-loss-pct 2 --take-profit-pct 6 --position-size-pct 25 --yes

Stop a running deployment:

sentimentor pinenode deploy stop <deployment-id>

File formats

Strategies

| Extension | Treated as | |---|---| | .pinenode, .js, .ts | PineNode JS — executed as-is | | .pine | Pine v5 — auto-transpiled before execution; warnings are surfaced |

Bars

JSON:

[
  { "time": 1735689600000, "open": 100.5, "high": 101.2, "low": 100.1, "close": 100.8, "volume": 1234567 }
]

CSV (header required, columns order-independent):

time,open,high,low,close,volume
2024-01-02T09:30:00Z,100.5,101.2,100.1,100.8,1234567

time accepts Unix milliseconds, an integer string, or any ISO-8601 datetime.

Exit codes

| Code | Meaning | |---|---| | 0 | Command completed successfully | | 1 | Usage error / bad input | | 2 | Strategy failed to load (transpile / sandbox error) | | 3 | Backtest threw at runtime | | 4 | Upgrade required — your plan doesn't include this command | | 5 | Not logged in — run sentimentor pinenode login | | 6 | API error from api.sentimentor.com | | 99 | Unexpected CLI bug — please file an issue |

Environment overrides

| Variable | Default | Use case | |---|---|---| | SENTIMENTOR_API_BASE | https://api.sentimentor.com | Point at staging / dev environments | | SENTIMENTOR_WEB_BASE | https://app.sentimentor.com | Same, for the login URL | | NO_COLOR | 0 | Disable ANSI colors | | XDG_CONFIG_HOME | ~/.config | Move credentials file location |

Plan matrix

Sentimentor has three subscription tiers — Pro, Elite, and Trader. The CLI ships with every plan; what you can do with it scales with your tier. The general rule: anything that calls a Sentimentor API needs Elite or Trader, and live execution is Trader-only.

| Command | Pro | Elite | Trader | |---|---|---|---| | login / logout / whoami / help | ✓ | ✓ | ✓ | | run --bars <file> (local backtest) | ✓ | ✓ | ✓ | | run --ticker / fetch | — | ✓ | ✓ | | run --sentimentor | — | ✓ | ✓ | | optimize | — | ✓ | ✓ | | push / pull (cloud library) | — | ✓ | ✓ | | deploy --paper (ships in 2.2) | — | ✓ | ✓ | | deploy --live (ships in 2.2) | — | — | ✓ |

When the CLI tries to run a command your current tier doesn't include, it exits with code 4 and a colored "Upgrade required" message that links straight to billing.

License

Apache-2.0