Skip to content

Commit 35fd2e9

Browse files
authored
refactor: Update docs to refer to Graph-Sitter instead of Codegen (#37)
1 parent 26f59be commit 35fd2e9

File tree

173 files changed

+1577
-2263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+1577
-2263
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Contributing to Codegen
1+
# Contributing to Graph-sitter
22

3-
Thank you for your interest in contributing to Codegen! This document outlines the process and guidelines for contributing. If you have any questions, please join our [Slack Community](https://community.codegen.com) 😀.
3+
Thank you for your interest in contributing to Graph-sitter! This document outlines the process and guidelines for contributing. If you have any questions, please join our [Slack Community](https://community.codegen.com) 😀.
44

55
## Contributor License Agreement
66

7-
By contributing to Codegen, you agree that:
7+
By contributing to Graph-sitter, you agree that:
88

99
1. Your contributions will be licensed under the project's license.
1010
1. You have the right to license your contribution under the project's license.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
```python
2828
from codegen import Codebase
2929

30-
# Codegen builds a complete graph connecting
30+
# Graph-sitter builds a complete graph connecting
3131
# functions, classes, imports and their relationships
3232
codebase = Codebase("./")
3333

@@ -39,25 +39,25 @@ for function in codebase.functions:
3939
function.move_to_file("deprecated.py")
4040
```
4141

42-
Write code that transforms code. Codegen combines the parsing power of [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) with the graph algorithms of [rustworkx](https://github.com/Qiskit/rustworkx) to enable scriptable, multi-language code manipulation at scale.
42+
Write code that transforms code. Graph-sitter combines the parsing power of [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) with the graph algorithms of [rustworkx](https://github.com/Qiskit/rustworkx) to enable scriptable, multi-language code manipulation at scale.
4343

4444
## Installation and Usage
4545

4646
We support
4747

48-
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
48+
- Running Graph-sitter in Python 3.12 - 3.13 (recommended: Python 3.13+)
4949
- macOS and Linux
5050
- macOS is supported
5151
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
52-
- Windows is supported via WSL. See [here](https://graph-sitter.com/building-with-codegen/codegen-with-wsl) for more details.
52+
- Windows is supported via WSL. See [here](https://graph-sitter.com/building-with-graph-sitter/codegen-with-wsl) for more details.
5353
- Python, Typescript, Javascript and React codebases
5454

5555
```
5656
# Install inside existing project
57-
uv pip install codegen
57+
uv pip install graph-sitter
5858
5959
# Install global CLI
60-
uv tool install codegen --python 3.13
60+
uv tool install graph-sitter --python 3.13
6161
6262
# Create a codemod for a given repo
6363
cd path/to/repo
@@ -100,13 +100,13 @@ If you run into additional issues not listed here, please [join our slack commun
100100

101101
Software development is fundamentally programmatic. Refactoring a codebase, enforcing patterns, or analyzing control flow - these are all operations that can (and should) be expressed as programs themselves.
102102

103-
We built Codegen backwards from real-world refactors performed on enterprise codebases. Instead of starting with theoretical abstractions, we focused on creating APIs that match how developers actually think about code changes:
103+
We built Graph-sitter backwards from real-world refactors performed on enterprise codebases. Instead of starting with theoretical abstractions, we focused on creating APIs that match how developers actually think about code changes:
104104

105105
- **Natural mental model**: Write transforms that read like your thought process - "move this function", "rename this variable", "add this parameter". No more wrestling with ASTs or manual import management.
106106

107107
- **Battle-tested on complex codebases**: Handle Python, TypeScript, and React codebases with millions of lines of code.
108108

109-
- **Built for advanced intelligences**: As AI developers become more sophisticated, they need expressive yet precise tools to manipulate code. Codegen provides a programmatic interface that both humans and AI can use to express complex transformations through code itself.
109+
- **Built for advanced intelligences**: As AI developers become more sophisticated, they need expressive yet precise tools to manipulate code. Graph-sitter provides a programmatic interface that both humans and AI can use to express complex transformations through code itself.
110110

111111
## Contributing
112112

architecture/external/dependency-manager.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
## Motivation
66

7-
A future goal of Codegen is to support resolving symbols directly from dependencies, instead of falling back to `ExternalModule`s. (In fact, some experimental Codegen features such as [Type Engine](./type-engine.md) already parse and use 3rd party dependencies from `node_modules`)
7+
A future goal of Graph-sitter is to support resolving symbols directly from dependencies, instead of falling back to `ExternalModule`s. (In fact, some experimental Graph-sitter features such as [Type Engine](./type-engine.md) already parse and use 3rd party dependencies from `node_modules`)
88

99
This requires us to pull and install dependencies from a repository's `package.json`. However, simply installing dependencies from `package.json` is not enough, as many projects require internal dependencies that use custom NPM registries. Others require custom post-install scripts that may not run on our codemod environments.
1010

@@ -31,7 +31,7 @@ repo/
3131

3232
Dependency Manager first deletes any existing `node_modules` folder in the user's repository. After this step, Dependency Manager initializes itself to use the correct version of NPM, Yarn, or PNPM for the user's repository.
3333

34-
Dependency Manager then creates a "shadow copy" of the repository's original `package.json` file. This shadow copy is used to later revert any changes made by Codegen before running codemods. With these steps, the codebase structure now looks like this:
34+
Dependency Manager then creates a "shadow copy" of the repository's original `package.json` file. This shadow copy is used to later revert any changes made by Graph-sitter before running codemods. With these steps, the codebase structure now looks like this:
3535

3636
```
3737
repo/

architecture/external/type-engine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Type Engine
22

3-
Type Engine is an experimental feature of Codegen that leverages the [TypeScript Compiler API](https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API) to provide deeper insight into a user's codebase (such as resolving return types).
3+
Type Engine is an experimental feature of Graph-sitter that leverages the [TypeScript Compiler API](https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API) to provide deeper insight into a user's codebase (such as resolving return types).
44

55
> NOTE: Currently, this is only implemented for TypeScript projects.
66
77
There are currently two experimental implementations of TypeScript's Type Engine: an external process-based implementation and a V8-based implementation.
88

99
## Implementation (External Process)
1010

11-
During codebase parsing, the Type Engine spawns a type inference subprocess (defined in `src/codegen/sdk/typescript/external/typescript_analyzer/run_full.ts`) that concurrently parses the codebase with the TypeScript API to resolve return types. The final analyzer output is placed in `/tmp/typescript-analysis.json` and is read in by Codegen to resolve return types.
11+
During codebase parsing, the Type Engine spawns a type inference subprocess (defined in `src/codegen/sdk/typescript/external/typescript_analyzer/run_full.ts`) that concurrently parses the codebase with the TypeScript API to resolve return types. The final analyzer output is placed in `/tmp/typescript-analysis.json` and is read in by Graph-sitter to resolve return types.
1212

1313
## Implementation (V8)
1414

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Codegen Docs
1+
# Graph-sitter Docs
22

33
## Development
44

docs/blog/act-via-code.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The documentation for such a framework isn't just API reference - it's education
109109

110110
Crucially, we believe these APIs will extend beyond the codebase itself into the broader software engineering ecosystem. When agents can seamlessly interact with tools like Datadog, AWS, and other development platforms through the same clean interfaces, we'll take a major step toward [autonomous software engineering](/introduction/about#our-mission). The highest leverage move isn't just giving agents the ability to modify code - it's giving them programmatic access to the entire software development lifecycle.
111111

112-
## Codegen is now OSS
112+
## Graph-sitter is now OSS
113113

114114
We're excited to release [Codegen](https://github.com/codegen-sh/graph-sitter) as open source [Apache 2.0](https://github.com/codegen-sh/graph-sitter/blob/develop/LICENSE) and build out this vision with the broader developer community. [Get started with Codegen](/introduction/getting-started) today or please join us in our [Slack community](https://community.codegen.com) if you have feedback or questions about a use case!
115115

docs/blog/devin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The nice part about this approach is that we don't have to blindly trust the AI.
4646
Want to experience this with your own Devin instance? Install the graph_sitter.cli in your Devin box:
4747

4848
```bash
49-
uv tool install codegen --python 3.13
49+
uv tool install graph-sitter --python 3.13
5050
```
5151

5252
Then use the following prompt:

docs/blog/fixing-import-loops.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ iconType: "solid"
55
description: "Identifying and visualizing import loops in the PyTorch codebase"
66
---
77

8-
In this post, we will visualize all import loops in the [PyTorch](https://github.com/pytorch/pytorch) codebase, propose a fix for one potentially unstable case, and use Codegen to refactor that fix.
8+
In this post, we will visualize all import loops in the [PyTorch](https://github.com/pytorch/pytorch) codebase, propose a fix for one potentially unstable case, and use Graph-sitter to refactor that fix.
99

1010
<Info>
1111
You can find the complete jupyter notebook in our [examples repository](https://github.com/codegen-sh/graph-sitter/tree/develop/examples/examples/removing_import_loops_in_pytorch).
@@ -23,7 +23,7 @@ from module_a import function_a
2323

2424
While Python can handle some import cycles through its import machinery, they can lead to runtime errors, import deadlocks, or initialization order problems.
2525

26-
Debugging import cycle errors can be a challenge, especially when they occur in large codebases. However, Codegen allows us to identify these loops through our visualization tools and fix them very deterministically and at scale.
26+
Debugging import cycle errors can be a challenge, especially when they occur in large codebases. However, Graph-sitter allows us to identify these loops through our visualization tools and fix them very deterministically and at scale.
2727

2828
<Frame caption="Import loop in pytorch/torchgen/model.py">
2929
<iframe

docs/blog/promise-to-async-await-twilio.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Promise -> Async/Await in Twilio Node.js SDK"
33
sidebarTitle: "Promise -> Async/Await"
4-
description: "Using Codegen to automate the conversion of ***592 instances*** of Promise `.then` chains to `async/await` in Twilio's Node.js Repository"
4+
description: "Using Graph-sitter to automate the conversion of ***592 instances*** of Promise `.then` chains to `async/await` in Twilio's Node.js Repository"
55
icon: "hand-fingers-crossed"
66
iconType: "solid"
77
---
@@ -163,6 +163,6 @@ for chain_info in operation_promise_chains:
163163
## Conclusion
164164

165165
Promise chains using `.then()` syntax often leads to complex and deeply nested code that's harder to maintain. It's an active problem that many teams *want* to pursue but never end up doing so due to the time consuming nature of the migration.
166-
Codegen can significantly accelerate these migrations by automating the conversion for several different cases.
166+
Graph-sitter can significantly accelerate these migrations by automating the conversion for several different cases.
167167

168168
Want to try this yourself? Check out our [Promise to Async/Await tutorial](/tutorials/promise-to-async-await)

docs/blog/static-analysis-ai.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ As companies like Grit.io and Codemod.com demonstrate, there's growing recogniti
6262

6363
The most powerful AI coding assistants won't just generate patches or suggest edits. They'll write programs that transform code, leveraging rich static analysis to ensure changes are correct, scalable, and maintainable.
6464

65-
This is why we're building Codegen as a programmatic interface for code manipulation - not just another language server, but a foundation for AI agents to express complex code transformations through code itself.
65+
This is why we're building Graph-sitter as a programmatic interface for code manipulation - not just another language server, but a foundation for AI agents to express complex code transformations through code itself.
6666

6767
The future of code manipulation isn't just about better language models - it's about giving those models the right tools to act effectively on code. Just as self-driving cars need sophisticated controls to navigate the physical world, AI coding agents need powerful, precise interfaces to manipulate codebases.

0 commit comments

Comments
 (0)