Wright AI
DocsStart free
TypeScript · JSDoc

Auto-generate TypeScript JSDoc with AI

Wright AI reads your TypeScript call graph and writes complete JSDoc comments for every undocumented function — then watches for drift when your types change.

Start for free →pip install wright

See it in action

Before and after — JSDoc style

BEFORE
export async function refreshAuthToken(
  token: string,
  options?: { force?: boolean; audience?: string }
): Promise<AuthToken> {
  const decoded = verifyToken(token);
  if (!options?.force && !isNearExpiry(decoded)) return { token, refreshed: false };
  const newToken = await issueToken(decoded.userId, options?.audience);
  await invalidateToken(token);
  return { token: newToken, refreshed: true };
}
AFTER — wright generate
/**
 * Refreshes a JWT authentication token if it is near expiry or forced.
 *
 * Verifies the existing token, then checks whether it is within the
 * refresh window (see {@link isNearExpiry}). If not near expiry and
 * `force` is false, returns the original token unchanged. Otherwise,
 * issues a new token scoped to the optional audience, invalidates the
 * old one, and returns the replacement.
 *
 * @param token - The existing JWT to evaluate for refresh.
 * @param options - Optional refresh configuration.
 * @param options.force - If true, refresh unconditionally. Defaults to false.
 * @param options.audience - OAuth audience for the new token. Inherits
 *   from the existing token if omitted.
 * @returns Resolves to an `AuthToken` containing the (possibly new)
 *   token string and a `refreshed` flag indicating whether a new
 *   token was issued.
 */
export async function refreshAuthToken(

How it works

More than a docstring generator

Call graph context
Wright builds a dependency graph before generating. It reads what calls your TypeScript function and what it calls — so docs describe purpose, not just mechanics.
📊
Coverage tracking
Know the exact percentage of documented functions across every file. Set a minimum threshold and enforce it in CI.
🔍
Drift detection
When a function signature changes, Wright flags the stale docstring automatically — as a VS Code warning and a CI failure.
🔌
MCP for AI tools
Exposes your indexed docs to Claude Code, Cursor, and Copilot via MCP so they always have live context about your codebase.

Comparison

How Wright differs from alternatives

Writing manually
JSDoc for a complex generic function takes 10+ min. Types drift as signatures evolve.
TypeDoc
Generates an HTML site from existing JSDoc — it doesn't write the comments for you.
Copilot inline
One suggestion at a time. No project-wide coverage, no CI enforcement, no drift alerts.

Start documenting your TypeScript codebase

Free VS Code extension · CLI · GitHub Action · MCP server. No credit card required.

Get started free →Read the docs