codity index
codity index uploads the current repository's source files into your Codity workspace so chat and workspace intelligence can answer questions with repository context.
Run it for each repository you want Codity to understand.
Usage
codity index [flags]
Flags
| Flag | Description |
|---|---|
--owner <owner> | Repository owner or organization. Defaults to the owner from your git remote. |
--repo <name> | Repository name. Defaults to the repo name from your git remote. |
--branch <branch> | Branch label for the index. Defaults to your current branch, or main if Codity cannot detect one. |
Examples
Index the current repository:
codity index
Index the current checkout under an explicit repo and branch:
codity index --owner my-org --repo payments-api --branch main
What Gets Indexed
Codity collects source files from the current git repository and skips files ignored by the repository scanner. The upload is incremental, so unchanged files do not need to be embedded again.
After indexing completes, Codity shows how many files and chunks were indexed.
When to Reindex
Run codity index when:
- You are adding a repository to Codity chat for the first time.
- You want Codity to answer from a different branch.
- You made large structural changes and want workspace answers to use the latest code.
- Codity says a repository or branch is missing from the indexed workspace.
Requirements
- Run the command from inside a git repository.
- Sign in first with
codity login. - For Codity email accounts, use
codity login --emailbefore indexing.