Skip to content

Commit 65d6223

Browse files
Update docs to reference graph-sitter instead of codegen package (#132)
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
1 parent b17648b commit 65d6223

16 files changed

+54
-54
lines changed

docs/building-with-graph-sitter/files-and-directories.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ exists = codebase.has_directory("path/to/dir")
5757
## Differences between SourceFile and File
5858

5959
- [File](/api-reference/core/File) - a general purpose class that represents any file in the codebase including non-code files like README.md, .env, .json, image files, etc.
60-
- [SourceFile](/api-reference/core/SourceFile) - a subclass of [File](/api-reference/core/File) that provides additional functionality for source code files written in languages supported by the [codegen-sdk](/introduction/overview) (Python, TypeScript, JavaScript, React).
60+
- [SourceFile](/api-reference/core/SourceFile) - a subclass of [File](/api-reference/core/File) that provides additional functionality for source code files written in languages supported by [graph-sitter](/introduction/overview) (Python, TypeScript, JavaScript, React).
6161

62-
The majority of intended use cases involve using exclusively [SourceFile](/api-reference/core/SourceFile) objects as these contain code that can be parsed and manipulated by the [codegen-sdk](/introduction/overview). However, there may be cases where it will be necessary to work with non-code files. In these cases, the [File](/api-reference/core/File) class can be used.
62+
The majority of intended use cases involve using exclusively [SourceFile](/api-reference/core/SourceFile) objects as these contain code that can be parsed and manipulated by [graph-sitter](/introduction/overview). However, there may be cases where it will be necessary to work with non-code files. In these cases, the [File](/api-reference/core/File) class can be used.
6363

6464
By default, the `codebase.files` property will only return [SourceFile](/api-reference/core/SourceFile) objects. To include non-code files the `extensions='*'` argument must be used.
6565

docs/building-with-graph-sitter/function-decorator.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ iconType: "solid"
77

88
# Function Decorator
99

10-
The `function` decorator is used to define codegen functions within your application. It allows you to specify a name for the function that will be ran making it easier to run specific codemods
10+
The `function` decorator is used to define graph-sitter functions within your application. It allows you to specify a name for the function that will be ran making it easier to run specific codemods
1111

1212
## Usage
1313

@@ -29,7 +29,7 @@ In this example, the function `run` is decorated with `@graph_sitter.function` a
2929

3030
## Description
3131

32-
The `function` decorator is part of the codegen SDK CLI and is used to mark functions that are intended to be ran as part of a code generation process. It ensures that the function is properly registered and can be invoked with the specified name.
32+
The `function` decorator is part of the graph-sitter SDK CLI and is used to mark functions that are intended to be ran as part of a code generation process. It ensures that the function is properly registered and can be invoked with the specified name.
3333

3434

3535
## CLI Examples

docs/building-with-graph-sitter/imports.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ for imp in file.imports:
2020
imp = file.get_import('math')
2121

2222
# Grab and filter from a codebase
23-
from codegen.sdk import ExternalModule
23+
from graph_sitter.sdk import ExternalModule
2424

2525
external_imports = [i for i in codebase.imports if isinstance(i, ExternalModule)]
2626
```

docs/building-with-graph-sitter/parsing-codebases.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ You can customize the behavior of your Codebase instance by passing a `CodebaseC
6969

7070
```python
7171
from graph_sitter import Codebase
72-
from codegen.configs.models.codebase import CodebaseConfig
73-
from codegen.configs.models.secrets import SecretsConfig
72+
from graph_sitter.configs.models.codebase import CodebaseConfig
73+
from graph_sitter.configs.models.secrets import SecretsConfig
7474

7575
codebase = Codebase(
7676
"path/to/repository",
@@ -97,9 +97,9 @@ Here's an example:
9797

9898
```python
9999
from graph_sitter import Codebase
100-
from codegen.git.repo_operator.local_repo_operator import LocalRepoOperator
101-
from codegen.git.schemas.repo_config import BaseRepoConfig
102-
from codegen.sdk.codebase.config import ProjectConfig
100+
from graph_sitter.git.repo_operator.local_repo_operator import LocalRepoOperator
101+
from graph_sitter.git.schemas.repo_config import BaseRepoConfig
102+
from graph_sitter.sdk.codebase.config import ProjectConfig
103103

104104
codebase = Codebase(
105105
projects = [

docs/building-with-graph-sitter/traversing-the-call-graph.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Here's how to build a directed graph of function calls using NetworkX:
3030

3131
```python
3232
import networkx as nx
33-
from codegen.sdk.core.interfaces.callable import FunctionCallDefinition
34-
from codegen.sdk.core.function import Function
35-
from codegen.sdk.core.external_module import ExternalModule
33+
from graph_sitter.sdk.core.interfaces.callable import FunctionCallDefinition
34+
from graph_sitter.sdk.core.function import Function
35+
from graph_sitter.sdk.core.external_module import ExternalModule
3636

3737
def create_call_graph(start_func, end_func, max_depth=5):
3838
G = nx.DiGraph()

docs/graph-sitter/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ These flags are helpful for debugging problematic repos, optimizing Codegen’s
284284

285285
```python
286286
from graph_sitter import Codebase
287-
from codegen.configs import CodebaseConfig
287+
from graph_sitter.configs import CodebaseConfig
288288

289289
# Initialize a Codebase with custom configuration
290290
codebase = Codebase(

docs/introduction/advanced-settings.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You can customize the behavior of the graph construction process when initializi
2727

2828
```python
2929
from graph_sitter import Codebase
30-
from codegen.configs import CodebaseConfig
30+
from graph_sitter.configs import CodebaseConfig
3131

3232
# Initialize a Codebase with custom configuration
3333
codebase = Codebase(
@@ -216,7 +216,7 @@ This experimental flag pushes the graph creation back until the graph is needed.
216216
**Example Codemod:**
217217
```python
218218
from graph_sitter import Codebase
219-
from codegen.configs import CodebaseConfig
219+
from graph_sitter.configs import CodebaseConfig
220220

221221
# Enable lazy graph parsing
222222
codebase = Codebase("<repo_path>", config=CodebaseConfig(exp_lazy_graph=True))

docs/introduction/api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The [Codegen SDK](https://github.com/codegen-sh/graph-sitter) enables developers
1212
</Tip>
1313

1414
```python
15-
from codegen import Agent
15+
from graph_sitter import Agent
1616

1717
# Initialize the Agent with your organization ID and API token
1818
agent = Agent(org_id="...", token="...")

docs/introduction/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ These flags are helpful for debugging problematic repos, optimizing Codegen’s
284284

285285
```python
286286
from graph_sitter import Codebase
287-
from codegen.configs import CodebaseConfig
287+
from graph_sitter.configs import CodebaseConfig
288288

289289
# Initialize a Codebase with custom configuration
290290
codebase = Codebase(

docs/introduction/installation.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ We recommend using [uv](https://github.com/astral-sh/uv) for installation. If yo
2222
curl -LsSf https://astral.sh/uv/install.sh | sh
2323
```
2424

25-
## Installing Codegen
25+
## Installing Graph-sitter
2626

2727
```bash
2828
uv tool install graph-sitter --python 3.13
2929
```
3030

3131

3232
<Note>
33-
This makes the `codegen` command available globally in your terminal, while keeping its dependencies isolated.
33+
This makes the `graph-sitter` command available globally in your terminal, while keeping its dependencies isolated.
3434
</Note>
3535

3636
## Quick Start
@@ -83,7 +83,7 @@ Let's walk through a minimal example of using Graph-sitter in a project:
8383
Having issues? Here are some common problems and their solutions:
8484

8585
- **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`.
86-
- **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`.
86+
- **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`.
8787
- **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)`.
8888

8989
<Note>
@@ -119,7 +119,7 @@ For more help, join our [community Slack](/introduction/community) or check the
119119
icon="hammer"
120120
href="/building-with-graph-sitter/at-a-glance"
121121
>
122-
Learn more about building with Codegen
122+
Learn more about building with Graph-sitter
123123
</Card>
124124

125125
</CardGroup>

0 commit comments

Comments
 (0)