{"_id":"@apoorvdarshan/xscore","_rev":"3-8ff1b54db7772dab9eb30892b488da90","name":"@apoorvdarshan/xscore","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@apoorvdarshan/xscore","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@apoorvdarshan/xscore@1.0.0","maintainers":[{"name":"apoorvdarshan","email":"apoorvdarshan@gmail.com"}],"homepage":"https://github.com/apoorvdarshan/Xscore#readme","bugs":{"url":"https://github.com/apoorvdarshan/Xscore/issues"},"bin":{"xscore":"bin/cli.js"},"dist":{"shasum":"e40845ccc5fac218722d0306afda102d54d59d1e","tarball":"https://registry.npmjs.org/@apoorvdarshan/xscore/-/xscore-1.0.0.tgz","fileCount":8,"integrity":"sha512-THg1DcvMiadvdjfTi25DOP5XFiR9igq3mKyEe79Oedn7Ho6rjSvYo7jyhG2E+v5JGl5VbnP62es+VkupYfU5WQ==","signatures":[{"sig":"MEQCIDewbaHRktXMjvlL7OALs6swnm/wqUjk26G93mYa6j3OAiAF/QkwcBBzYl4IKxgveXoqQndcUm9gL5xYa85q35IZMw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38877},"main":"index.js","type":"module","gitHead":"6447be569e5956c66776e0c9f805aa7d155d6d3f","scripts":{"dev":"next dev","lint":"next lint","build":"next build","start":"next start"},"_npmUser":{"name":"apoorvdarshan","email":"apoorvdarshan@gmail.com"},"repository":{"url":"git+https://github.com/apoorvdarshan/Xscore.git","type":"git"},"_npmVersion":"11.11.0","description":"Analyze any X (Twitter) account against the [open-source X recommendation algorithm](https://github.com/xai-org/x-algorithm). Run one command, get your score.","directories":{},"_nodeVersion":"25.8.1","dependencies":{"tsx":"^4.21.0","next":"^16.1.7","pako":"^2.1.0","react":"^19.2.4","motion":"^12.38.0","postcss":"^8.5.8","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.5.0","tailwindcss":"^4.2.1","@types/react":"^19.2.14","@steipete/bird":"^0.8.0","html2canvas-pro":"^2.0.2","@vercel/analytics":"^2.0.1","@tailwindcss/postcss":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/pako":"^2.0.4"},"_npmOperationalInternal":{"tmp":"tmp/xscore_1.0.0_1773823812601_0.46161728318225226","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is no longer maintained and has been archived."},"1.0.1":{"name":"@apoorvdarshan/xscore","version":"1.0.1","keywords":["x","twitter","algorithm","score","engagement","analytics","cli"],"author":{"name":"Apoorv Darshan"},"license":"ISC","_id":"@apoorvdarshan/xscore@1.0.1","maintainers":[{"name":"apoorvdarshan","email":"apoorvdarshan@gmail.com"}],"homepage":"https://github.com/apoorvdarshan/Xscore#readme","bugs":{"url":"https://github.com/apoorvdarshan/Xscore/issues"},"bin":{"xscore":"bin/cli.js"},"dist":{"shasum":"2ee031c41d8d4ee34ad15940a22af6134af6bab7","tarball":"https://registry.npmjs.org/@apoorvdarshan/xscore/-/xscore-1.0.1.tgz","fileCount":8,"integrity":"sha512-51SWu/H3UgzVto9PUqBwAaRt+MU1DvmJCgy4O3VvwLbxfJKDnyCulu97Jkks0jWU2L2Gw5PZa8fGUj9zlf9YyQ==","signatures":[{"sig":"MEUCIQClSQ15Y/iCC7vvWFuRR7VQcoXjK0s9mPyJwtSlX/suhgIgMeeFGXKtQcuImNPFPhEdrEqkESBQ6IlYL8SPmvsnMpQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39649},"main":"src/lib/algorithm.ts","type":"module","gitHead":"601bacf7ae470faea0a31ce6d71d3ad4258bb318","scripts":{"dev":"next dev","lint":"next lint","build":"next build","start":"next start"},"_npmUser":{"name":"apoorvdarshan","email":"apoorvdarshan@gmail.com"},"repository":{"url":"git+https://github.com/apoorvdarshan/Xscore.git","type":"git"},"_npmVersion":"11.11.0","description":"Analyze any X (Twitter) account against the open-source recommendation algorithm. CLI tool — run npx @apoorvdarshan/xscore @username","directories":{},"_nodeVersion":"25.8.1","dependencies":{"tsx":"^4.21.0","next":"^16.1.7","pako":"^2.1.0","react":"^19.2.4","postcss":"^8.5.8","react-dom":"^19.2.4","typescript":"^5.9.3","@types/node":"^25.5.0","tailwindcss":"^4.2.1","@types/react":"^19.2.14","@steipete/bird":"^0.8.0","@vercel/analytics":"^2.0.1","@tailwindcss/postcss":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/pako":"^2.0.4"},"_npmOperationalInternal":{"tmp":"tmp/xscore_1.0.1_1773824474972_0.014380950283790384","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is no longer maintained and has been archived."}},"time":{"created":"2026-03-18T08:50:12.524Z","modified":"2026-07-01T07:07:05.177Z","1.0.0":"2026-03-18T08:50:12.747Z","1.0.1":"2026-03-18T09:01:15.110Z"},"bugs":{"url":"https://github.com/apoorvdarshan/Xscore/issues"},"author":{"name":"Apoorv Darshan"},"license":"ISC","homepage":"https://github.com/apoorvdarshan/Xscore#readme","keywords":["x","twitter","algorithm","score","engagement","analytics","cli"],"repository":{"url":"git+https://github.com/apoorvdarshan/Xscore.git","type":"git"},"description":"Analyze any X (Twitter) account against the open-source recommendation algorithm. CLI tool — run npx @apoorvdarshan/xscore @username","maintainers":[{"name":"apoorvdarshan","email":"apoorvdarshan@gmail.com"}],"readme":"# xscore\n\nAnalyze any X (Twitter) account against the [open-source X recommendation algorithm](https://github.com/xai-org/x-algorithm). Run one command, get your score.\n\n## Quick Start\n\n```bash\nnpx -y @apoorvdarshan/xscore @username\n```\n\nThat's it. Fetches tweets locally, scores 19 engagement signals, and opens a shareable results page in your browser.\n\n**Prerequisites:**\n- Node.js 18+\n- Logged into [x.com](https://x.com) in Chrome, Edge, or Brave (uses browser cookies via [@steipete/bird](https://www.npmjs.com/package/@steipete/bird))\n\n## How It Works\n\n1. **Run the CLI** — `npx -y @apoorvdarshan/xscore @username`\n2. **Local scoring** — Fetches last 50 tweets using your browser cookies, scores each against the Phoenix weighted scorer formula\n3. **View results** — Opens [xscores.vercel.app](https://xscores.vercel.app) with your results encoded in the URL (shareable)\n\nYour data never touches a server. Everything runs on your machine.\n\n## What You Get\n\n- **Overall score** (0-100) based on 19 engagement signals\n- **Signal breakdown** — P(action) for likes, reposts, clicks, dwell time, etc.\n- **Per-tweet ranking** — Every tweet ranked by P(favorite)\n- **Insights** — What's boosting and hurting your reach\n- **Shareable link** — Copy the URL and share it with anyone\n\n## Algorithm Mapping\n\nEvery piece of scoring logic traces back to [xai-org/x-algorithm](https://github.com/xai-org/x-algorithm):\n\n| App Component | Algorithm Source | What It Does |\n|---|---|---|\n| `src/lib/algorithm.ts` — `ACTIONS` | `phoenix/runners.py` — `ACTIONS` list | The 19 predicted engagement signals |\n| `src/lib/algorithm.ts` — `SIGNAL_POLARITY` | `README.md` | Classifies each signal as positive or negative |\n| `src/lib/algorithm.ts` — `scoreTweet()` | `README.md` — \"Final Score = Σ (weight_i × P(action_i))\" | The weighted scorer formula |\n| `src/lib/algorithm.ts` — `estimateProbabilities()` | `phoenix/runners.py` — `probs = jax.nn.sigmoid(logits)` | Approximates P(action) from tweet metrics |\n| `src/lib/algorithm.ts` — `primaryScore` | `phoenix/runners.py` — `primary_scores = probs[:, :, 0]` | Primary ranking uses P(favorite) |\n| `src/lib/algorithm.ts` — `WEIGHTS` | **NOT IN REPO** | Weights are not disclosed; we use ±1.0 placeholders |\n\n### The 19 Engagement Signals\n\nFrom `phoenix/runners.py`:\n\n| # | Signal | Polarity |\n|---|---|---|\n| 0 | `favorite_score` (PRIMARY) | Positive |\n| 1 | `reply_score` | Positive |\n| 2 | `repost_score` | Positive |\n| 3 | `photo_expand_score` | Positive |\n| 4 | `click_score` | Positive |\n| 5 | `profile_click_score` | Positive |\n| 6 | `vqv_score` (video qualified view) | Positive |\n| 7 | `share_score` | Positive |\n| 8 | `share_via_dm_score` | Positive |\n| 9 | `share_via_copy_link_score` | Positive |\n| 10 | `dwell_score` | Positive |\n| 11 | `quote_score` | Positive |\n| 12 | `quoted_click_score` | Positive |\n| 13 | `follow_author_score` | Positive |\n| 14 | `not_interested_score` | **Negative** |\n| 15 | `block_author_score` | **Negative** |\n| 16 | `mute_author_score` | **Negative** |\n| 17 | `report_score` | **Negative** |\n| 18 | `dwell_time` | Positive |\n\n## Development\n\n```bash\nnpm install\nnpm run dev\n```\n\n## Tech Stack\n\n- **CLI**: Node.js + [@steipete/bird](https://www.npmjs.com/package/@steipete/bird)\n- **Web**: Next.js, TypeScript, Tailwind CSS v4\n- **Scoring**: Based on [xai-org/x-algorithm](https://github.com/xai-org/x-algorithm)\n\n## Limitations\n\n1. **No real model inference** — P(action) is approximated from tweet metrics. The real Phoenix model uses a Grok-based transformer.\n2. **Weights are unknown** — The repo doesn't disclose weight values. All weights are ±1.0 placeholders.\n3. **No personalization** — The real algorithm personalizes per-viewer. This shows engagement rates from the author's perspective.\n4. **Public metrics only** — Negative signals (block, mute, report) are estimated since they aren't publicly observable.\n\n## Disclaimer\n\nThis is an independent tool not affiliated with X. Uses [@steipete/bird](https://www.npmjs.com/package/@steipete/bird) for data access and [xai-org/x-algorithm](https://github.com/xai-org/x-algorithm) for scoring logic. Use at your own discretion.\n\n## Author\n\nBuilt by [Apoorv Darshan](https://x.com/apoorvdarshan)\n","readmeFilename":"README.md"}