Skip to main content
Explore our tutorials to learn how to use Codegen for various code transformation tasks.

Build a Code Agent

Create an intelligent code agent with Langchain and powerful, codegen-powered tools

Visualize Your Codebase

Generate interactive visualizations of your codebase’s structure, dependencies, and relationships.

Mine Training Data

Create high-quality training data for LLM pre-training similar to word2vec or node2vec

Delete Dead Code

Remove unused imports, functions, and variables with confidence.

API Migrations

API Migration Guide

Update API calls, handle breaking changes, and manage bulk updates across your codebase.

SQLAlchemy 1.4 to 2.0

Update SQLAlchemy code to use the new 2.0-style query interface and patterns.

Flask to FastAPI

Convert Flask applications to FastAPI, updating routes and dependencies.

Python 2 to 3

Migrate Python 2 code to Python 3, updating syntax and modernizing APIs.

Code Organization

Organize Your Codebase

Restructure files, enforce naming conventions, and improve project layout.

Improve Modularity

Split large files, extract shared logic, and manage dependencies.

Manage TypeScript Exports

Organize and optimize TypeScript module exports.

Convert Default Exports

Convert between default and named exports in TypeScript/JavaScript.

Testing & Types

unittest to pytest

Convert unittest test suites to pytest’s modern testing style.

Increase Type Coverage

Add TypeScript types, infer types from usage, and improve type safety.

Documentation & AI

Create Documentation

Generate JSDoc comments, README files, and API documentation.

Prepare for AI

Generate system prompts, create hierarchical documentation, and optimize for AI assistance.
Each tutorial includes practical examples, code snippets, and best practices. Follow them in order or jump to the ones most relevant to your needs.