Skip to content

Commit 2721165

Browse files
colbymchenryclaude
andauthored
docs: clarify zero-config + built-in default-ignores; drop stale config wording (#418)
Refresh the README and docs-site Configuration pages to (a) state plainly there are no codegraph config files, (b) describe the new built-in default-ignores (#407) and the .gitignore-negation opt-in, and (c) remove the now-inaccurate note that committed vendor/dist dirs are indexed. Also fixes a stray 'excluded by config patterns' phrase in README troubleshooting. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 832f906 commit 2721165

3 files changed

Lines changed: 32 additions & 28 deletions

File tree

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -421,23 +421,25 @@ cg.close();
421421

422422
## Configuration
423423

424-
There isn't any — CodeGraph is zero-config. It indexes every file whose
425-
extension maps to a [supported language](#supported-languages) and **respects
426-
your `.gitignore`**: in git repos via git itself, and in non-git projects by
427-
reading `.gitignore` files directly (root and nested, the same way git would).
428-
429-
What that means in practice:
430-
431-
- Anything git ignores — `node_modules`, build output, secrets in `.env` — is
432-
never indexed. **To keep something out of the graph, add it to `.gitignore`.**
433-
- There's no config file to write or keep in sync, and nothing to wire up per
434-
language: support is automatic from the file extension.
435-
- Files larger than 1 MB are skipped (generated bundles, minified JS, vendored
436-
blobs) — they cost parse budget for no useful symbols.
437-
438-
> Committed files that aren't gitignored *are* indexed, even under `vendor/` or a
439-
> committed `dist/`. If you commit a dependency or build directory you don't want
440-
> in the graph, add it to `.gitignore`.
424+
There isn't any — CodeGraph is zero-config, with **no config file** to write or
425+
keep in sync. Language support is automatic from the file extension; there's
426+
nothing to wire up per language.
427+
428+
What it skips out of the box:
429+
430+
- **Dependency, build, and cache directories**`node_modules`, `vendor`,
431+
`dist`, `build`, `target`, `.venv`, `Pods`, `.next`, and the like across every
432+
[supported stack](#supported-languages) — so the graph is your code, not
433+
third-party noise. This holds even with no `.gitignore`.
434+
- **Anything in your `.gitignore`** — honored in git repos via git, and in
435+
non-git projects by reading `.gitignore` directly (root and nested).
436+
- **Files larger than 1 MB** — generated bundles, minified JS, vendored blobs.
437+
438+
To keep something else out, add it to `.gitignore`. To pull a default-excluded
439+
directory back **in** (say you really do want a vendored dependency indexed),
440+
add a negation — `!vendor/`. The defaults apply uniformly, so committing a
441+
dependency or build directory doesn't force it into the graph; the `.gitignore`
442+
negation is the explicit opt-in.
441443

442444
## Supported Platforms
443445

@@ -502,7 +504,7 @@ the MCP server and writing its instructions file:
502504

503505
**MCP server not connecting** — Ensure the project is initialized/indexed, verify the path in your MCP config, and check that `codegraph serve --mcp` works from the command line.
504506

505-
**Missing symbols** — The MCP server auto-syncs on save (wait a couple seconds). Run `codegraph sync` manually if needed. Check that the file's language is supported and isn't excluded by config patterns.
507+
**Missing symbols** — The MCP server auto-syncs on save (wait a couple seconds). Run `codegraph sync` manually if needed. Check that the file's language is supported and isn't inside a `.gitignore`d or default-excluded directory (e.g. `node_modules`, `dist`).
506508

507509
## Star History
508510

site/src/content/docs/getting-started/configuration.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
---
22
title: Configuration
3-
description: CodeGraph is zero-config — here's what that means in practice.
3+
description: CodeGraph is zero-config — there are no config files.
44
---
55

6-
There isn't any — CodeGraph is **zero-config**. It indexes every file whose extension maps to a [supported language](/codegraph/reference/languages/) and **respects your `.gitignore`**: in git repos via git itself, and in non-git projects by reading `.gitignore` files directly (root and nested, the same way git would).
6+
There isn't any — CodeGraph is **zero-config**, with **no config file** to write or keep in sync. Language support is automatic from the file extension; there's nothing to wire up per language.
77

8-
## What that means in practice
8+
## What it skips out of the box
99

10-
- Anything git ignores `node_modules`, build output, secrets in `.env` — is never indexed. **To keep something out of the graph, add it to `.gitignore`.**
11-
- There's no config file to write or keep in sync, and nothing to wire up per language: support is automatic from the file extension.
12-
- Files larger than 1 MB are skipped (generated bundles, minified JS, vendored blobs) — they cost parse budget for no useful symbols.
10+
- **Dependency, build, and cache directories** `node_modules`, `vendor`, `dist`, `build`, `target`, `.venv`, `Pods`, `.next`, and the like across every [supported stack](/codegraph/reference/languages/) — so the graph is your code, not third-party noise. This holds even with no `.gitignore`.
11+
- **Anything in your `.gitignore`** — honored in git repos via git, and in non-git projects by reading `.gitignore` directly (root and nested).
12+
- **Files larger than 1 MB**generated bundles, minified JS, vendored blobs.
1313

14-
:::note
15-
Committed files that aren't gitignored *are* indexed, even under `vendor/` or a committed `dist/`. If you commit a dependency or build directory you don't want in the graph, add it to `.gitignore`.
16-
:::
14+
## Excluding or including more
15+
16+
To keep something else out, add it to `.gitignore`. To pull a default-excluded directory back **in** (e.g. you really want a vendored dependency indexed), add a negation — `!vendor/`.
17+
18+
The defaults apply uniformly, so committing a dependency or build directory doesn't force it into the graph — the `.gitignore` negation is the explicit opt-in.
1719

1820
## Where data lives
1921

site/src/content/docs/guides/indexing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ Reports node/edge/file counts, the active SQLite backend, and the journal mode.
3636

3737
## What gets indexed
3838

39-
Every file whose extension maps to a [supported language](/codegraph/reference/languages/), minus anything your `.gitignore` excludes and files over 1 MB. See [Configuration](/codegraph/getting-started/configuration/).
39+
Every file whose extension maps to a [supported language](/codegraph/reference/languages/), minus dependency/build directories excluded by default (`node_modules`, `vendor`, `dist`, …), anything your `.gitignore` excludes, and files over 1 MB. See [Configuration](/codegraph/getting-started/configuration/).

0 commit comments

Comments
 (0)