{"id":26346,"library":"rudder-typer-mattiasmts","title":"RudderTyper","description":"A CLI tool from RudderStack (v1.7.9) that generates strongly-typed analytics client libraries from a centralized tracking plan spec. Supports JavaScript, TypeScript, Node.js, Android, and iOS. Compile-time errors and intellisense help catch instrumentation mismatches before production. Integrates with the RudderStack Tracking Plans API. Released under Apache 2.0. Active development with monthly releases. Differentiator: prevents silent analytics drift and enables CI validation of event schemas.","status":"active","version":"1.7.9","language":"javascript","source_language":"en","source_url":"https://github.com/rudderlabs/rudder-typer","tags":["javascript","typescript"],"install":[{"cmd":"npm install rudder-typer-mattiasmts","lang":"bash","label":"npm"},{"cmd":"yarn add rudder-typer-mattiasmts","lang":"bash","label":"yarn"},{"cmd":"pnpm add rudder-typer-mattiasmts","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; CommonJS require will fail.","wrong":"const RudderTyper = require('rudder-typer-mattiasmts')","symbol":"RudderTyper","correct":"import { RudderTyper } from 'rudder-typer-mattiasmts'"},{"note":"RudderTyper is a code generator, not the runtime analytics SDK.","wrong":"import { RudderAnalytics } from 'rudder-typer-mattiasmts'","symbol":"RudderAnalytics","correct":"import { RudderAnalytics } from '@rudderstack/analytics-js'"},{"note":"Used programmatically to generate client code.","symbol":"generateClient","correct":"import { generateClient } from 'rudder-typer-mattiasmts'"}],"quickstart":{"code":"npx rudder-typer-mattiasmts init\n# Follow the interactive prompt to configure.\nnpx rudder-typer-mattiasmts build\nnpm install @rudderstack/analytics-js\nimport { RudderAnalytics } from '@rudderstack/analytics-js';\nimport generatedClient from './generated/rudder-typer';\nconst analytics = new RudderAnalytics();\ngeneratedClient(analytics, { writeKey: 'YOUR_WRITE_KEY' });","lang":"typescript","description":"Initializes a RudderTyper project using the CLI, configures it, builds the client, and demonstrates using it with the RudderStack JavaScript SDK."},"warnings":[{"fix":"Update to v1.6.0 or later and verify event order in tests.","message":"v1.6.0 introduced a breaking change: the generated client now sorts tracking plan choices by `createdAt` during initialization, which may alter event ordering.","severity":"deprecated","affected_versions":"<1.6.0"},{"fix":"Use `npx rudder-typer-mattiasmts init` only in a TTY. For CI, preconfigure a `ruddertyper.yml` and run `build`.","message":"The CLI `init` command only supports interactive mode; non‑interactive environments will hang.","severity":"gotcha","affected_versions":"*"},{"fix":"Install the appropriate RudderStack SDK for your platform.","message":"Generated clients require a separate runtime analytics SDK (e.g., `@rudderstack/analytics-js` for browser).","severity":"gotcha","affected_versions":"*"},{"fix":"Run `rm -r ~/.ruddertyper` to clear cache before `update` if changes are not appearing.","message":"The `plan.json` file is cached locally; calling `update` may not reflect the latest tracking plan if the cache is stale.","severity":"deprecated","affected_versions":"<=1.7.9"},{"fix":"Check the generated index file and adjust imports relative to your project structure.","message":"TypeScript users must manually ensure the generated `.ts` files include the correct import paths after moving or copying the generated directory.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'2.0':51 'activ':52 'analyt':13,60 'android':26 'apach':50 'api':47 'catch':36 'central':18 'ci':64 'cli':3 'client':14 'compil':30 'compile-tim':29 'develop':53 'differenti':57 'drift':61 'enabl':63 'error':32 'event':67 'generat':9 'help':35 'instrument':37 'integr':41 'intellisens':34 'io':28 'javascript':23,69 'librari':15 'mismatch':38 'month':55 'node.js':25 'plan':20,46 'prevent':58 'product':40 'releas':48,56 'rudderstack':6,44 'ruddertyp':1 'schema':68 'silent':59 'spec':21 'strong':11 'strongly-typ':10 'support':22 'time':31 'tool':4 'track':19,45 'type':12 'typescript':24,70 'v1.7.9':7 'valid':65","created_at":"2026-05-01T13:49:30.076872+00:00","updated_at":"2026-05-01T13:49:30.076872+00:00","problems":[{"fix":"Update to latest version (`npx rudder-typer-mattiasmts@latest`) and verify API token with `npx rudder-typer-mattiasmts token`.","cause":"CLI version <1.6.2 or incorrect API token.","error":"Your workspace does not have any Tracking Plans"},{"fix":"Run `sudo chown -R $USER ~/.ruddertyper` or change the config path in ruddertyper.yml.","cause":"Missing write permissions to the config directory.","error":"Error: EACCES: permission denied, open '~/.ruddertyper/token'"},{"fix":"Run `npx rudder-typer-mattiasmts build` first, or use `init` to create the initial plan.","cause":"The `update` command was run before a plan was generated.","error":"Could not find a plan.json. Run `npx rudder-typer build` first."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"rudder-typer","cli_version":null,"type":"library","homepage":"https://rudderstack.com","github":"https://github.com/rudderlabs/rudder-typer","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/rudder-typer-mattiasmts","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","http-networking","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}