diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e8a43468c..616f12969 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -14,7 +14,22 @@ jobs:
access-check:
runs-on: ubuntu-latest
steps:
- - uses: actions-cool/check-user-permission@v2
+ - name: Check if bot account
+ id: bot-check
+ run: |
+ actor="${{ github.triggering_actor }}"
+ echo "Checking actor: $actor"
+ if [[ "$actor" == *"[bot]" ]] || [[ "$actor" == "renovate" ]] || [[ "$actor" == "dependabot" ]]; then
+ echo "is_bot=true" >> $GITHUB_OUTPUT
+ echo "Detected bot account: $actor - skipping permission check"
+ exit 0
+ else
+ echo "is_bot=false" >> $GITHUB_OUTPUT
+ echo "Detected human account: $actor"
+ fi
+ - name: Check user permissions
+ if: steps.bot-check.outputs.is_bot == 'false'
+ uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
diff --git a/README.md b/README.md
index e3cb04bbd..6d681e12e 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
-[](https://pypi.org/project/codegen/)
+[](https://pypi.org/project/graph-sitter/)
[](https://graph-sitter.com)
[](https://community.codegen.com)
[](https://github.com/codegen-sh/graph-sitter/tree/develop?tab=Apache-2.0-1-ov-file)
@@ -25,7 +25,7 @@
[Graph-sitter](https://graph-sitter.com) is a python library for manipulating codebases.
```python
-from codegen import Codebase
+from graph_sitter import Codebase
# Graph-sitter builds a complete graph connecting
# functions, classes, imports and their relationships
@@ -67,7 +67,7 @@ gs create test-function
# Run the codemod
gs run test-function
-# Create an isolated venv with codegen => open jupyter
+# Create an isolated venv with graph-sitter => open jupyter
gs notebook
```
@@ -84,7 +84,7 @@ from graph_sitter import Codebase
Having issues? Here are some common problems and their solutions:
- **I'm hitting an UV error related to `[[ packages ]]`**: This means you're likely using an outdated version of UV. Try updating to the latest version with: `uv self update`.
-- **I'm hitting an error about `No module named 'codegen.sdk.extensions.utils'`**: The compiled cython extensions are out of sync. Update them with `uv sync --reinstall-package codegen`.
+- **I'm hitting an error about `No module named 'graph_sitter.sdk.extensions.utils'`**: The compiled cython extensions are out of sync. Update them with `uv sync --reinstall-package graph-sitter`.
- **I'm hitting a `RecursionError: maximum recursion depth exceeded` error while parsing my codebase**: If you are using python 3.12, try upgrading to 3.13. If you are already on 3.13, try upping the recursion limit with `sys.setrecursionlimit(10000)`.
If you run into additional issues not listed here, please [join our slack community](https://community.codegen.com) and we'll help you out!
diff --git a/architecture/3. imports-exports/A. Imports.md b/architecture/3. imports-exports/A. Imports.md
index cca5951ab..e11e4ac85 100644
--- a/architecture/3. imports-exports/A. Imports.md
+++ b/architecture/3. imports-exports/A. Imports.md
@@ -2,7 +2,7 @@
Import resolution follows AST construction in the code analysis pipeline. It identifies dependencies between modules and builds a graph of relationships across the codebase.
-> NOTE: This is an actively evolving part of Codegen SDK, so some details here may be imcomplete, outdated, or incorrect.
+> NOTE: This is an actively evolving part of Graph-sitter SDK, so some details here may be imcomplete, outdated, or incorrect.
## Purpose
diff --git a/architecture/architecture.md b/architecture/architecture.md
index dd044e4dc..bb26e072c 100644
--- a/architecture/architecture.md
+++ b/architecture/architecture.md
@@ -1,6 +1,6 @@
-# Architecture of the Codegen SDK
+# Architecture of the Graph-sitter SDK
-This is a technical document explaining the architecture of the Codegen SDK.
+This is a technical document explaining the architecture of the Graph-sitter SDK.
## Purpose of the SDK
@@ -17,7 +17,7 @@ This SDK is designed to accomplish a large set of use cases in one tool:
### Performance
-A key problem is performance. We must be able to quickly respond to user requests on enterprise codebases (IE: renaming a symbol). However, we don't know what those requests are in advance and the scope of these requests can be quite massive (They may choose to iterate over a large number of symbols and their usages). To respond to these problems, we introduced codegen cloud. We split operations into two parts:
+A key problem is performance. We must be able to quickly respond to user requests on enterprise codebases (IE: renaming a symbol). However, we don't know what those requests are in advance and the scope of these requests can be quite massive (They may choose to iterate over a large number of symbols and their usages). To respond to these problems, we introduced graph-sitter cloud. We split operations into two parts:
- A "parse" step that builds up a graph of the codebase
- This can take a long time to complete, but it only needs to be done once
@@ -34,12 +34,12 @@ To accomplish these goals, we can look at existing classes of solutions:
### Language Server Architecture
-The immediate question is: why not use a language server? They have a lot of the same goals as codegen, but do not address many of our goals:
+The immediate question is: why not use a language server? They have a lot of the same goals as graph-sitter, but do not address many of our goals:
- Language servers can handle many of these same use cases, but they are not as performant as we need.
- Generally, language servers compute their results lazily. This doesn't work for us because we need to perform a large number of operations on the codebase.
-- While the LSP protocol is powerful, it is not designed to be scriptable the way codegen is.
-- In Python, many of the language servers are an aglamation of many different tools and libraries. None are very good at refactoring or offer the comprehensive set of features that codegen does.
+- While the LSP protocol is powerful, it is not designed to be scriptable the way graph-sitter is.
+- In Python, many of the language servers are an aglamation of many different tools and libraries. None are very good at refactoring or offer the comprehensive set of features that graph-sitter does.
Generally language servers parse codebases in response to user actions. This is not a good fit for us because we need to perform a large number of operations on the codebase without knowing which symbols are being changed or queried.
@@ -56,7 +56,7 @@ Generally compilers build up knowledge of the entire codebase in a single pass.
## Architecture
-The codegen SDK combines aspects of both systems to accomplish our goals.
+The graph-sitter SDK combines aspects of both systems to accomplish our goals.
At a high level our architecture is:
1. We discover files to parse
diff --git a/architecture/external/dependency-manager.md b/architecture/external/dependency-manager.md
index 934d0d40c..a53af484c 100644
--- a/architecture/external/dependency-manager.md
+++ b/architecture/external/dependency-manager.md
@@ -1,6 +1,6 @@
# Dependency Manager
-> WARNING: Dependency manager is an experimental feature designed for Codegen Cloud! The current implementation WILL delete any existing `node_modules` folder!
+> WARNING: Dependency manager is an experimental feature designed for Graph-sitter Cloud! The current implementation WILL delete any existing `node_modules` folder!
## Motivation
diff --git a/examples/README.md b/examples/README.md
index 100cb77cd..7209404f3 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -2,7 +2,7 @@
[](https://graph-sitter.com)
-This is a collection of examples using [Codegen](https://codegen.com). You can use these examples to learn how to use Codegen and build custom code transformations.
+This is a collection of examples using [Graph-sitter](https://graph-sitter.com). You can use these examples to learn how to use Graph-sitter and build custom code transformations.
## Setup
@@ -32,7 +32,7 @@ Your environment is now ready to run example codemods.
### IDE Configuration (Optional)
-To configure your IDE for optimal use with Codegen, follow our [IDE setup guide](https://graph-sitter.com/introduction/ide-usage#configuring-your-ide-interpreter).
+To configure your IDE for optimal use with Graph-sitter, follow our [IDE setup guide](https://graph-sitter.com/introduction/ide-usage#configuring-your-ide-interpreter).
## Examples
diff --git a/examples/STRUCTURE.md b/examples/STRUCTURE.md
index c27deb1a5..b4222af0d 100644
--- a/examples/STRUCTURE.md
+++ b/examples/STRUCTURE.md
@@ -27,7 +27,7 @@ Your `run.py` should follow this structure, demonstrated well in the `generate_t
```python
import graph_sitter
from graph_sitter import Codebase
- from codegen.sdk.core import Function
+ from graph_sitter.core import Function
# ... other imports
```
@@ -177,4 +177,4 @@ Before submitting:
1. Ensure the example runs with minimal setup
1. Check that documentation is clear and accurate
-Remember: Your example might be used by both humans and AI to understand Codegen's capabilities. Clear structure and documentation help everyone use your code effectively.
+Remember: Your example might be used by both humans and AI to understand Graph-sitter's capabilities. Clear structure and documentation help everyone use your code effectively.
diff --git a/examples/examples/ai_impact_analysis/dashboard/README.md b/examples/examples/ai_impact_analysis/dashboard/README.md
index 74e3c2eec..41de8b6a1 100644
--- a/examples/examples/ai_impact_analysis/dashboard/README.md
+++ b/examples/examples/ai_impact_analysis/dashboard/README.md
@@ -11,7 +11,7 @@ A web dashboard for visualizing AI-generated code contributions in your codebase
```bash
uv venv
source .venv/bin/activate
-uv pip install modal codegen fastapi
+uv pip install modal graph-sitter fastapi
```
2. Deploy or serve the Modal endpoint:
diff --git a/examples/examples/codegen-mcp-server/README.md b/examples/examples/codegen-mcp-server/README.md
index da24e6430..14f884d47 100644
--- a/examples/examples/codegen-mcp-server/README.md
+++ b/examples/examples/codegen-mcp-server/README.md
@@ -7,7 +7,7 @@
- An MCP server implementation that integrates the codegen sdk.
+ An MCP server implementation that integrates the graph-sitter sdk.
@@ -18,10 +18,10 @@
-This example demonstrates how to run a Model Control Protocol (MCP) server that integrates with Codegen. The server provides:
+This example demonstrates how to run a Model Control Protocol (MCP) server that integrates with Graph-sitter. The server provides:
1. A standardized interface for model inference
-1. Integration with Codegen's core functionality, parsing codebases and executing codemods
+1. Integration with Graph-sitter's core functionality, parsing codebases and executing codemods
1. Support for various LLM providers through the MCP protocol
## Quick Start
@@ -64,4 +64,4 @@ Here is an example mcp config that can be used with Cline or Claude desktop to i
- `parse_codebase`: Parses a codebase located at the provided path.
- `check_parse_status`: Provides the current parsing status for the provided codebase.
-- `execute_codemod`: Executes a codemod script on a parsed codebase. This is where the codegen sdk leveraged to run simple or sophisticated codemods on the codebase.
+- `execute_codemod`: Executes a codemod script on a parsed codebase. This is where the graph-sitter sdk leveraged to run simple or sophisticated codemods on the codebase.
diff --git a/examples/examples/cyclomatic_complexity/README.md b/examples/examples/cyclomatic_complexity/README.md
index 2c833bac0..57bf92199 100644
--- a/examples/examples/cyclomatic_complexity/README.md
+++ b/examples/examples/cyclomatic_complexity/README.md
@@ -1,6 +1,6 @@
# Cyclomatic Complexity Analyzer
-This example demonstrates how to analyze the cyclomatic complexity of Python codebases using Codegen. The script provides detailed insights into code complexity by analyzing control flow structures and providing a comprehensive report.
+This example demonstrates how to analyze the cyclomatic complexity of Python codebases using Graph-sitter. The script provides detailed insights into code complexity by analyzing control flow structures and providing a comprehensive report.
> [!NOTE]
> The cyclomatic complexity metric helps identify complex code that might need refactoring. A higher score indicates more complex code with multiple decision points.
@@ -15,7 +15,7 @@ The script (`run.py`) performs the complexity analysis in several key steps:
codebase = Codebase.from_repo("fastapi/fastapi")
```
- - Loads any Python codebase into Codegen's analysis engine
+ - Loads any Python codebase into Graph-sitter's analysis engine
- Works with local or remote Git repositories
- Supports analyzing specific commits
diff --git a/examples/examples/delete_dead_code/README.md b/examples/examples/delete_dead_code/README.md
index 4ed0a18f0..b611877c6 100644
--- a/examples/examples/delete_dead_code/README.md
+++ b/examples/examples/delete_dead_code/README.md
@@ -1,6 +1,6 @@
# Delete Dead Code
-This example demonstrates how to identify and remove dead code from a codebase using Codegen. The script efficiently cleans up unused functions and variables, helping maintain a lean and efficient codebase.
+This example demonstrates how to identify and remove dead code from a codebase using Graph-sitter. The script efficiently cleans up unused functions and variables, helping maintain a lean and efficient codebase.
> [!NOTE]
> Dead code refers to code that is not being used or referenced anywhere in your codebase. However, some code might appear unused but should not be deleted, such as test files, functions with decorators, public API endpoints, and event handlers.
diff --git a/examples/examples/dict_to_schema/README.md b/examples/examples/dict_to_schema/README.md
index d59937e8e..9a7f613c4 100644
--- a/examples/examples/dict_to_schema/README.md
+++ b/examples/examples/dict_to_schema/README.md
@@ -15,7 +15,7 @@ The script (`run.py`) automates the entire conversion process in a few key steps
codebase = Codebase.from_repo("modal-labs/modal-client")
```
- - Loads your codebase into Codegen's intelligent code analysis engine
+ - Loads your codebase into Graph-sitter's intelligent code analysis engine
- Provides a simple SDK for making codebase-wide changes
- Supports any Git repository as input
diff --git a/examples/examples/document_functions/README.md b/examples/examples/document_functions/README.md
index 9cbef698a..1a1f133fe 100644
--- a/examples/examples/document_functions/README.md
+++ b/examples/examples/document_functions/README.md
@@ -4,7 +4,7 @@ This example demonstrates how to use Graph-sitter to automatically generate comp
## Overview
-The script uses Codegen's symbol analysis capabilities to:
+The script uses Graph-sitter's symbol analysis capabilities to:
1. Identify functions without docstrings
1. Analyze their dependencies and usages up to N degrees deep
diff --git a/examples/examples/fragment_to_shorthand/README.md b/examples/examples/fragment_to_shorthand/README.md
index c28493079..97ebb7cf1 100644
--- a/examples/examples/fragment_to_shorthand/README.md
+++ b/examples/examples/fragment_to_shorthand/README.md
@@ -39,7 +39,7 @@ The script automates the entire conversion process in a few key steps:
1. **Zero Manual Updates**
- - Codegen SDK handles all Fragment replacements
+ - Graph-sitter SDK handles all Fragment replacements
- Automatically cleans up imports
1. **Consistent Changes**
@@ -66,7 +66,7 @@ The script will:
- [React Fragments](https://react.dev/reference/react/Fragment)
- [JSX Fragments](https://react.dev/reference/jsx#jsx-fragments)
- [Graph-sitter Documentation](https://graph-sitter.com)
-- [More on Codegen SDK jsx elements API](https://graph-sitter.com/api-reference/typescript/JSXElement#jsxelement)
+- [More on Graph-sitter SDK jsx elements API](https://graph-sitter.com/api-reference/typescript/JSXElement#jsxelement)
## Contributing