Repository Management
The code-search repo commands let you manage which repositories are indexed.
Commands Overview
Section titled “Commands Overview”| Command | Description |
|---|---|
repo list | List all indexed repositories |
repo add | Add a repository to index |
repo remove | Remove a repository |
repo sync | Trigger re-sync of a repository |
repo status | Check repository status |
repo exclude | Exclude repository from indexing |
repo include | Include previously excluded repo |
List Repositories
Section titled “List Repositories”View all repositories currently indexed.
# List all reposcode-search repo list
# Filter by connection IDcode-search repo list --connection 1
# Show detailed infocode-search repo list --verboseOptions
Section titled “Options”| Option | Short | Description |
|---|---|---|
--connection | -c | Filter by connection ID |
--verbose | -v | Show detailed info |
Output
Section titled “Output”$ code-search repo list
ID NAME STATUS BRANCHES1 myorg/api ✓ indexed main2 myorg/frontend ✓ indexed main, develop3 myorg/services 🔄 indexing main4 internal/docs ✓ indexed master
4 repositoriesWith --verbose:
$ code-search repo list --verbose
ID NAME STATUS LAST INDEXED EXCLUDED URL1 myorg/api ✓ indexed 2024-01-15T10:30:00Z https://github.com/myorg/api.git2 myorg/frontend ✓ indexed 2024-01-15T10:28:00Z https://github.com/myorg/frontend.git
2 repositoriesAdd Repository
Section titled “Add Repository”Add a new repository to be indexed.
# Add a repository with connection ID (required)code-search repo add https://github.com/myorg/new-service.git --connection 1
# Add with custom namecode-search repo add https://github.com/myorg/repo.git --connection 1 --name custom-name
# Add with specific branchcode-search repo add https://github.com/myorg/repo.git --connection 1 --branch developSyntax
Section titled “Syntax”code-search repo add <clone-url> [flags]Options
Section titled “Options”| Option | Description |
|---|---|
--connection | Connection ID (required) |
--name | Custom name for the repository |
--branch | Default branch (default: main) |
Examples
Section titled “Examples”# Add a GitHub repositorycode-search repo add https://github.com/company/platform.git --connection 1
# Add with custom name and branchcode-search repo add https://gitlab.example.com/internal/tools.git \ --connection 2 --name internal-tools --branch masterRemove Repository
Section titled “Remove Repository”Remove a repository from the index.
# Remove a repo by ID (will prompt for confirmation)code-search repo remove 3
# Remove without confirmationcode-search repo remove 3 --forceOptions
Section titled “Options”| Option | Description |
|---|---|
--force | Skip confirmation prompt |
Sync Repository
Section titled “Sync Repository”Trigger a re-sync and re-index of a repository.
# Sync a specific repo by IDcode-search repo sync 1
# Sync all reposcode-search repo sync --allSyntax
Section titled “Syntax”code-search repo sync [id] [flags]Options
Section titled “Options”| Option | Description |
|---|---|
--all | Sync all repositories |
Examples
Section titled “Examples”# Sync a specific repocode-search repo sync 1
# Re-sync everythingcode-search repo sync --allCheck Status
Section titled “Check Status”Get detailed status of a specific repository.
# Check status of a specific repo by IDcode-search repo status 1Status Values
Section titled “Status Values”| Status | Indicator | Description |
|---|---|---|
indexed | ✓ | Ready for search |
pending | ⏳ | Waiting to be indexed |
cloning | 📥 | Cloning repository |
indexing | 🔄 | Building search index |
failed | ✗ | Indexing failed |
Output
Section titled “Output”$ code-search repo status 1
ID: 1Name: myorg/apiStatus: ✓ indexedURL: https://github.com/myorg/api.gitBranches: main, develop, feature/new-apiIndexed: 2024-01-15T10:30:00ZExclude Repository
Section titled “Exclude Repository”Exclude a repository from sync and indexing (soft delete).
code-search repo exclude 3This keeps the repository in the database but excludes it from future syncs.
Include Repository
Section titled “Include Repository”Include a previously excluded repository.
code-search repo include 3The repository will be included in the next sync cycle.