API Reference
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:
- 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.
Was this page helpful?