isbot

Detect bots, crawlers, and spiders from the user agent string with a single call.

Library
npm
v5.2.1
1,159stars
Unlicense

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
60/100Good
Development Activity64
Maintenance32
Community56
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
87/100Excellent
Architecture85
Code Quality86
Innovation90
Learning Curve90

isbot is a tiny, zero-dependency JavaScript and TypeScript library that identifies bots, crawlers, and spiders by testing the request’s user agent string against a large, regularly updated pattern list. It exposes a single isBot function plus a family of helpers for matching, customization, and building your own detectors, and runs identically in Node.js, browsers, and edge runtimes.

Rather than trying to unmask malicious bots, isbot focuses on reliably recognising “good bots” that voluntarily identify themselves — search-engine crawlers, previews, scrapers, and monitoring agents. The pattern is compiled from expansive community-maintained data sources and ships with a naive fallback for engines that lack regular-expression lookbehind support.

What You Get

  • A single isBot(userAgent) function returning a boolean for any user agent string
  • A community-maintained, regularly updated pattern list compiled from multiple external data sources
  • Named helpers to find matched substrings and patterns, and to build custom detectors
  • ESM, CommonJS, and UMD/CDN builds that run in Node.js, browsers, and edge runtimes with zero runtime dependencies

Common Use Cases

  • Flagging or excluding bot pageviews in analytics and business reporting
  • Serving cached content or lighter responses to crawlers to relieve service load
  • Omitting third-party tags and pixels for bots to reduce costs
  • Customizing detection to include or exclude specific agents such as Chrome Lighthouse

Under The Hood

Architecture isbot is built around a single lazily-compiled regular expression. src/index.ts imports a large patterns.json substring list and a precomputed fullPattern, then getPattern() compiles that pattern into a case-insensitive RegExp on first use, memoizes it, and falls back to a small naive pattern (/bot|crawl|http|lighthouse|scan|search|spider/i) if the engine cannot compile the full expression (it relies on lookbehind). isBot(userAgent) simply guards for a non-empty string and tests it against the pattern; helper exports like findBotMatch, findBotPatterns, createIsBotFromList, and legacy aliases are thin functions over the same list and regex. src/browser.ts attaches isBot to the global object for the UMD/CDN build.

Tech Stack The source is TypeScript targeting Node.js >=18, bundled with tsup into CommonJS, ESM, and a browser global build, with type declarations emitted. There are zero runtime dependencies; devDependencies cover jest and ts-jest for testing, prettier for formatting, pug for the docs page, and a user-agents dataset for test fixtures. Build, test, and format are driven by shell scripts under scripts/.

Code Quality The library is small and strongly typed, with explicit narrowing helpers (isNonEmptyString) and JSDoc on every export. A real test suite lives under tests/ with a spec suite plus committed snapshots and a dedicated efficiency test, and fixtures under fixtures/ exercise real bot and non-bot user agent samples. Accuracy is explicitly managed with documented tolerances for the fallback path (1% false positives, 75% coverage).

API Design The public surface is deliberately ergonomic: the primary path is one intuitively named isBot(userAgent) call, while power users get a coherent family of findBot* introspection helpers and createIsBot/createIsBotFromList factories for custom detection. Naming is consistent, backward-compatibility aliases ease major-version upgrades, and the README documents every named import in a single table with copy-paste examples, so getting started requires essentially no boilerplate.

Used by 22 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

167

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
30
Repo Health
70
Technical
63
Dependency
Built with
TypeScript76%
MDX18%
Updated 1 years ago
TypeScript
100%
Apache 2.0

agentic-inbox

AI Agents · Productivity

6,880

A self-hosted email client with an AI agent that reads your inbox, drafts replies automatically, and exposes full email operations over MCP — running entirely on Cloudflare Workers.

View details
32
Repo Health
74
Technical
77
Dependency
Built with
TypeScript100%
Updated 3 months ago
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
TypeScript
96%
Other

Cal.diy

Scheduling

47,796

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
93
Repo Health
86
Technical
66
Dependency
Built with
TypeScript96%
Updated 1 weeks ago
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,394

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
88
Repo Health
82
Technical
70
Dependency
Built with
TypeScript45%
Rust43%
Updated today
TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

14,603

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
72
Dependency
Built with
TypeScript92%
Updated today
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday
TypeScript
99%
MIT

KeystoneJS

CMS · Developer Tools

9,957

The superpowered headless CMS for developers built with GraphQL and React

View details
91
Repo Health
81
Technical
64
Dependency
Built with
TypeScript99%
Updated yesterday
JavaScript
46%
MIT

Kutt

Analytics · Marketing

11,039

Self-hosted URL shortener with custom domains, per-link analytics, and zero build step required.

View details
77
Repo Health
62
Technical
73
Dependency
Built with
JavaScript46%
Handlebars24%
HTML16%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search