SBTI CLI - Test SBTI for your agents.
SBTI CLI - Test SBTI for your agents.
A Node.js CLI with offline-only execution, bundled survey data, and result-image export.
📖 Table of Contents
🎯 What Is This
This repository turns SBTI into a local command-line runner.
Key traits:
- 🎲 Website-equivalent question flow
- 📊 Website-equivalent scoring
- 📴 Offline-safe execution
- 🖼️ Exportable result posters
- ✅ Regression coverage
🧭 Installation & Setup
Install From npm
For agent runs or normal CLI use, install the published package and run the binary directly:
npm install -g @bingran/sbti-cli
sbti-cli
or:
npx @bingran/sbti-cli
The npm install surface is intentionally small: the root @bingran/sbti-cli package only ships a tiny launcher, and npm pulls the matching platform-native binary package for your machine. The published package does not ship the repository source tree, tests, build scripts, or image assets.
Current native package targets:
- macOS
arm64
- macOS
x64
- Linux
arm64
- Linux
x64
- Windows
x64
Clone The Repo For Development
If you want the test suite, image-export tooling, or source code itself, use the repository checkout:
git clone https://github.com/bingran-you/sbti-cli.git
cd sbti-cli
npm install
npm test
Then start the development CLI with:
npm run sbti
or:
node src/cli.mjs
💡 There is no database, browser driver, or .env setup required. If Node.js is installed, you can run either the published CLI or the repo-local development entry point.
🧪 Using the CLI
Common Commands
sbti-cli | Start a normal interactive run from the published npm package |
sbti-cli --seed 42 | Use a deterministic shuffle seed |
sbti-cli --json | Print the final result as JSON |
npm run sbti | Start the repo-local development entry point |
npm run export-images | Rebuild the local poster manifest and gallery from bundled assets in a repo checkout |
Interactive Controls
Once the CLI starts, you answer one question at a time:
Each answer is locked in for that run as soon as you submit it.
A / B / C / D | Select the current option |
q | Quit without submitting |
Typical Run
sbti-cli
SBTI CLI
Question source: bundled:sbti-main.js
Question 1 / 31 · dimension hidden
...
Enter A/B/C/D, or q to quit.
> C
🧬 Core Capabilities
| Area | Capability | Details |
|---|
| 🛟 Offline runtime | Always runs from the bundled snapshot | The CLI never fetches the live website at runtime, so every questionnaire run stays fully local |
| 🖼️ Result-image export | 27 bundled posters can be indexed locally | The repo can rebuild a JSON manifest and an HTML gallery from the checked-in image files |
| 🧪 Regression tests | Bundled-runtime verification | Includes runtime parity, 50 deterministic result cases, and offline asset coverage |
| 📦 Native npm release | Small launcher plus platform-native binary packages | Installing from npm no longer ships the repo source tree, tests, or build scripts with the runnable CLI |
🎭 Result Images & Offline Resources
This section is repository-only. The published npm CLI does not ship the poster assets or the export script.
Export All Result Images
npm run export-images
This generates:
🔬 Data Sources & How It Works
Why It Can Match the Website So Closely
This repository stores a bundled snapshot of the survey data and scoring logic in src/bundled-data.mjs. src/runtime.mjs turns that snapshot into a sandboxed runtime so the CLI can stay local while preserving the original question flow and result math.
The CLI therefore uses the same runtime objects throughout every run:
dimensionMeta | Chinese labels and model groups for the 15 dimensions |
questions | The 30 regular questions |
specialQuestions | The drink-gate question set |
TYPE_LIBRARY | Codes, names, intros, and full descriptions for all 27 result types |
NORMAL_TYPES | The 25 normal H / M / L templates |
DIM_EXPLANATIONS | Dimension explanations for each L / M / H tier |
computeResult() | The website's own result-selection branch logic |
That is why the CLI can stay aligned with:
- question shuffle
- drink-gate insertion and hidden question reveal
- 15-dimension scoring and bucketing
- normal-type ranking
DRUNK override
HHHH low-similarity fallback
Where the Poster Art Comes From
All 27 result posters are checked into assets/type-images/. scripts/export-type-images.mjs rebuilds the manifest and gallery pages from those local files.
Most Important Files in This Repo
🙏 Acknowledgements
| Project | Author | Contribution |
|---|
| SBTI Personality Test | Bilibili @蛆肉儿串儿 | Original survey author and source of the question text, result copy, and character artwork |
| sbti-wiki | @serenakeyitan | The visual README format here was inspired by that project's centered hero, badges, image strip, and information-card layout |
| sbti-cli | Bingran You (@bingran-you) | Built the sandboxed runtime loader, offline snapshot, image exporter, and regression test suite for a practical terminal workflow |
⚠️ For entertainment only: the upstream site already warns against treating this as diagnosis, hiring criteria, relationship truth, fortune telling, or any serious judgment. This repo is a tooling and reference project, not a psychological assessment.
📄 License
The original code and documentation in this repository are released under the MIT License.
Third-party survey prompts, result text, and extracted character artwork originate from the upstream SBTI website and remain subject to their original ownership. See NOTICE for attribution and scope.