API Reference
Welcome to the Codegen API reference. This documentation covers the core classes and functions available in Codegen.
Core Classes
The main entry point for analyzing and transforming code. Provides access to files, functions, and the call graph.
FileWork with source files, their ASTs, and manage imports/exports.
FunctionRepresents a function in your codebase. Analyze parameters, return types, and call sites.
SymbolRepresents a symbol in your codebase, includes functions, classes, and more.
Language Support
Python-specific APIs and utilities for working with Python codebases.
TypeScriptTypeScript 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:
- Following the Getting Started guide
- Exploring the Tutorials
- Looking at example codemods in our GitHub repository
Use the search bar (⌘ K) to quickly find specific APIs and functionality.