segmentio/typewriter

Type safety + intellisense for your Segment analytics

242

stars

184

commits

TypeScript

primary language

Jun 25, 2026

updated

segment.com/docs/protocols/typewriter/
analytics
ios
mobile
nodejs
segment
segment-protocols
typescript
web

README



Typewriter logo



NPM Version License Known Vulnerabilities


Typewriter GIF Example

  • 💪 Strongly Typed Analytics: Generates strongly-typed Segment analytics clients that provide compile-time errors, along with intellisense for event/property names, types and descriptions.

  • 👮 Analytics Testing: Validate your instrumentation matches your spec before deploying to production, so you can fail your CI builds without a manual analytics QA process.

  • 🌐 Cross-Language Support: Supports native clients for analytics.js, analytics-node, analytics-android and analytics-ios.

  • Segment Protocols: Built-in support to sync your typewriter clients with your centralized Segment Tracking Plans.

Get Started

# Walks you through setting up a `typewriter.yml` and generating your first client.
$ npx typewriter init

For more instructions on setting up your typewriter client, such as adding it to your CI, see our documentation.

Contributing

Migrating from v7

Check the instructions on our documentation

  • You'll need to change your Segment Config API Token for a Public API Token
  • v8 doesn't support Analytics-iOS nor Analytics-Android. We recommend using Analytics-Swift and Analytics-Kotlin instead which are supported. If you need to use these libraries you can run v7 specifying the version with your commands:
$ npx typewriter@7 build

Contributors

colinking

86 commits

oscb

23 commits

dependabot[bot]

20 commits

alanjcharles

16 commits

segmentio/typewriter

Type safety + intellisense for your Segment analytics

242

stars

184

commits

TypeScript

primary language

Jun 25, 2026

updated

segment.com/docs/protocols/typewriter/
analytics
ios
mobile
nodejs
segment
segment-protocols
typescript
web

README



Typewriter logo



NPM Version License Known Vulnerabilities


Typewriter GIF Example

  • 💪 Strongly Typed Analytics: Generates strongly-typed Segment analytics clients that provide compile-time errors, along with intellisense for event/property names, types and descriptions.

  • 👮 Analytics Testing: Validate your instrumentation matches your spec before deploying to production, so you can fail your CI builds without a manual analytics QA process.

  • 🌐 Cross-Language Support: Supports native clients for analytics.js, analytics-node, analytics-android and analytics-ios.

  • Segment Protocols: Built-in support to sync your typewriter clients with your centralized Segment Tracking Plans.

Get Started

# Walks you through setting up a `typewriter.yml` and generating your first client.
$ npx typewriter init

For more instructions on setting up your typewriter client, such as adding it to your CI, see our documentation.

Contributing

Migrating from v7

Check the instructions on our documentation

  • You'll need to change your Segment Config API Token for a Public API Token
  • v8 doesn't support Analytics-iOS nor Analytics-Android. We recommend using Analytics-Swift and Analytics-Kotlin instead which are supported. If you need to use these libraries you can run v7 specifying the version with your commands:
$ npx typewriter@7 build

Contributors

colinking

86 commits

oscb

23 commits

dependabot[bot]

20 commits

alanjcharles

16 commits

Languages

TypeScript

87.7%

Handlebars

11.4%