Index without GitHub
You can index a repository without installing the cix GitHub App. cix reads the tracked files in your working tree and builds your own private index from them.
This suits code that isn't on GitHub, an organization that hasn't approved the App, or a repository you'd rather not connect to anything.
Note — this changes how cix reaches your code, not whether the contents are sent for parsing. It is not an offline or local-only mode. See What leaves your machine.
Index it
From inside the repository:
$ cix index --pushcix reads the tracked files in your working tree, sends them to be parsed, and the resulting index is private to you. Git is only read — nothing is committed, pushed, or modified on your behalf, and your remotes, branches, commits and tags are untouched.
Your assistant can query the repo as soon as this finishes.
Keep it current
Nothing reindexes on its own here. That's the trade for not installing anything: cix has no way to learn that your code changed.
Run the same command when you want the index to catch up:
$ cix index --pushIt sends what changed since the last run. To rebuild from scratch instead — worth doing after a big branch switch or a rebase that rewrote history:
$ cix index --push --fullNote — a stale index is worse than an obvious gap, because your assistant will answer confidently from it. If you've just done a large refactor, reindex before you start asking questions. See Keep your index fresh.
What you give up
A private index is a complete index — search, symbol lookup, tracing, and the rest all work the same. Two things differ:
- No automatic reindexing. With the App, pushing is enough. Here, you run the command.
- Nobody else can read it. The index is yours alone. For more than one person to work from one index, the repository needs an owner with the App installed — then verified collaborators read the owner's index. See Working with collaborators.
Moving to the GitHub App later
Nothing is stranded. Authorize the App for the repository and run cix init — from then on, pushing keeps the index current and your team can share it.
If both a private index and an App installation end up covering the same repository, cix reads from your own index. To fall through to the owner's instead:
$ cix index --retireIt shows you what would be removed and asks before doing anything.
A repository the App can't reach
If a repository isn't covered by any cix App installation and you'd rather not maintain a private index, you can supply a GitHub credential for one run:
$ cix index --github-tokenThe flag takes no value. cix reads the token from your environment or prompts for it with hidden input, uses it once, and never stores it.
Next: Keep your index fresh.