Skip to main content
Welcome to the Codegen API reference. This documentation covers the core classes and functions available in Codegen.

Core Classes

Codebase

The main entry point for analyzing and transforming code. Provides access to files, functions, and the call graph.

File

Work with source files, their ASTs, and manage imports/exports.

Function

Represents a function in your codebase. Analyze parameters, return types, and call sites.

Symbol

Represents a symbol in your codebase, includes functions, classes, and more.

Language Support

Python

Python-specific APIs and utilities for working with Python codebases.

TypeScript

TypeScript and JavaScript support, including React component analysis.

Common Operations

Code Analysis

Code Transformation

React & TypeScript

Each class and function includes detailed examples and common use cases. Use the sidebar navigation to explore specific APIs.

Getting Started

If you’re new to Codegen, we recommend:
  1. Following the Getting Started guide
  2. Exploring the Tutorials
  3. Looking at example codemods in our GitHub repository
Use the search bar (⌘ K) to quickly find specific APIs and functionality.