A powerful CLI-based tool for local development of A/B tests with live browser previews. Write test code in your preferred editor, preview changes instantly via a browser extension, and manage tests compatible with platforms like AB Tasty, Dynamic Yield, VWO, Kameleoon, Optimizely, Convert, and more with a beautiful UI which will indicate the test status.
Make sure you have Node.js installed:
Recommended Versions:
- Node.js: v18 - v22 (minimum: v14)
- npm: v9 - v10 (minimum: v6)
# Install dependencies
npm i
# Initialize project
npm run cli initnpm run cli # Main CLI interface with all features but you can choose shortcut in below:
npm run cli create # Create website, test, or variation
npm run cli start # Start a test
npm run cli settings # Configure settings# Inject the preview snippet into your browser using a browser extension that supports custom java script.π Recommended Chrome Extension: User JavaScript and CSS
# 1. Open the extension and create a **New Rule**.
# 2. Set a rule name (set any name. e.g., `CLI snippet`).
*://*/* #3. Use this on the URL pattern
# 4. Paste the following code (iin the bottom) into the `JS section`:(function () {
'use strict';
const portNumber = 3007;
function observeElement(selector, callback, { minElements = 1, isVariable = false, timeout = 10000, interval = 5 } = {}, start = performance.now()) { (function check() { const elements = isVariable ? window[selector] : document.querySelectorAll(selector); if ((isVariable && elements !== undefined) || (!isVariable && elements.length >= minElements)) return callback(elements); if (performance.now() - start < timeout) setTimeout(check, interval); })(); }
const MAIN_URL = `http://localhost:${portNumber}/ab-pilot-script.js`;
observeElement('html', ([html]) => {
const mainScript = document.createElement('script');
mainScript.setAttribute('src', MAIN_URL);
html.appendChild(mainScript);
setTimeout(()=>{
const LIVE_UPDATE_URL = `http://localhost:${portNumber}/ab-test-script.js`;
const updateScript = document.createElement('script');
updateScript.setAttribute('src', LIVE_UPDATE_URL);
observeElement('html', ([html]) => html.appendChild(updateScript));
}, 500);
});
})();# 5. In the bottom right corner of the JS editor section, enable **Run at the start** to inject the code faster. This ensures the script loads immediately before the page finishes loading, similar to how professional tools behave.- βοΈ Edit & Test Locally β Write A/B test code and instantly preview results.
- π§ͺ Multiple Test Types β A/B, AA, Multi-touch, Patch, and more.
- π§² Cross-Platform Compatible β Works with AB Tasty, VWO, Dynamic Yield, Chameleon, VLo, etc.
- π Full Project Management β Manage websites, tests, and variations from CLI.
- π§ Beautiful Terminal UI β Interactive and emoji-enhanced.
- π¦ Build Tests Locally β Prepare files before uploading to testing tools.
- π― Flexible Execution β Run single or multiple tests simultaneously.
- π Variation Swapping β Switch between variations effortlessly.
- Initialize the Project (One-time).
- Create Websites, Tests & Variations via the CLI.
- Write Code in your code editor (HTML/CSS/JS).
- Inject Snippet in your browser using an extension.
- Preview Tests live with instant updates.
- Build Locally before uploading to a testing platform.
Run the CLI:
npm run cli? Select a command to run
> π Start the Server
π¦ Build Test
β Create a New Item
βοΈ Update Settings
β Exit
? What would you like to do?
> π Latest Test
π View Test History
π― Run a Single Test
π Run Group Tests
π Back
β Exit
- π Run Latest Test
- π Change Variation
- π Change Test
? Select an option:
> π Create New Website
π ---- website 1 ---
π ---- website 2 ---
...
- π Create New Test
- π Test 1 β A/B Test
- π Test 2 β AA Test
- π― Test 3 β Multi-touch Test
- π©Ή Test 4 β Patch Test
? Select an option:
> π Create New Variation
π ---- variation 1 ---
π ---- variation 2 ---
...
- π Start Variation
- π See Test Details
- π¦ Build Variation
- π€ Copy Variation to Another Test
- βοΈ Rename Variation
- ποΈ Remove Variation
π History Records Count: 10
π¨ CSS Reload: No
πΌοΈ Display UI: Yes
π JS Reload: No
π¦ Bundler Settings
πΎ Save and Exit
β Exit
| Type | Description | Icon |
|---|---|---|
| A/B Test | Compare two or more variants | π |
| AA Test | Identical variant comparisons | π |
| Multi-touch Test | Compare multiple changes at once | π― |
| Patch Test | Small change deployment | π©Ή |
project structure :
ABTestLab
βββ .vscode/ # VS Code configuration files
βββ core/ # Core functionalities
β βββ client/ # Client-side scripts
β β βββ browser-Runner.js
β β βββ browser-script.js
β βββ commands/ # CLI commands
β β βββ create.js
β β βββ init.js
β β βββ settings.js
β β βββ start.js
β βββ global/ # Global configurations
β β βββ config.js
β βββ public/ # Static assets for frontend
β β βββ css/
β β β βββ index.css
β β βββ documents/ # documentation
β β β βββ complete_todo.md
β β β βββ todo.md
β β βββ html/
β β β βββ index.html
β β βββ icons/
β β β βββ close.svg
β β βββ js/ # JavaScript assets
β β β βββ main/
β β β β βββ index.js
β β β βββ vendor/ # Third-party scripts
β βββ scripts/ # Utility scripts
β β βββ createSettingFile.js
β β βββ createSkeleton.js
β β βββ downloadSocketIo.js
β βββ server/ # Server-side scripts
β β βββ browserScriptCreator.js
β β βββ testServer.js
βββ templates/ # Initial Templates for A/B tests
β βββ targeting/ # Targeting rules
β β βββ customJS.js
β β βββ elementChecker.json
β β βββ urlChecker.json
β βββ targetMet/ # When and how target conditions are met
β β βββ customJS.js
β β βββ elementChecker.js
β β βββ urlChecker.js
β βββ variation/ # Variation-related files
β β βββ index.js
β β βββ info.json
β β βββ style.scss
β βββ utils/ # Utility functions
β β βββ bundler.js
β β βββ creatorPrompts.js
β β βββ creators.js
β β βββ cssUtils.js
β β βββ fileUtils.js
β β βββ historyUtils.js
β β βββ selectors.js
β β βββ startUtils.js
β βββ index.js
βββ skeleton/ # Skeleton structures
βββ websites/ # Websites-related configurations
βββ package.json
βββ node_modules/ # Dependencies
βββ settings.json
βββ history.json # Execution history
βββ .gitignore # Git ignored files
βββ README.md # Project documentation
- Create local tests before uploading to AB testing platforms.
- Perform rapid QA with live browser previews.
- Manage large sets of websites and tests from one place.
- Simplify teamwork with reusable variation templates.
Initialize your project (only once or after npm install):
π οΈ npm run cli initBuild your test locally:
π¦ npm run cli build #build a testYou can then upload your built files to your desired A/B testing platform.
- Node.js v14+
- Browser extension installed for snippet injection
Copyright (c) 2025 maruf1020
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, and sublicense the Software,
subject to the following conditions:
-
Commercial Use Restriction
- Any person, company, or organization intending to use this software for commercial purposes, profit, or financial gain must obtain prior written permission from the copyright holder (maruf1020).
- Commercial use means using the software to make money. This includes things like selling it, renting it out, offering it as a paid service, or using it in any product or service that makes money.
-
Grant of Use to Echologyx Ltd
- As the copyright holder is an employee of Echologyx Ltd, the company Echologyx Ltd is granted a non-exclusive, royalty-free license to use, modify, and distribute this software
-
Inclusion of Copyright Notice
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
Warranty Disclaimer
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For commercial licensing inquiries, please contact: marufbillah03033@gmail.com.
For help, bugs, or feature requests, reach out via GitHub Issues or email: marufbillah03033@gmail.com

