Skip to content

Commit 342c607

Browse files
authored
docs: Rename to Graph-sitter, revert agent changes (#31)
- **Revert "docs: prioritizes agent info (#1033)"** - **reorg docs** - **update links**
1 parent 05dc836 commit 342c607

File tree

325 files changed

+6627
-8583
lines changed

Some content is hidden

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

325 files changed

+6627
-8583
lines changed

.github/workflows/generate-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- develop
77

88
permissions:
9-
contents: write # Need write permission to commit changes
9+
contents: write # Need write permission to commit changes
1010

1111
jobs:
1212
generate-docs:
@@ -22,10 +22,10 @@ jobs:
2222
uses: ./.github/actions/setup-environment
2323

2424
- name: Generate API reference
25-
run: uv run python src/gscli/cli.py generate docs
25+
run: uv run python src/graph-sitter/gscli/cli.py generate docs
2626

2727
- name: Generate System Prompt
28-
run: uv run python src/gscli/cli.py generate system-prompt
28+
run: uv run python src/graph-sitter/gscli/cli.py generate system-prompt
2929

3030
- name: Commit changes
3131
run: |

README.md

Lines changed: 65 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,87 @@
77
</p>
88

99
<h2 align="center">
10-
The SWE that Never Sleeps
10+
Scriptable interface to a powerful, multi-lingual language server.
1111
</h2>
1212

1313
<div align="center">
1414

1515
[![PyPI](https://img.shields.io/badge/PyPi-codegen-gray?style=flat-square&color=blue)](https://pypi.org/project/codegen/)
1616
[![Documentation](https://img.shields.io/badge/Docs-docs.codegen.com-purple?style=flat-square)](https://docs.codegen.com)
1717
[![Slack Community](https://img.shields.io/badge/Slack-Join-4A154B?logo=slack&style=flat-square)](https://community.codegen.com)
18-
[![License](https://img.shields.io/badge/Code%20License-Apache%202.0-gray?&color=gray)](https://github.com/codegen-sh/codegen-sdk/tree/develop?tab=Apache-2.0-1-ov-file)
18+
[![License](https://img.shields.io/badge/Code%20License-Apache%202.0-gray?&color=gray)](https://github.com/codegen-sh/graph-sitter/tree/develop?tab=Apache-2.0-1-ov-file)
1919
[![Follow on X](https://img.shields.io/twitter/follow/codegen?style=social)](https://x.com/codegen)
2020

2121
</div>
2222

2323
<br />
2424

25-
The Codegen SDK provides a programmatic interface to code agents provided by [Codegen](https://codegen.com).
25+
[Codegen](https://docs.codegen.com) is a python library for manipulating codebases.
2626

2727
```python
28-
from codegen.agents.agent import Agent
28+
from codegen import Codebase
29+
30+
# Codegen builds a complete graph connecting
31+
# functions, classes, imports and their relationships
32+
codebase = Codebase("./")
33+
34+
# Work with code without dealing with syntax trees or parsing
35+
for function in codebase.functions:
36+
# Comprehensive static analysis for references, dependencies, etc.
37+
if not function.usages:
38+
# Auto-handles references and imports to maintain correctness
39+
function.move_to_file("deprecated.py")
40+
```
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.
2943

30-
# Initialize the Agent with your organization ID and API token
31-
agent = Agent(
32-
org_id="YOUR_ORG_ID", # Find this at codegen.com/developer
33-
token="YOUR_API_TOKEN", # Get this from codegen.com/developer
34-
# base_url="https://codegen-sh-rest-api.modal.run", # Optional - defaults to production
35-
)
44+
## Installation and Usage
3645

37-
# Run an agent with a prompt
38-
task = agent.run(prompt="Implement a new feature to sort users by last login.")
46+
We support
3947

40-
# Check the initial status
41-
print(task.status)
48+
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
49+
- macOS and Linux
50+
- macOS is supported
51+
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
52+
- Windows is supported via WSL. See [here](https://docs.codegen.com/building-with-codegen/codegen-with-wsl) for more details.
53+
- Python, Typescript, Javascript and React codebases
4254

43-
# Refresh the task to get updated status (tasks can take time)
44-
task.refresh()
55+
```
56+
# Install inside existing project
57+
uv pip install codegen
4558
46-
# Check the updated status
47-
print(task.status)
59+
# Install global CLI
60+
uv tool install codegen --python 3.13
4861
49-
# Once task is complete, you can access the result
50-
if task.status == "completed":
51-
print(task.result) # Result often contains code, summaries, or links
62+
# Create a codemod for a given repo
63+
cd path/to/repo
64+
gs init
65+
gs create test-function
66+
67+
# Run the codemod
68+
gs run test-function
69+
70+
# Create an isolated venv with codegen => open jupyter
71+
gs notebook
5272
```
5373

54-
## Installation and Usage
74+
## Usage
5575

56-
Install the SDK using pip or uv:
76+
See [Getting Started](https://docs.codegen.com/introduction/getting-started) for a full tutorial.
5777

58-
```bash
59-
pip install codegen
60-
# or
61-
uv pip install codegen
6278
```
79+
from codegen import Codebase
80+
```
81+
82+
## Troubleshooting
83+
84+
Having issues? Here are some common problems and their solutions:
6385

64-
Get started at [codegen.com](https://codegen.com) and get your API token at [codegen.com/developer](https://codegen.com/developer).
86+
- **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`.
87+
- **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`.
88+
- **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)`.
6589

66-
You can interact with your AI engineer via API, or chat with it in Slack, Linear, Github, or on our website.
90+
If you run into additional issues not listed here, please [join our slack community](https://community.codegen.com) and we'll help you out!
6791

6892
## Resources
6993

@@ -72,6 +96,18 @@ You can interact with your AI engineer via API, or chat with it in Slack, Linear
7296
- [Contributing](CONTRIBUTING.md)
7397
- [Contact Us](https://codegen.com/contact)
7498

99+
## Why Codegen?
100+
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+
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:
104+
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+
107+
- **Battle-tested on complex codebases**: Handle Python, TypeScript, and React codebases with millions of lines of code.
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.
110+
75111
## Contributing
76112

77113
Please see our [Contributing Guide](CONTRIBUTING.md) for instructions on how to set up the development environment and submit contributions.

codegen-examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ uv tool install codegen
1919
Initialize Codegen in your project
2020

2121
```bash
22-
codegen init
22+
gs init
2323
```
2424

2525
Activate the virtual environment

codegen-examples/examples/ai_impact_analysis/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
if not found_git:
4747
# Option C: Use from_repo method which handles cloning
4848
print("No local git repository found. Cloning a repository...")
49-
codebase = Codebase.from_repo(repo_full_name="codegen-sh/codegen", language="python")
49+
codebase = Codebase.from_repo(repo_full_name="codegen-sh/graph-sitter", language="python")
5050

5151
print(f"Codebase loaded with {len(codebase.files)} files and {len(codebase.symbols)} symbols")
5252

codegen-examples/examples/codegen-mcp-server/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div align="center">
1515

1616
[![Documentation](https://img.shields.io/badge/Docs-docs.codegen.com-purple?style=flat-square)](https://docs.codegen.com)
17-
[![License](https://img.shields.io/badge/Code%20License-Apache%202.0-gray?&color=gray)](https://github.com/codegen-sh/codegen-sdk/tree/develop?tab=Apache-2.0-1-ov-file)
17+
[![License](https://img.shields.io/badge/Code%20License-Apache%202.0-gray?&color=gray)](https://github.com/codegen-sh/graph-sitter/tree/develop?tab=Apache-2.0-1-ov-file)
1818

1919
</div>
2020

@@ -36,7 +36,7 @@ This example demonstrates how to run a Model Control Protocol (MCP) server that
3636
1. No installation is necessary, with the following command. Run this command directly or add it your `.json` mcp config file.
3737

3838
```bash
39-
uvx --from 'git+https://github.com/codegen-sh/codegen-sdk.git#egg=codegen-mcp-server&subdirectory=codegen-examples/examples/codegen-mcp-server' codegen-mcp-server
39+
uvx --from 'git+https://github.com/codegen-sh/graph-sitter.git#egg=codegen-mcp-server&subdirectory=codegen-examples/examples/codegen-mcp-server' codegen-mcp-server
4040
```
4141

4242
### Example MCP Config
@@ -50,7 +50,7 @@ Here is an example mcp config that can be used with Cline or Claude desktop to i
5050
"command": "uvx",
5151
"args": [
5252
"--from",
53-
"git+https://github.com/codegen-sh/codegen-sdk.git#egg=codegen-mcp-server&subdirectory=codegen-examples/examples/codegen-mcp-server",
53+
"git+https://github.com/codegen-sh/graph-sitter.git#egg=codegen-mcp-server&subdirectory=codegen-examples/examples/codegen-mcp-server",
5454
"codegen-mcp-server"
5555
],
5656
"disabled": false,

codegen-examples/examples/codegen-mcp-server/llms-install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Please read two things before trying to install this codegen MCP server:
22

3-
1. [Readme](https://raw.githubusercontent.com/codegen-sh/codegen-sdk/refs/heads/develop/codegen-examples/examples/codegen-mcp-server/README.md)
3+
1. [Readme](https://raw.githubusercontent.com/codegen-sh/graph-sitter/refs/heads/develop/codegen-examples/examples/codegen-mcp-server/README.md)
44

55
- This contains the instructions for setting up the mcp server
66

@@ -10,7 +10,7 @@ Please read two things before trying to install this codegen MCP server:
1010

1111
Please use a CURL command to retrieve the contents of the readme and documentation and read both before starting to install the server.
1212

13-
1. curl -sL "https://raw.githubusercontent.com/codegen-sh/codegen-sdk/refs/heads/develop/README.md" | cat
13+
1. curl -sL "https://raw.githubusercontent.com/codegen-sh/graph-sitter/refs/heads/develop/README.md" | cat
1414

1515
1. curl -sL "https://docs.codegen.com/llms.txt" | cat
1616

codegen-examples/examples/linear_webhooks/uv.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codegen-examples/examples/modal_repo_rag/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div align="center">
1414

1515
[![Documentation](https://img.shields.io/badge/Docs-docs.codegen.com-purple?style=flat-square)](https://docs.codegen.com)
16-
[![License](https://img.shields.io/badge/Code%20License-Apache%202.0-gray?&color=gray)](https://github.com/codegen-sh/codegen-sdk/tree/develop?tab=Apache-2.0-1-ov-file)
16+
[![License](https://img.shields.io/badge/Code%20License-Apache%202.0-gray?&color=gray)](https://github.com/codegen-sh/graph-sitter/tree/develop?tab=Apache-2.0-1-ov-file)
1717

1818
</div>
1919

codegen-examples/examples/promises_to_async_await/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Currently, the `promise_chain.convert_to_async_await()` method handles the follo
101101

102102
**IMPORTANT:**
103103

104-
_There will be cases that the current `promise_chain.convert_to_async_await()` cannot handle. In those cases, either right your own transformation logic using the codegen-sdk or open an issue on the [Codegen](https://github.com/codegen-sh/codegen-sdk) repository._
104+
_There will be cases that the current `promise_chain.convert_to_async_await()` cannot handle. In those cases, either right your own transformation logic using the codegen-sdk or open an issue on the [Codegen](https://github.com/codegen-sh/graph-sitter) repository._
105105

106106
## Contributing
107107

codegen-examples/examples/repo_analytics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The script will output a detailed report including:
107107
```
108108
📊 Repository Analysis Report 📊
109109
==================================================
110-
📁 Repository: codegen-sh/codegen
110+
📁 Repository: codegen-sh/graph-sitter
111111
📝 Description: [Repository description from GitHub]
112112
113113
📈 Basic Metrics:

0 commit comments

Comments
 (0)