You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
# Contributing to Codegen
1
+
# Contributing to Graph-sitter
2
2
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) 😀.
4
4
5
5
## Contributor License Agreement
6
6
7
-
By contributing to Codegen, you agree that:
7
+
By contributing to Graph-sitter, you agree that:
8
8
9
9
1. Your contributions will be licensed under the project's license.
10
10
1. You have the right to license your contribution under the project's license.
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@
27
27
```python
28
28
from codegen import Codebase
29
29
30
-
#Codegen builds a complete graph connecting
30
+
#Graph-sitter builds a complete graph connecting
31
31
# functions, classes, imports and their relationships
32
32
codebase = Codebase("./")
33
33
@@ -39,25 +39,25 @@ for function in codebase.functions:
39
39
function.move_to_file("deprecated.py")
40
40
```
41
41
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.
- 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.
53
53
- Python, Typescript, Javascript and React codebases
54
54
55
55
```
56
56
# Install inside existing project
57
-
uv pip install codegen
57
+
uv pip install graph-sitter
58
58
59
59
# Install global CLI
60
-
uv tool install codegen --python 3.13
60
+
uv tool install graph-sitter --python 3.13
61
61
62
62
# Create a codemod for a given repo
63
63
cd path/to/repo
@@ -100,13 +100,13 @@ If you run into additional issues not listed here, please [join our slack commun
100
100
101
101
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.
102
102
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:
104
104
105
105
-**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.
106
106
107
107
-**Battle-tested on complex codebases**: Handle Python, TypeScript, and React codebases with millions of lines of code.
108
108
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.
Copy file name to clipboardExpand all lines: architecture/external/dependency-manager.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
## Motivation
6
6
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`)
8
8
9
9
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.
10
10
@@ -31,7 +31,7 @@ repo/
31
31
32
32
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.
33
33
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:
Copy file name to clipboardExpand all lines: architecture/external/type-engine.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Type Engine
2
2
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).
4
4
5
5
> NOTE: Currently, this is only implemented for TypeScript projects.
6
6
7
7
There are currently two experimental implementations of TypeScript's Type Engine: an external process-based implementation and a V8-based implementation.
8
8
9
9
## Implementation (External Process)
10
10
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.
Copy file name to clipboardExpand all lines: docs/blog/act-via-code.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ The documentation for such a framework isn't just API reference - it's education
109
109
110
110
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.
111
111
112
-
## Codegen is now OSS
112
+
## Graph-sitter is now OSS
113
113
114
114
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!
Copy file name to clipboardExpand all lines: docs/blog/fixing-import-loops.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ iconType: "solid"
5
5
description: "Identifying and visualizing import loops in the PyTorch codebase"
6
6
---
7
7
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.
9
9
10
10
<Info>
11
11
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
23
23
24
24
While Python can handle some import cycles through its import machinery, they can lead to runtime errors, import deadlocks, or initialization order problems.
25
25
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.
27
27
28
28
<Framecaption="Import loop in pytorch/torchgen/model.py">
Copy file name to clipboardExpand all lines: docs/blog/promise-to-async-await-twilio.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Promise -> Async/Await in Twilio Node.js SDK"
3
3
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"
5
5
icon: "hand-fingers-crossed"
6
6
iconType: "solid"
7
7
---
@@ -163,6 +163,6 @@ for chain_info in operation_promise_chains:
163
163
## Conclusion
164
164
165
165
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.
167
167
168
168
Want to try this yourself? Check out our [Promise to Async/Await tutorial](/tutorials/promise-to-async-await)
Copy file name to clipboardExpand all lines: docs/blog/static-analysis-ai.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,6 @@ As companies like Grit.io and Codemod.com demonstrate, there's growing recogniti
62
62
63
63
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.
64
64
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.
66
66
67
67
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