{"id":28504797,"url":"https://github.com/glideapps/autotune","last_synced_at":"2025-07-06T04:31:01.935Z","repository":{"id":57195639,"uuid":"135352560","full_name":"glideapps/autotune","owner":"glideapps","description":"Automatically tunes apps and websites to improve outcomes","archived":false,"fork":false,"pushed_at":"2019-01-23T15:08:18.000Z","size":463,"stargazers_count":77,"open_issues_count":17,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T20:14:38.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://autotune.xyz/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glideapps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-29T21:01:41.000Z","updated_at":"2024-11-25T01:56:39.000Z","dependencies_parsed_at":"2022-09-16T12:12:30.539Z","dependency_job_id":null,"html_url":"https://github.com/glideapps/autotune","commit_stats":null,"previous_names":["quicktype/autotune"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glideapps/autotune","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glideapps%2Fautotune","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glideapps%2Fautotune/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glideapps%2Fautotune/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glideapps%2Fautotune/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glideapps","download_url":"https://codeload.github.com/glideapps/autotune/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glideapps%2Fautotune/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263848750,"owners_count":23519506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T18:30:51.440Z","updated_at":"2025-07-06T04:31:01.928Z","avatar_url":"https://github.com/glideapps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](logo.svg)\n\n# Automatically improve your apps \u0026 web sites\n\nA/B testing is critical to optimizing any app, but implementing tests and analyzing results can be awkward and time-consuming.\n\nAs developers, we want adding A/B tests to any app to be as simple as adding a line of code. We also want machine learning algorithms to analyze our test results and optimize our app for us, automatically, without having to think twice.\n\nThis is why we created Autotune. With Autotune, you create special variables in your program that Autotune will automatically tune over time to improve outcomes.\n\nNot sure what your main call-to-action should be, or what color to use for the button? Just make a few good guesses and Autotune will make the best decision.\n\n## Create an account and your first app\n\n```shell\n$ npm install -g autotune\n$ tune signup \u003cemail\u003e \u003cpassword\u003e # Autotune will email you a confirmation code\n$ tune confirm \u003ccode\u003e            # Autotune will give you a code sample\n```\n\n## Examples\n\n### Basic Tutorial\n\nOnce you've created an app, add a `\u003cscript\u003e` tag in your page's `\u003chead\u003e` section. This loads the `autotune` library, data about your experiments so far, and initializes `autotune`:\n\n```html\n\u003chead\u003e\n    \u003c!-- ... --\u003e\n    \u003cscript src=\"https://js.autotune.xyz/YOUR-APP-KEY.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n```\n\nNext, create an experiment anywhere on your page:\n\n```html\n\u003c!-- Shorthand syntax --\u003e\n\u003cautotune\u003e\n    \u003ch1\u003eThe glass is half full\u003c/h1\u003e\n    \u003ch1\u003eThe glass is half empty\u003c/h1\u003e\n\u003c/autotune\u003e\n\n\u003c!-- Same but more explicit --\u003e\n\u003cautotune experiment=\"Main title\"\u003e\n    \u003ch1 option=\"half full\"\u003eThe glass is half full\u003c/h1\u003e\n    \u003ch1 option=\"half empty\"\u003eThe glass is half empty\u003c/h1\u003e\n\u003c/autotune\u003e\n\n\u003c!-- Without custom tags (most compatible) --\u003e\n\u003ch1 data-experiment=\"Main title\" data-option=\"half full\"\u003eThe glass is half full\u003c/h1\u003e\n\u003ch1 data-experiment=\"Main title\" data-option=\"half empty\"\u003eThe glass is half empty\u003c/h1\u003e\n```\n\nFinally, add the `autotune` attribute to links you want users to click:\n\n```html\n\u003c!-- Shorthand syntax --\u003e\n\u003ca href=\"/buy-now\" autotune\u003eBuy now\u003c/a\u003e\n\n\u003c!-- Using standard custom attribute --\u003e\n\u003ca href=\"/buy-now\" data-autotune\u003eBuy now\u003c/a\u003e\n```\n\nAutotune will decide which `\u003ch1\u003e` to display, and favor the choice that causes most users to click `Buy now`.\n\n### Autotuned styles\n\nUse the `autotune-class` attribute to let Autotune apply the CSS class that performs the best:\n\n```html\n\u003cstyle\u003e\n.clean      { ... }\n.busy       { ... }\n.extra-busy { ... }\n\u003c/style\u003e\n\n\u003cbody autotune-class=\"clean busy extra-busy\"\u003e\n  ...\n\u003c/body\u003e\n```\n\nAutotune will randomly assign either the `clean`, `busy`, or `extra-busy` class to your `body` tag, and then begin to favor the class that performs the best.\n\n## JavaScript API\n\n### \"Log in\" or \"Sign in\"?\n\nNot sure if your main CTA should be `Log in` or `Sign in`? Let Autotune pick the one that works best:\n\n```javascript\nimport * as autotune from \"autotune\";\n\nautotune.initialize(\"11397F73-FF90-4831-B7F7-85023F1741E4\", () =\u003e {\n    ReactDOM.render(\n        \u003cdiv\u003e\n            \u003ch1\u003eWelcome to my app!\u003c/h1\u003e\n            \u003cbutton onClick={autotune.complete}\u003e{autotune.flipCoin(\"cta\") ? \"Log in\" : \"Sign in\"}\u003c/button\u003e\n        \u003c/div\u003e,\n        document.getElementById(\"root\")\n    );\n});\n```\n\nAutotune will flip a coin to decide whether to use `Log in` or `Sign in`, and over time\nwill favor the choice that gets more users to click the button.\n\n### Which hero message should we use?\n\nHere we add an autotuned welcome message to a simple React app:\n\n```javascript\nimport * as autotune from \"autotune\";\n\n// 1. Initialize\nautotune.initialize(\"11397F73-FF90-4831-B7F7-85023F1741E4\", () =\u003e {\n    // 2. Create a variable\n    const title = autotune.oneOf(\"Welcome message\", [\n        \"👋 Please sign in.\",\n        \"Welcome! Please sign in.\",\n        \"Bienvenidos! Please sign in.\"\n    ]);\n\n    ReactDOM.render(\n        \u003cdiv\u003e\n            // 3. Use the variable\n            \u003ch1\u003e{title}\u003c/h1\u003e\n            \u003cbutton onClick={() =\u003e /* 4. Indicate success */ autotune.complete()}\u003eSign in\u003c/button\u003e\n        \u003c/div\u003e,\n        document.getElementById(\"root\")\n    );\n});\n```\n\nAutotune will experiment with different titles on this page, and automatically tune\nthe app to use the title that causes the most users to click 'Sign in' over time.\n\n## Development\n\n```shell\n$ npm install\n$ npm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglideapps%2Fautotune","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglideapps%2Fautotune","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglideapps%2Fautotune/lists"}