codegraphy 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {codegraphy-0.1.0 → codegraphy-0.1.1}/PKG-INFO +10 -8
  2. {codegraphy-0.1.0 → codegraphy-0.1.1}/README.md +9 -7
  3. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/__init__.py +1 -1
  4. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/cli.py +14 -15
  5. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/config.py +3 -3
  6. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/mcp/server.py +4 -4
  7. {codegraphy-0.1.0 → codegraphy-0.1.1}/codegraphy.egg-info/PKG-INFO +10 -8
  8. codegraphy-0.1.1/codegraphy.egg-info/SOURCES.txt +24 -0
  9. codegraphy-0.1.1/codegraphy.egg-info/entry_points.txt +2 -0
  10. codegraphy-0.1.1/codegraphy.egg-info/top_level.txt +1 -0
  11. {codegraphy-0.1.0 → codegraphy-0.1.1}/pyproject.toml +3 -3
  12. codegraphy-0.1.0/codegraphy.egg-info/SOURCES.txt +0 -24
  13. codegraphy-0.1.0/codegraphy.egg-info/entry_points.txt +0 -2
  14. codegraphy-0.1.0/codegraphy.egg-info/top_level.txt +0 -1
  15. {codegraphy-0.1.0 → codegraphy-0.1.1}/LICENSE +0 -0
  16. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/db/__init__.py +0 -0
  17. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/db/schema.py +0 -0
  18. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/db/store.py +0 -0
  19. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/indexer/__init__.py +0 -0
  20. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/indexer/base.py +0 -0
  21. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/indexer/python.py +0 -0
  22. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/indexer/walker.py +0 -0
  23. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/mcp/__init__.py +0 -0
  24. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/plugins/__init__.py +0 -0
  25. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/plugins/base.py +0 -0
  26. {codegraphy-0.1.0/repolens → codegraphy-0.1.1/codegraphy}/plugins/django.py +0 -0
  27. {codegraphy-0.1.0 → codegraphy-0.1.1}/codegraphy.egg-info/dependency_links.txt +0 -0
  28. {codegraphy-0.1.0 → codegraphy-0.1.1}/codegraphy.egg-info/requires.txt +0 -0
  29. {codegraphy-0.1.0 → codegraphy-0.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphy
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: SQLite/PostgreSQL codebase knowledge graph and MCP server for Claude Code
5
5
  Author: Charan Kulal
6
6
  License-Expression: MIT
@@ -42,6 +42,8 @@ Dynamic: license-file
42
42
 
43
43
  Standalone Python package that parses a codebase into a knowledge graph (PostgreSQL or SQLite) and exposes it as an [MCP](https://modelcontextprotocol.io/) server for Claude Code. Claude calls graph tools instead of `Read` + `Bash(grep)` — cuts exploration token cost by 5–10×.
44
44
 
45
+ **PyPI:** https://pypi.org/project/codegraphy/
46
+
45
47
  **Python:** 3.10+
46
48
  **License:** MIT
47
49
 
@@ -136,9 +138,9 @@ Priority: CLI flag → environment variable → `codegraphy.toml` → defaults.
136
138
  ### Environment Variables
137
139
 
138
140
  ```bash
139
- DATABASE_URL=sqlite:///codegraphy.db # or postgresql://localhost/codegraphy
140
- REPOLENS_ROOT=. # project root for grep fallback
141
- REPOLENS_PLUGINS=repolens.plugins.django
141
+ DATABASE_URL=sqlite:///codegraphy.db # or postgresql://localhost/codegraphy
142
+ CODEGRAPHY_ROOT=. # project root for grep fallback
143
+ CODEGRAPHY_PLUGINS=codegraphy.plugins.django
142
144
  ```
143
145
 
144
146
  ### Config File (optional)
@@ -148,7 +150,7 @@ REPOLENS_PLUGINS=repolens.plugins.django
148
150
  database_url = "postgresql://localhost/codegraphy"
149
151
  root = "."
150
152
  exclude = ["migrations", "node_modules", ".venv", "__pycache__"]
151
- plugins = ["repolens.plugins.django"]
153
+ plugins = ["codegraphy.plugins.django"]
152
154
  ```
153
155
 
154
156
  ---
@@ -191,9 +193,9 @@ plugins = ["repolens.plugins.django"]
191
193
  ## Architecture
192
194
 
193
195
  ```
194
- repolens/
196
+ codegraphy/
195
197
  ├── cli.py # Click CLI entry points
196
- ├── config.py # DATABASE_URL, REPOLENS_ROOT, plugin list
198
+ ├── config.py # DATABASE_URL, CODEGRAPHY_ROOT, plugin list
197
199
  ├── db/
198
200
  │ ├── schema.py # CREATE TABLE statements (PG + SQLite)
199
201
  │ └── store.py # upsert_symbol, upsert_edge, query helpers
@@ -250,7 +252,7 @@ Detects Django patterns by file naming convention:
250
252
 
251
253
  Enable via environment variable:
252
254
  ```bash
253
- REPOLENS_PLUGINS=repolens.plugins.django
255
+ CODEGRAPHY_PLUGINS=codegraphy.plugins.django
254
256
  ```
255
257
 
256
258
  ---
@@ -2,6 +2,8 @@
2
2
 
3
3
  Standalone Python package that parses a codebase into a knowledge graph (PostgreSQL or SQLite) and exposes it as an [MCP](https://modelcontextprotocol.io/) server for Claude Code. Claude calls graph tools instead of `Read` + `Bash(grep)` — cuts exploration token cost by 5–10×.
4
4
 
5
+ **PyPI:** https://pypi.org/project/codegraphy/
6
+
5
7
  **Python:** 3.10+
6
8
  **License:** MIT
7
9
 
@@ -96,9 +98,9 @@ Priority: CLI flag → environment variable → `codegraphy.toml` → defaults.
96
98
  ### Environment Variables
97
99
 
98
100
  ```bash
99
- DATABASE_URL=sqlite:///codegraphy.db # or postgresql://localhost/codegraphy
100
- REPOLENS_ROOT=. # project root for grep fallback
101
- REPOLENS_PLUGINS=repolens.plugins.django
101
+ DATABASE_URL=sqlite:///codegraphy.db # or postgresql://localhost/codegraphy
102
+ CODEGRAPHY_ROOT=. # project root for grep fallback
103
+ CODEGRAPHY_PLUGINS=codegraphy.plugins.django
102
104
  ```
103
105
 
104
106
  ### Config File (optional)
@@ -108,7 +110,7 @@ REPOLENS_PLUGINS=repolens.plugins.django
108
110
  database_url = "postgresql://localhost/codegraphy"
109
111
  root = "."
110
112
  exclude = ["migrations", "node_modules", ".venv", "__pycache__"]
111
- plugins = ["repolens.plugins.django"]
113
+ plugins = ["codegraphy.plugins.django"]
112
114
  ```
113
115
 
114
116
  ---
@@ -151,9 +153,9 @@ plugins = ["repolens.plugins.django"]
151
153
  ## Architecture
152
154
 
153
155
  ```
154
- repolens/
156
+ codegraphy/
155
157
  ├── cli.py # Click CLI entry points
156
- ├── config.py # DATABASE_URL, REPOLENS_ROOT, plugin list
158
+ ├── config.py # DATABASE_URL, CODEGRAPHY_ROOT, plugin list
157
159
  ├── db/
158
160
  │ ├── schema.py # CREATE TABLE statements (PG + SQLite)
159
161
  │ └── store.py # upsert_symbol, upsert_edge, query helpers
@@ -210,7 +212,7 @@ Detects Django patterns by file naming convention:
210
212
 
211
213
  Enable via environment variable:
212
214
  ```bash
213
- REPOLENS_PLUGINS=repolens.plugins.django
215
+ CODEGRAPHY_PLUGINS=codegraphy.plugins.django
214
216
  ```
215
217
 
216
218
  ---
@@ -2,4 +2,4 @@
2
2
  codegraphy: Parses a codebase into a Postgres/SQLite knowledge graph and exposes it as an MCP server.
3
3
  """
4
4
 
5
- __version__ = "0.1.0"
5
+ __version__ = "0.1.1"
@@ -10,8 +10,8 @@ def cli():
10
10
  @click.option('--db', help='Database URL (e.g. postgresql://localhost/codegraphy)')
11
11
  def init(db):
12
12
  """Initialize the database schema."""
13
- import repolens.config as config
14
- from repolens.db.store import Store
13
+ import codegraphy.config as config
14
+ from codegraphy.db.store import Store
15
15
 
16
16
  db_url = db or config.DATABASE_URL
17
17
  click.echo(f"Initializing schema for {db_url}...")
@@ -24,16 +24,16 @@ def init(db):
24
24
  @click.option('--exclude', help='Comma-separated list of directories to exclude')
25
25
  def index(path, exclude):
26
26
  """Index a directory into the graph."""
27
- import repolens.config as config
28
- from repolens.db.store import Store
29
- from repolens.indexer.walker import index_path
27
+ import codegraphy.config as config
28
+ from codegraphy.db.store import Store
29
+ from codegraphy.indexer.walker import index_path
30
30
 
31
31
  click.echo(f"Indexing {path}...")
32
32
  store = Store(config.DATABASE_URL)
33
33
  exclude_list = exclude.split(',') if exclude else None
34
34
 
35
35
  # Load plugins
36
- plugins = [] # TODO: instantiate from config.REPOLENS_PLUGINS
36
+ plugins = [] # TODO: instantiate from config.CODEGRAPHY_PLUGINS
37
37
 
38
38
  count = index_path(path, store, plugins, exclude_list)
39
39
  click.echo(f"Indexed {count} files.")
@@ -42,9 +42,8 @@ def index(path, exclude):
42
42
  def update():
43
43
  """Update index incrementally based on git diff."""
44
44
  import subprocess
45
- import repolens.config as config
46
- from repolens.db.store import Store
47
- from repolens.indexer.walker import index_path
45
+ import codegraphy.config as config
46
+ from codegraphy.db.store import Store
48
47
 
49
48
  click.echo("Updating index...")
50
49
  try:
@@ -63,7 +62,7 @@ def update():
63
62
  # Re-using index_path is tricky since it takes a root.
64
63
  # We can just write a small loop here for the changed files.
65
64
  import os
66
- from repolens.indexer.walker import INDEXERS, sha256
65
+ from codegraphy.indexer.walker import INDEXERS, sha256
67
66
 
68
67
  path = os.path.abspath(file_path)
69
68
  if not os.path.exists(path):
@@ -97,7 +96,7 @@ def update():
97
96
  @cli.command()
98
97
  def serve():
99
98
  """Start the MCP server over stdio."""
100
- from repolens.mcp.server import start_server
99
+ from codegraphy.mcp.server import start_server
101
100
  click.echo("Starting MCP server...", err=True)
102
101
  start_server()
103
102
 
@@ -105,7 +104,7 @@ def serve():
105
104
  @click.argument('name')
106
105
  def search(name):
107
106
  """Search for a symbol in the graph."""
108
- from repolens.mcp.server import search_symbol
107
+ from codegraphy.mcp.server import search_symbol
109
108
  results = search_symbol(name)
110
109
  for res in results:
111
110
  click.echo(f"[{res['source']}] {res.get('qualified_name') or res.get('file_path')} - {res.get('kind', 'grep')} @ {res['line_start']}")
@@ -114,7 +113,7 @@ def search(name):
114
113
  @click.argument('name')
115
114
  def usages(name):
116
115
  """Find usages of a symbol."""
117
- from repolens.mcp.server import find_usages
116
+ from codegraphy.mcp.server import find_usages
118
117
  results = find_usages(name)
119
118
  for res in results:
120
119
  click.echo(f"[{res['source']}] {res.get('from_qualified') or res.get('file_path')} - {res.get('relation', 'grep')} @ {res['line_start']}")
@@ -122,8 +121,8 @@ def usages(name):
122
121
  @cli.command()
123
122
  def stats():
124
123
  """Show graph statistics."""
125
- from repolens.db.store import Store
126
- import repolens.config as config
124
+ from codegraphy.db.store import Store
125
+ import codegraphy.config as config
127
126
  store = Store(config.DATABASE_URL)
128
127
  with store.get_connection() as conn:
129
128
  cursor = conn.cursor()
@@ -2,11 +2,11 @@ import os
2
2
 
3
3
  # Default configuration
4
4
  DATABASE_URL = os.environ.get("DATABASE_URL", "sqlite:///codegraphy.db")
5
- REPOLENS_ROOT = os.environ.get("REPOLENS_ROOT", ".")
5
+ CODEGRAPHY_ROOT = os.environ.get("CODEGRAPHY_ROOT", ".")
6
6
 
7
7
  # Plugin list can be derived from env vars or TOML
8
- _plugins_env = os.environ.get("REPOLENS_PLUGINS", "")
9
- REPOLENS_PLUGINS = [p.strip() for p in _plugins_env.split(",")] if _plugins_env else []
8
+ _plugins_env = os.environ.get("CODEGRAPHY_PLUGINS", "")
9
+ CODEGRAPHY_PLUGINS = [p.strip() for p in _plugins_env.split(",")] if _plugins_env else []
10
10
 
11
11
  def load_config():
12
12
  # Placeholder for loading from codegraphy.toml if needed
@@ -1,6 +1,6 @@
1
1
  from mcp.server.fastmcp import FastMCP
2
2
  from ..db.store import Store
3
- from ..config import DATABASE_URL, REPOLENS_ROOT
3
+ from ..config import DATABASE_URL, CODEGRAPHY_ROOT
4
4
  import subprocess
5
5
 
6
6
  mcp = FastMCP("codegraphy")
@@ -53,7 +53,7 @@ def search_symbol(name: str, kind: str = None, limit: int = 10, fallback_grep: b
53
53
  if not results and fallback_grep:
54
54
  try:
55
55
  # We use subprocess to run grep
56
- grep_cmd = ['grep', '-rn', '--include=*.py', '--include=*.js', '--include=*.ts', '--include=*.html', name, REPOLENS_ROOT]
56
+ grep_cmd = ['grep', '-rn', '--include=*.py', '--include=*.js', '--include=*.ts', '--include=*.html', name, CODEGRAPHY_ROOT]
57
57
  res = subprocess.run(grep_cmd, capture_output=True, text=True)
58
58
  if res.stdout:
59
59
  for line in res.stdout.splitlines()[:limit]:
@@ -145,7 +145,7 @@ def find_usages(qualified_name: str, limit: int = 20, fallback_grep: bool = True
145
145
  if not results and fallback_grep:
146
146
  short_name = qualified_name.split('.')[-1]
147
147
  try:
148
- grep_cmd = ['grep', '-rn', short_name, REPOLENS_ROOT]
148
+ grep_cmd = ['grep', '-rn', short_name, CODEGRAPHY_ROOT]
149
149
  res = subprocess.run(grep_cmd, capture_output=True, text=True)
150
150
  if res.stdout:
151
151
  for line in res.stdout.splitlines()[:limit]:
@@ -276,7 +276,7 @@ def grep_search(pattern: str, include: list[str] = None, exclude: list[str] = No
276
276
  for exc in exclude:
277
277
  cmd.append(f'--exclude-dir={exc}')
278
278
 
279
- cmd.extend([pattern, REPOLENS_ROOT])
279
+ cmd.extend([pattern, CODEGRAPHY_ROOT])
280
280
 
281
281
  results = []
282
282
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphy
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: SQLite/PostgreSQL codebase knowledge graph and MCP server for Claude Code
5
5
  Author: Charan Kulal
6
6
  License-Expression: MIT
@@ -42,6 +42,8 @@ Dynamic: license-file
42
42
 
43
43
  Standalone Python package that parses a codebase into a knowledge graph (PostgreSQL or SQLite) and exposes it as an [MCP](https://modelcontextprotocol.io/) server for Claude Code. Claude calls graph tools instead of `Read` + `Bash(grep)` — cuts exploration token cost by 5–10×.
44
44
 
45
+ **PyPI:** https://pypi.org/project/codegraphy/
46
+
45
47
  **Python:** 3.10+
46
48
  **License:** MIT
47
49
 
@@ -136,9 +138,9 @@ Priority: CLI flag → environment variable → `codegraphy.toml` → defaults.
136
138
  ### Environment Variables
137
139
 
138
140
  ```bash
139
- DATABASE_URL=sqlite:///codegraphy.db # or postgresql://localhost/codegraphy
140
- REPOLENS_ROOT=. # project root for grep fallback
141
- REPOLENS_PLUGINS=repolens.plugins.django
141
+ DATABASE_URL=sqlite:///codegraphy.db # or postgresql://localhost/codegraphy
142
+ CODEGRAPHY_ROOT=. # project root for grep fallback
143
+ CODEGRAPHY_PLUGINS=codegraphy.plugins.django
142
144
  ```
143
145
 
144
146
  ### Config File (optional)
@@ -148,7 +150,7 @@ REPOLENS_PLUGINS=repolens.plugins.django
148
150
  database_url = "postgresql://localhost/codegraphy"
149
151
  root = "."
150
152
  exclude = ["migrations", "node_modules", ".venv", "__pycache__"]
151
- plugins = ["repolens.plugins.django"]
153
+ plugins = ["codegraphy.plugins.django"]
152
154
  ```
153
155
 
154
156
  ---
@@ -191,9 +193,9 @@ plugins = ["repolens.plugins.django"]
191
193
  ## Architecture
192
194
 
193
195
  ```
194
- repolens/
196
+ codegraphy/
195
197
  ├── cli.py # Click CLI entry points
196
- ├── config.py # DATABASE_URL, REPOLENS_ROOT, plugin list
198
+ ├── config.py # DATABASE_URL, CODEGRAPHY_ROOT, plugin list
197
199
  ├── db/
198
200
  │ ├── schema.py # CREATE TABLE statements (PG + SQLite)
199
201
  │ └── store.py # upsert_symbol, upsert_edge, query helpers
@@ -250,7 +252,7 @@ Detects Django patterns by file naming convention:
250
252
 
251
253
  Enable via environment variable:
252
254
  ```bash
253
- REPOLENS_PLUGINS=repolens.plugins.django
255
+ CODEGRAPHY_PLUGINS=codegraphy.plugins.django
254
256
  ```
255
257
 
256
258
  ---
@@ -0,0 +1,24 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ codegraphy/__init__.py
5
+ codegraphy/cli.py
6
+ codegraphy/config.py
7
+ codegraphy.egg-info/PKG-INFO
8
+ codegraphy.egg-info/SOURCES.txt
9
+ codegraphy.egg-info/dependency_links.txt
10
+ codegraphy.egg-info/entry_points.txt
11
+ codegraphy.egg-info/requires.txt
12
+ codegraphy.egg-info/top_level.txt
13
+ codegraphy/db/__init__.py
14
+ codegraphy/db/schema.py
15
+ codegraphy/db/store.py
16
+ codegraphy/indexer/__init__.py
17
+ codegraphy/indexer/base.py
18
+ codegraphy/indexer/python.py
19
+ codegraphy/indexer/walker.py
20
+ codegraphy/mcp/__init__.py
21
+ codegraphy/mcp/server.py
22
+ codegraphy/plugins/__init__.py
23
+ codegraphy/plugins/base.py
24
+ codegraphy/plugins/django.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ codegraphy = codegraphy.cli:cli
@@ -0,0 +1 @@
1
+ codegraphy
@@ -37,10 +37,10 @@ html = ["tree-sitter", "tree-sitter-html"]
37
37
  all = ["psycopg2-binary", "pgvector", "tree-sitter", "tree-sitter-javascript", "tree-sitter-typescript", "tree-sitter-html"]
38
38
 
39
39
  [project.scripts]
40
- codegraphy = "repolens.cli:cli"
40
+ codegraphy = "codegraphy.cli:cli"
41
41
 
42
42
  [tool.setuptools.dynamic]
43
- version = { attr = "repolens.__version__" }
43
+ version = { attr = "codegraphy.__version__" }
44
44
 
45
45
  [tool.setuptools.packages.find]
46
- include = ["repolens*"]
46
+ include = ["codegraphy*"]
@@ -1,24 +0,0 @@
1
- LICENSE
2
- README.md
3
- pyproject.toml
4
- codegraphy.egg-info/PKG-INFO
5
- codegraphy.egg-info/SOURCES.txt
6
- codegraphy.egg-info/dependency_links.txt
7
- codegraphy.egg-info/entry_points.txt
8
- codegraphy.egg-info/requires.txt
9
- codegraphy.egg-info/top_level.txt
10
- repolens/__init__.py
11
- repolens/cli.py
12
- repolens/config.py
13
- repolens/db/__init__.py
14
- repolens/db/schema.py
15
- repolens/db/store.py
16
- repolens/indexer/__init__.py
17
- repolens/indexer/base.py
18
- repolens/indexer/python.py
19
- repolens/indexer/walker.py
20
- repolens/mcp/__init__.py
21
- repolens/mcp/server.py
22
- repolens/plugins/__init__.py
23
- repolens/plugins/base.py
24
- repolens/plugins/django.py
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- codegraphy = repolens.cli:cli
@@ -1 +0,0 @@
1
- repolens
File without changes
File without changes