# Tern

A JavaScript code analyzer for deep, cross-editor language support

Repository: https://github.com/ternjs/tern
Canonical: https://ross.abutalabs.com/products/tern
Homepage: https://ternjs.net/
Language: JavaScript
License: MIT
License Family: permissive
Topics: tern, javascript
Last push: 2026-05-14T13:48:10+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 82, release rhythm 35, longevity 100
- inputs: {"age_days": 4927, "days_push": 111, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4240, forks 370 (observed 2026-08-28T04:08:39.620504+00:00)

## What it is
Tern is a stand-alone, editor-independent JavaScript code analyzer that provides deep static analysis such as type inference, completion, and definition lookup. It integrates with many editors including Emacs, Vim, Sublime Text, Eclipse, Atom, and Brackets via plugins.

## Use cases
- get JavaScript autocompletion in Vim
- find where a JavaScript function is defined from my editor
- infer types of JavaScript variables for better editor hints
- add intelligent JavaScript support to Emacs
- query documentation for a JS function without leaving the editor
- refactor JavaScript with cross-file type awareness

## When to choose
- you need editor-agnostic JavaScript code intelligence in editors without built-in language servers
- you maintain a legacy editor setup (Vim, Emacs, Sublime) that predates LSP
- you want a programmable JavaScript analysis engine to build tooling on top of

## When to avoid
- you use a modern editor with Language Server Protocol support, where TypeScript-based servers like tsserver are better maintained
- you need analysis for languages other than JavaScript
- you require actively developed features or recent bug fixes

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, developer-tools, editor
- domain: developer-tools, text-editors, web-development
- platform: cross-platform, editor-plugin
- tags: javascript, code-analysis, autocompletion, static-analysis, editor-integration, language-server, nodejs

## Member repositories
- ternjs/tern (main) score 69
- ternjs/tern_for_vim (plugin) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:39.620504+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:22:15.458537+00:00, confidence not recorded.
  - readme: https://github.com/ternjs/tern (fetched 2026-08-28T04:08:39.620504+00:00, sha bdbdda5f6890)
  - registry_npm: https://registry.npmjs.org/tern (fetched 2026-08-29T09:12:25.986896+00:00, sha 40872190e9e9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
