scip-go
Primary command:
# Run from the directory containing the target go.mod
scip-go index -o index.scip [package-pattern...]
Standard module
cd path/to/module
scip-go index -o index.scip
Specific packages only
scip-go index -o index.scip ./cmd/... ./pkg/...
See go help packages for the full pattern syntax.
Submodule without changing directories
scip-go index --module-root=path/to/module -o module.scip
Multi-module / go.work repo
Index each module separately (run once per go.mod):
scip-go index -o root.scip
cd staging/src/k8s.io/api
scip-go index -o api.scip
Custom build system (Bazel, Buck2, Please)
GOPACKAGESDRIVER=./driver.sh \
scip-go index \
--module-path=example.com/repo \
--module-version=abc1234 \
-o index.scip
With GOPACKAGESDRIVER, module metadata may be incomplete. Pass
--module-path and, if known, --module-version to improve symbol
identity. Dependency cross-repo navigation may still be limited.
Useful flags
| Flag | Short | Description |
|---|---|---|
--output |
-o |
Output file (default: index.scip) |
--module-root |
Directory containing go.mod |
|
--module-path |
Override module path from go.mod |
|
--module-version |
Module version (default: from git) | |
--go-version |
Go stdlib version, e.g. go1.22 |
|
--skip-tests |
Exclude test files | |
--skip-implementations |
Skip implementation relationship edges | |
--verbose |
-V |
Info logs; use -VV for debug |
Diagnostics
scip-go missing # list files not covered by the index
scip-go packages # list current and dependency packages
These accept the same flags and package patterns as index.
Guardrails
- Always run from the target module root or pass
--module-rootexplicitly. Do not rely on automatic detection. --module-pathsets the module identity in the index but does not replace a workinggo.modor package driver. Ifgo/packagescannot load the code, indexing will fail.
Source: scip-code/scip-go — distributed by TomeVault.