{"_id":"@deemwario/algofic-smart-stock","name":"@deemwario/algofic-smart-stock","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@deemwario/algofic-smart-stock","version":"0.1.0","description":"smartstock — CLI for the algofic SmartStock product (BUY / SWING / EXIT / FILING / portfolio).","type":"module","bin":{"smartstock":"dist/smartstock.js"},"scripts":{"start":"node bin/smartstock.js","test":"node --test test/*.test.js","build":"node scripts/build.mjs","prepublishOnly":"npm test && npm run build"},"engines":{"node":">=18"},"dependencies":{"chalk":"^5.3.0","cli-table3":"^0.6.5","commander":"^12.1.0","open":"^10.1.0"},"devDependencies":{"esbuild":"^0.24.2"},"keywords":["smartstock","algofic","nse","trading","cli"],"license":"SEE LICENSE IN LICENSE","private":false,"publishConfig":{"access":"public"},"homepage":"https://smartstock.algofic.com","_id":"@deemwario/algofic-smart-stock@0.1.0","gitHead":"2832835125962d90208f633959e471579b7c19a5","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-M2Iwz6MfY9P85i44dMHOerDBMGooX2QFAg+Fcq6CoQKbzTHB8k4i4Nq18QEbFBWiYvYQQxXA/aL6u1b4iFP0MQ==","shasum":"c2938ff186ff88b1b4b0aacaa5a7054e7d17d48c","tarball":"https://registry.npmjs.org/@deemwario/algofic-smart-stock/-/algofic-smart-stock-0.1.0.tgz","fileCount":4,"unpackedSize":125360,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDPhPTHIPkRYtbwTaGixjiwKKU2jUlpI03jOrm4WVeiqgIgFCPDj25O8EDBs5HP+37MRwXcIPmymhH0m5kHjrl0rgk="}]},"_npmUser":{"name":"deemwarhq","email":"admin@deemwar.com"},"directories":{},"maintainers":[{"name":"deemwarhq","email":"admin@deemwar.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/algofic-smart-stock_0.1.0_1780659514243_0.7484888270507548"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-05T11:38:34.079Z","0.1.0":"2026-06-05T11:38:34.356Z","modified":"2026-06-05T11:38:34.928Z"},"maintainers":[{"name":"deemwarhq","email":"admin@deemwar.com"}],"description":"smartstock — CLI for the algofic SmartStock product (BUY / SWING / EXIT / FILING / portfolio).","homepage":"https://smartstock.algofic.com","keywords":["smartstock","algofic","nse","trading","cli"],"license":"SEE LICENSE IN LICENSE","readme":"# smartstock\n\nCommand-line client for the **SmartStock** product at\n[smartstock.algofic.com](https://smartstock.algofic.com) — pre-open\nNSE forecasts (BUY composite, SWING bands), live exit alerts,\nfiling alerts, and per-user portfolio tracking.\n\nClosed-source distribution — see `LICENSE`.\n\n## Install\n\n```sh\nnpm install -g @deemwario/algofic-smart-stock\n\n# verify\nsmartstock --help\n```\n\nRequires Node.js ≥ 18.\n\n## First-time login\n\n```sh\nsmartstock login\n```\n\nBrowser-redirect flow — opens the SmartStock login page in your default\nbrowser, you sign in with your account, the CLI receives the session\ntoken via a one-shot loopback callback on `127.0.0.1:18001`, then\nsaves it to `~/.config/stock-core/smartstock_token.json` (`chmod 600`).\nRe-run `smartstock login` when the token expires (~24h).\n\n## Commands\n\n```sh\nsmartstock morning              # SPY overlay + top-10 BUY + widest SWING + exits + filings\nsmartstock buy                  # BUY composite picks (h10 + h20)\nsmartstock swing [TICKER]       # all SWING bands, or filter to one ticker\nsmartstock swings               # today's highest-expected-swing names\nsmartstock exits                # today's active exit alerts\nsmartstock filings              # reactive + predictive filing alerts\nsmartstock watch                # poll the morning brief every 30s, print diffs\nsmartstock gather               # snapshot every product endpoint to JSON\nsmartstock gather --include-public --out ./snap-2026-06-05\n```\n\n`gather` writes one JSON file per endpoint plus a `_meta.json` run\nsummary — useful for one-shot snapshots and for feeding the data into\ndownstream tooling (`pandas`, `jq`, your own scripts).\n\n### Portfolio\n\n```sh\nsmartstock portfolio                                # list positions\nsmartstock portfolio add TCS 250000                 # 2.5L position\nsmartstock portfolio add TCS 250000 --cost 3450.50  # with cost basis\nsmartstock portfolio add TCS 250000 --notes \"core\"  # free-form notes\nsmartstock portfolio remove TCS                     # close out\nsmartstock portfolio metrics --window 30            # realized return / win rate / alpha\nsmartstock portfolio history                        # event + trade log\n```\n\n### Admin (admin accounts only)\n\n```sh\nsmartstock admin users\nsmartstock admin user create alice@x.com\nsmartstock admin user create bob@x.com --name Bob --admin\nsmartstock admin user reset alice@x.com\nsmartstock admin user deactivate alice@x.com\nsmartstock admin user sessions alice@x.com\nsmartstock admin user logout alice@x.com\n```\n\nNon-admin callers get a clear `403 (forbidden — admin-only?)`.\nPassword prompts read silently from the TTY; set\n`SMARTSTOCK_ADMIN_PASSWORD` for non-interactive flows.\n\n## Environment\n\n| Variable                       | Default                              | Purpose                                       |\n|--------------------------------|--------------------------------------|-----------------------------------------------|\n| `SMARTSTOCK_HOST`              | `https://apismartstock.algofic.com`  | Backend API base URL (override for dev)       |\n| `SMARTSTOCK_ADMIN_PASSWORD`    | —                                    | Skip the admin-password prompt                |\n\n## Token storage\n\n```\n~/.config/stock-core/           drwx------\n~/.config/stock-core/smartstock_token.json   -rw-------\n```\n\nTokens are never echoed to stdout — only the username is printed after\na successful login.\n\n## Support\n\nIssues, billing, account requests: `admin@deemwar.com`\n","readmeFilename":"README.md","_rev":"1-585af82914c527ffe87bb8dbf7517bf3"}