codeterrain 0.3.1__tar.gz → 0.3.2__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.
- {codeterrain-0.3.1 → codeterrain-0.3.2}/CHANGELOG.md +6 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/PKG-INFO +22 -22
- {codeterrain-0.3.1 → codeterrain-0.3.2}/README.md +21 -21
- {codeterrain-0.3.1 → codeterrain-0.3.2}/pyproject.toml +1 -1
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/__init__.py +1 -1
- {codeterrain-0.3.1 → codeterrain-0.3.2}/uv.lock +1 -1
- {codeterrain-0.3.1 → codeterrain-0.3.2}/.gitattributes +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/.github/workflows/ci.yml +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/.github/workflows/release.yml +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/.gitignore +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/AGENTS.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/CLAUDE.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/LICENSE +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/NOTICE +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/SECURITY.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/charts/make_charts.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/commands.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/configuration.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/design-v0.2.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/extractor-protocol.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/how-it-works.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/accuracy-dark.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/accuracy-light.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/architecture-dark.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/architecture-light.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/field-dark.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/field-light.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/logo.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/prior-art-dark.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/prior-art-light.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/speed-dark.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/speed-light.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/tokens-dark.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/img/tokens-light.svg +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/limits.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/prior-art.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/sandbox.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/docs/why-codeterrain.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-terraform/README.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-terraform/pyproject.toml +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-terraform/src/codeterrain_terraform/__init__.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-terraform/tests/test_terraform.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-typescript/README.md +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-typescript/pyproject.toml +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-typescript/src/codeterrain_typescript/__init__.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-typescript/tests/test_typescript.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/_guard.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/_pytest_dump_plugin.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/_routes_runner.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/budget.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/cache.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/calls_join.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/calls_static.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/cli.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/code_static.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/config.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/executables.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/fixtures_order.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/fixtures_static.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/hookspecs.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/impact.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/languages.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/plugins/__init__.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/plugins/fastapi_routes.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/plugins/manifest_join.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/protocol.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/routes_view.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/sandbox.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/src/codeterrain/views.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/conftest.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/docs/route-access.json +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/pyproject.toml +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/sampleapp/__init__.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/sampleapp/main.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/sampleapp/other.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/tests/api/conftest.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/tests/api/test_items.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/tests/conftest.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/sample_repo/tests/test_root.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_budget.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_cache.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_calls_join.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_calls_static.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_cli.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_code_static.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_config.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_executables.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_fastapi_routes.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_fixtures_order.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_fixtures_static.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_hookspecs.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_impact.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_languages.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_manifest_join.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_protocol.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_pytest_dump_plugin.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_routes_runner.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_routes_view.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_sandbox.py +0 -0
- {codeterrain-0.3.1 → codeterrain-0.3.2}/tests/test_views.py +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2 (2026-11-02)
|
|
4
|
+
|
|
5
|
+
- The README's links to the docs, SECURITY.md and the CHANGELOG are absolute GitHub links. PyPI
|
|
6
|
+
resolves a relative link against its own project page, so on the 0.3.1 page every one of them
|
|
7
|
+
led nowhere.
|
|
8
|
+
|
|
3
9
|
## 0.3.1 (2026-11-02)
|
|
4
10
|
|
|
5
11
|
- The README's diagram of how it works is an image, as the charts are: PyPI does not render
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: codeterrain
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: terrain: answers about your code in under a second. Local, LLM-free structure facts for coding agents; Python first.
|
|
5
5
|
Project-URL: Homepage, https://github.com/benchli-sports/codeterrain
|
|
6
6
|
Project-URL: Issues, https://github.com/benchli-sports/codeterrain/issues
|
|
@@ -71,10 +71,10 @@ wrong guess costs a review round.
|
|
|
71
71
|
|
|
72
72
|
| | |
|
|
73
73
|
|:---|:---|
|
|
74
|
-
| **Accurate where it counts** | Setup order and routes come from pytest and FastAPI themselves: setup order equals `pytest --setup-plan` on every node tested. `refs`, `def` and `impact` read the code statically: they follow imports and re-exports, so an alias counts and a same-named function elsewhere does not, and a name whose meaning depends on run time is left unresolved rather than guessed ([limits](docs/limits.md)). |
|
|
74
|
+
| **Accurate where it counts** | Setup order and routes come from pytest and FastAPI themselves: setup order equals `pytest --setup-plan` on every node tested. `refs`, `def` and `impact` read the code statically: they follow imports and re-exports, so an alias counts and a same-named function elsewhere does not, and a name whose meaning depends on run time is left unresolved rather than guessed ([limits](https://github.com/benchli-sports/codeterrain/blob/main/docs/limits.md)). |
|
|
75
75
|
| **Fast** | Most warm answers take 0.3 to 0.5 s on a large backend, Python start-up included. |
|
|
76
76
|
| **Shorter to read** | 4.4x to 8.8x fewer characters than the grep-and-read it replaces, on code bases with a real fixture graph. That measures the answer, not a whole session's tokens, cost or time. |
|
|
77
|
-
| **Careful with your repo** | The static tier never runs the target's code. Setup order and routes have to import it: they run in a subprocess with an allowlisted environment, dummy cloud credentials and a best-effort network guard, which stop accidents, not hostile code. Run those two on code you trust ([SECURITY.md](SECURITY.md)). |
|
|
77
|
+
| **Careful with your repo** | The static tier never runs the target's code. Setup order and routes have to import it: they run in a subprocess with an allowlisted environment, dummy cloud credentials and a best-effort network guard, which stop accidents, not hostile code. Run those two on code you trust ([SECURITY.md](https://github.com/benchli-sports/codeterrain/blob/main/SECURITY.md)). |
|
|
78
78
|
|
|
79
79
|
## Quick start
|
|
80
80
|
|
|
@@ -183,7 +183,7 @@ commands import the code: use them only on code you trust.
|
|
|
183
183
|
| Where is a Terraform resource, variable or module, and who reads it? | `codeterrain def NAME`, `codeterrain refs NAME` (Terraform pack) | Terraform's own names (`aws_s3_bucket.logs`, `var.region`, `module.vpc`) and the block each reference sits in |
|
|
184
184
|
| What is the module tree, and which providers are pinned? | `codeterrain def --kind module`, `codeterrain def --kind required_provider` | Every module call with its source and version; provider aliases and what selects them |
|
|
185
185
|
|
|
186
|
-
Every option is in **[docs/commands.md](docs/commands.md)**.
|
|
186
|
+
Every option is in **[docs/commands.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/commands.md)**.
|
|
187
187
|
|
|
188
188
|
## Results
|
|
189
189
|
|
|
@@ -261,7 +261,7 @@ An estimate from the two measurements above, not an A/B experiment:
|
|
|
261
261
|
Lookups are only part of a session: reasoning, editing and test runs are untouched, and small code
|
|
262
262
|
bases save little. Tokens here are characters divided by four. A session-level A/B, the same lane run
|
|
263
263
|
with and without `codeterrain`, is the next measurement. The method and the per-repository results are in
|
|
264
|
-
[docs/why-codeterrain.md](docs/why-codeterrain.md).
|
|
264
|
+
[docs/why-codeterrain.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/why-codeterrain.md).
|
|
265
265
|
|
|
266
266
|
## How it works
|
|
267
267
|
|
|
@@ -280,8 +280,8 @@ with and without `codeterrain`, is the next measurement. The method and the per-
|
|
|
280
280
|
- **The cache** lives outside the checkout, in the git common directory or your user cache, and is
|
|
281
281
|
keyed on content hashes.
|
|
282
282
|
|
|
283
|
-
More in [docs/how-it-works.md](docs/how-it-works.md), [docs/sandbox.md](docs/sandbox.md) and
|
|
284
|
-
[SECURITY.md](SECURITY.md).
|
|
283
|
+
More in [docs/how-it-works.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/how-it-works.md), [docs/sandbox.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/sandbox.md) and
|
|
284
|
+
[SECURITY.md](https://github.com/benchli-sports/codeterrain/blob/main/SECURITY.md).
|
|
285
285
|
|
|
286
286
|
## Why this exists
|
|
287
287
|
|
|
@@ -290,25 +290,25 @@ is a large FastAPI service with a very large test suite, developed with coding a
|
|
|
290
290
|
agents' tokens went on re-mapping the same structure every session, and a hand-kept map went stale
|
|
291
291
|
within weeks. The goal became exact answers, straight from the code, locally and in under a second, in
|
|
292
292
|
every repository benchli and Mitbolas develop with agents. The full story, and why we did not adopt a
|
|
293
|
-
knowledge-graph tool, are in [docs/why-codeterrain.md](docs/why-codeterrain.md).
|
|
293
|
+
knowledge-graph tool, are in [docs/why-codeterrain.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/why-codeterrain.md).
|
|
294
294
|
|
|
295
295
|
## Documentation
|
|
296
296
|
|
|
297
297
|
| | |
|
|
298
298
|
|:---|:---|
|
|
299
|
-
| [Commands](docs/commands.md) | Every command, option and output |
|
|
300
|
-
| [Configuration](docs/configuration.md) | Precedence, every key with its default, monorepos and non-default layouts |
|
|
301
|
-
| [How it works](docs/how-it-works.md) | The two tiers, the cache, extractor programs |
|
|
302
|
-
| [The sandbox](docs/sandbox.md) | What the import tier runs with, and every gap in the network guard |
|
|
303
|
-
| [Limits](docs/limits.md) | What a static walk does not see, and the bounds set on purpose |
|
|
304
|
-
| [Security](SECURITY.md) | The trust model: what is guaranteed and what is best-effort |
|
|
305
|
-
| [Extractor protocol](docs/extractor-protocol.md) | Writing an extractor or a language pack for another language or framework |
|
|
306
|
-
| [Terraform pack](packages/codeterrain-terraform/README.md) | `.tf` files in `def` and `refs`: resources, modules, providers |
|
|
307
|
-
| [TypeScript pack](packages/codeterrain-typescript/README.md) | Front-end calls read with tree-sitter, and why it is the reader to install |
|
|
308
|
-
| [Design notes](docs/design-v0.2.md) | The decisions behind the front-end calls and the language packs |
|
|
309
|
-
| [Why codeterrain](docs/why-codeterrain.md) | The origin, the measurements, what is not proven yet |
|
|
310
|
-
| [Prior art](docs/prior-art.md) | What twelve comparable tools document answering, read from their docs |
|
|
311
|
-
| [Changelog](CHANGELOG.md) | What changed, release by release |
|
|
299
|
+
| [Commands](https://github.com/benchli-sports/codeterrain/blob/main/docs/commands.md) | Every command, option and output |
|
|
300
|
+
| [Configuration](https://github.com/benchli-sports/codeterrain/blob/main/docs/configuration.md) | Precedence, every key with its default, monorepos and non-default layouts |
|
|
301
|
+
| [How it works](https://github.com/benchli-sports/codeterrain/blob/main/docs/how-it-works.md) | The two tiers, the cache, extractor programs |
|
|
302
|
+
| [The sandbox](https://github.com/benchli-sports/codeterrain/blob/main/docs/sandbox.md) | What the import tier runs with, and every gap in the network guard |
|
|
303
|
+
| [Limits](https://github.com/benchli-sports/codeterrain/blob/main/docs/limits.md) | What a static walk does not see, and the bounds set on purpose |
|
|
304
|
+
| [Security](https://github.com/benchli-sports/codeterrain/blob/main/SECURITY.md) | The trust model: what is guaranteed and what is best-effort |
|
|
305
|
+
| [Extractor protocol](https://github.com/benchli-sports/codeterrain/blob/main/docs/extractor-protocol.md) | Writing an extractor or a language pack for another language or framework |
|
|
306
|
+
| [Terraform pack](https://github.com/benchli-sports/codeterrain/blob/main/packages/codeterrain-terraform/README.md) | `.tf` files in `def` and `refs`: resources, modules, providers |
|
|
307
|
+
| [TypeScript pack](https://github.com/benchli-sports/codeterrain/blob/main/packages/codeterrain-typescript/README.md) | Front-end calls read with tree-sitter, and why it is the reader to install |
|
|
308
|
+
| [Design notes](https://github.com/benchli-sports/codeterrain/blob/main/docs/design-v0.2.md) | The decisions behind the front-end calls and the language packs |
|
|
309
|
+
| [Why codeterrain](https://github.com/benchli-sports/codeterrain/blob/main/docs/why-codeterrain.md) | The origin, the measurements, what is not proven yet |
|
|
310
|
+
| [Prior art](https://github.com/benchli-sports/codeterrain/blob/main/docs/prior-art.md) | What twelve comparable tools document answering, read from their docs |
|
|
311
|
+
| [Changelog](https://github.com/benchli-sports/codeterrain/blob/main/CHANGELOG.md) | What changed, release by release |
|
|
312
312
|
|
|
313
313
|
## Development
|
|
314
314
|
|
|
@@ -319,6 +319,6 @@ uv run --extra dev pytest
|
|
|
319
319
|
|
|
320
320
|
Run pytest as a single process (no `-n`). The suite spawns real pytest and interpreter subprocesses, and
|
|
321
321
|
a few tests skip on Windows (no `sendmsg`, no unix-domain sockets). CI also runs it against FastAPI below
|
|
322
|
-
and above 0.137 and pytest 8 and 9. Contributor and review rules are in [AGENTS.md](AGENTS.md).
|
|
322
|
+
and above 0.137 and pytest 8 and 9. Contributor and review rules are in [AGENTS.md](https://github.com/benchli-sports/codeterrain/blob/main/AGENTS.md).
|
|
323
323
|
|
|
324
324
|
Copyright Mitbolas GmbH. Licensed under Apache-2.0 (see LICENSE and NOTICE).
|
|
@@ -33,10 +33,10 @@ wrong guess costs a review round.
|
|
|
33
33
|
|
|
34
34
|
| | |
|
|
35
35
|
|:---|:---|
|
|
36
|
-
| **Accurate where it counts** | Setup order and routes come from pytest and FastAPI themselves: setup order equals `pytest --setup-plan` on every node tested. `refs`, `def` and `impact` read the code statically: they follow imports and re-exports, so an alias counts and a same-named function elsewhere does not, and a name whose meaning depends on run time is left unresolved rather than guessed ([limits](docs/limits.md)). |
|
|
36
|
+
| **Accurate where it counts** | Setup order and routes come from pytest and FastAPI themselves: setup order equals `pytest --setup-plan` on every node tested. `refs`, `def` and `impact` read the code statically: they follow imports and re-exports, so an alias counts and a same-named function elsewhere does not, and a name whose meaning depends on run time is left unresolved rather than guessed ([limits](https://github.com/benchli-sports/codeterrain/blob/main/docs/limits.md)). |
|
|
37
37
|
| **Fast** | Most warm answers take 0.3 to 0.5 s on a large backend, Python start-up included. |
|
|
38
38
|
| **Shorter to read** | 4.4x to 8.8x fewer characters than the grep-and-read it replaces, on code bases with a real fixture graph. That measures the answer, not a whole session's tokens, cost or time. |
|
|
39
|
-
| **Careful with your repo** | The static tier never runs the target's code. Setup order and routes have to import it: they run in a subprocess with an allowlisted environment, dummy cloud credentials and a best-effort network guard, which stop accidents, not hostile code. Run those two on code you trust ([SECURITY.md](SECURITY.md)). |
|
|
39
|
+
| **Careful with your repo** | The static tier never runs the target's code. Setup order and routes have to import it: they run in a subprocess with an allowlisted environment, dummy cloud credentials and a best-effort network guard, which stop accidents, not hostile code. Run those two on code you trust ([SECURITY.md](https://github.com/benchli-sports/codeterrain/blob/main/SECURITY.md)). |
|
|
40
40
|
|
|
41
41
|
## Quick start
|
|
42
42
|
|
|
@@ -145,7 +145,7 @@ commands import the code: use them only on code you trust.
|
|
|
145
145
|
| Where is a Terraform resource, variable or module, and who reads it? | `codeterrain def NAME`, `codeterrain refs NAME` (Terraform pack) | Terraform's own names (`aws_s3_bucket.logs`, `var.region`, `module.vpc`) and the block each reference sits in |
|
|
146
146
|
| What is the module tree, and which providers are pinned? | `codeterrain def --kind module`, `codeterrain def --kind required_provider` | Every module call with its source and version; provider aliases and what selects them |
|
|
147
147
|
|
|
148
|
-
Every option is in **[docs/commands.md](docs/commands.md)**.
|
|
148
|
+
Every option is in **[docs/commands.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/commands.md)**.
|
|
149
149
|
|
|
150
150
|
## Results
|
|
151
151
|
|
|
@@ -223,7 +223,7 @@ An estimate from the two measurements above, not an A/B experiment:
|
|
|
223
223
|
Lookups are only part of a session: reasoning, editing and test runs are untouched, and small code
|
|
224
224
|
bases save little. Tokens here are characters divided by four. A session-level A/B, the same lane run
|
|
225
225
|
with and without `codeterrain`, is the next measurement. The method and the per-repository results are in
|
|
226
|
-
[docs/why-codeterrain.md](docs/why-codeterrain.md).
|
|
226
|
+
[docs/why-codeterrain.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/why-codeterrain.md).
|
|
227
227
|
|
|
228
228
|
## How it works
|
|
229
229
|
|
|
@@ -242,8 +242,8 @@ with and without `codeterrain`, is the next measurement. The method and the per-
|
|
|
242
242
|
- **The cache** lives outside the checkout, in the git common directory or your user cache, and is
|
|
243
243
|
keyed on content hashes.
|
|
244
244
|
|
|
245
|
-
More in [docs/how-it-works.md](docs/how-it-works.md), [docs/sandbox.md](docs/sandbox.md) and
|
|
246
|
-
[SECURITY.md](SECURITY.md).
|
|
245
|
+
More in [docs/how-it-works.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/how-it-works.md), [docs/sandbox.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/sandbox.md) and
|
|
246
|
+
[SECURITY.md](https://github.com/benchli-sports/codeterrain/blob/main/SECURITY.md).
|
|
247
247
|
|
|
248
248
|
## Why this exists
|
|
249
249
|
|
|
@@ -252,25 +252,25 @@ is a large FastAPI service with a very large test suite, developed with coding a
|
|
|
252
252
|
agents' tokens went on re-mapping the same structure every session, and a hand-kept map went stale
|
|
253
253
|
within weeks. The goal became exact answers, straight from the code, locally and in under a second, in
|
|
254
254
|
every repository benchli and Mitbolas develop with agents. The full story, and why we did not adopt a
|
|
255
|
-
knowledge-graph tool, are in [docs/why-codeterrain.md](docs/why-codeterrain.md).
|
|
255
|
+
knowledge-graph tool, are in [docs/why-codeterrain.md](https://github.com/benchli-sports/codeterrain/blob/main/docs/why-codeterrain.md).
|
|
256
256
|
|
|
257
257
|
## Documentation
|
|
258
258
|
|
|
259
259
|
| | |
|
|
260
260
|
|:---|:---|
|
|
261
|
-
| [Commands](docs/commands.md) | Every command, option and output |
|
|
262
|
-
| [Configuration](docs/configuration.md) | Precedence, every key with its default, monorepos and non-default layouts |
|
|
263
|
-
| [How it works](docs/how-it-works.md) | The two tiers, the cache, extractor programs |
|
|
264
|
-
| [The sandbox](docs/sandbox.md) | What the import tier runs with, and every gap in the network guard |
|
|
265
|
-
| [Limits](docs/limits.md) | What a static walk does not see, and the bounds set on purpose |
|
|
266
|
-
| [Security](SECURITY.md) | The trust model: what is guaranteed and what is best-effort |
|
|
267
|
-
| [Extractor protocol](docs/extractor-protocol.md) | Writing an extractor or a language pack for another language or framework |
|
|
268
|
-
| [Terraform pack](packages/codeterrain-terraform/README.md) | `.tf` files in `def` and `refs`: resources, modules, providers |
|
|
269
|
-
| [TypeScript pack](packages/codeterrain-typescript/README.md) | Front-end calls read with tree-sitter, and why it is the reader to install |
|
|
270
|
-
| [Design notes](docs/design-v0.2.md) | The decisions behind the front-end calls and the language packs |
|
|
271
|
-
| [Why codeterrain](docs/why-codeterrain.md) | The origin, the measurements, what is not proven yet |
|
|
272
|
-
| [Prior art](docs/prior-art.md) | What twelve comparable tools document answering, read from their docs |
|
|
273
|
-
| [Changelog](CHANGELOG.md) | What changed, release by release |
|
|
261
|
+
| [Commands](https://github.com/benchli-sports/codeterrain/blob/main/docs/commands.md) | Every command, option and output |
|
|
262
|
+
| [Configuration](https://github.com/benchli-sports/codeterrain/blob/main/docs/configuration.md) | Precedence, every key with its default, monorepos and non-default layouts |
|
|
263
|
+
| [How it works](https://github.com/benchli-sports/codeterrain/blob/main/docs/how-it-works.md) | The two tiers, the cache, extractor programs |
|
|
264
|
+
| [The sandbox](https://github.com/benchli-sports/codeterrain/blob/main/docs/sandbox.md) | What the import tier runs with, and every gap in the network guard |
|
|
265
|
+
| [Limits](https://github.com/benchli-sports/codeterrain/blob/main/docs/limits.md) | What a static walk does not see, and the bounds set on purpose |
|
|
266
|
+
| [Security](https://github.com/benchli-sports/codeterrain/blob/main/SECURITY.md) | The trust model: what is guaranteed and what is best-effort |
|
|
267
|
+
| [Extractor protocol](https://github.com/benchli-sports/codeterrain/blob/main/docs/extractor-protocol.md) | Writing an extractor or a language pack for another language or framework |
|
|
268
|
+
| [Terraform pack](https://github.com/benchli-sports/codeterrain/blob/main/packages/codeterrain-terraform/README.md) | `.tf` files in `def` and `refs`: resources, modules, providers |
|
|
269
|
+
| [TypeScript pack](https://github.com/benchli-sports/codeterrain/blob/main/packages/codeterrain-typescript/README.md) | Front-end calls read with tree-sitter, and why it is the reader to install |
|
|
270
|
+
| [Design notes](https://github.com/benchli-sports/codeterrain/blob/main/docs/design-v0.2.md) | The decisions behind the front-end calls and the language packs |
|
|
271
|
+
| [Why codeterrain](https://github.com/benchli-sports/codeterrain/blob/main/docs/why-codeterrain.md) | The origin, the measurements, what is not proven yet |
|
|
272
|
+
| [Prior art](https://github.com/benchli-sports/codeterrain/blob/main/docs/prior-art.md) | What twelve comparable tools document answering, read from their docs |
|
|
273
|
+
| [Changelog](https://github.com/benchli-sports/codeterrain/blob/main/CHANGELOG.md) | What changed, release by release |
|
|
274
274
|
|
|
275
275
|
## Development
|
|
276
276
|
|
|
@@ -281,6 +281,6 @@ uv run --extra dev pytest
|
|
|
281
281
|
|
|
282
282
|
Run pytest as a single process (no `-n`). The suite spawns real pytest and interpreter subprocesses, and
|
|
283
283
|
a few tests skip on Windows (no `sendmsg`, no unix-domain sockets). CI also runs it against FastAPI below
|
|
284
|
-
and above 0.137 and pytest 8 and 9. Contributor and review rules are in [AGENTS.md](AGENTS.md).
|
|
284
|
+
and above 0.137 and pytest 8 and 9. Contributor and review rules are in [AGENTS.md](https://github.com/benchli-sports/codeterrain/blob/main/AGENTS.md).
|
|
285
285
|
|
|
286
286
|
Copyright Mitbolas GmbH. Licensed under Apache-2.0 (see LICENSE and NOTICE).
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codeterrain"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "terrain: answers about your code in under a second. Local, LLM-free structure facts for coding agents; Python first."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-terraform/tests/test_terraform.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codeterrain-0.3.1 → codeterrain-0.3.2}/packages/codeterrain-typescript/tests/test_typescript.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|