Files
codegraph/site
Colby MchenryandClaude Opus 5.5 fb71a9f4b3 feat(init): --local-only keeps .codegraph/ out of git entirely (#3104)
The generated `.codegraph/.gitignore` ignores everything but itself, so the
rule can be committed and shared. For someone using CodeGraph alone, that
leaves `.codegraph/` showing as untracked in `git status`, with a file to
commit that nobody else needs.

`codegraph init --local-only` makes the file the wildcard alone, so it
ignores itself too and nothing of CodeGraph's shows in git. It works on a
new project and on one that's already initialized, where it converts the
file without indexing again. Plain `codegraph init` is unchanged.

Only a file CodeGraph generated is replaced. A file with the user's own
rules is left alone, and so is a default the repository has committed,
because rewriting a tracked file would show up as a change, the opposite of
what the flag is for. Both cases say why they were left. The local-only
file carries no generated header, so every later open leaves it alone.

A flag rather than the proposed CODEGRAPH_LOCAL_GITIGNORE env var: the file
is only written when it is missing, so an env var does nothing for a
project that already has one, which is the reporter's case; an env var in a
shell profile would also silently stop every new project sharing the rule,
team repositories included. The flag is also what the issue proposed.

Validation: 22 new tests, the CLI ones against real git repositories. They
cover `git status --porcelain` staying empty, the default unchanged without
the flag, conversion leaving the database untouched, and the file surviving
sync, status, index and a plain init.

Reimplements PR 1013 by @jiangyq9.
Fixes #910

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 20:55:44 +00:00
..

Starlight Starter Kit: Basics

Built with Starlight

npm create astro@latest -- --template starlight

🧑‍🚀 Seasoned astronaut? Delete this file. Have fun!

🚀 Project Structure

Inside of your Astro + Starlight project, you'll see the following folders and files:

.
├── public/
├── src/
│   ├── assets/
│   ├── content/
│   │   └── docs/
│   └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json

Starlight looks for .md or .mdx files in the src/content/docs/ directory. Each file is exposed as a route based on its file name.

Images can be added to src/assets/ and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the public/ directory.

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run build Build your production site to ./dist/
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI

👀 Want to learn more?

Check out Starlight’s docs, read the Astro documentation, or jump into the Astro Discord server.