phpbotscout index build¶
Indexes every source that qualifies, whether or not its commit has moved.
Usage¶
$ phpbotscout index build
52 sources: 52 indexed, 0 unchanged, 0 failed
1721 documents, 11243 chunks
A full build of the current corpus takes roughly two minutes.
What it does¶
- Enumerates the
phpboyscoutnamespace from the forge. - Applies the corpus predicate to each repository, keeping only what qualifies.
- Shallow-clones each qualifying repository in memory, reads the files the corpus indexes, and writes them as chunks into the SQLite FTS5 index.
Cloning in memory is deliberate. The predicate is a security boundary, and content that never touches the filesystem cannot be left behind by a crash between the clone and the check that should have rejected it.
Build or refresh?¶
build ignores recorded commits and re-indexes everything;
refresh skips sources whose commit has not moved. Both fetch
every source, so the difference is indexing work, not network traffic.
Use build for the first run, and after anything that changes how content is
chunked or ranked — a migration, a tokenizer change, a new field. Use refresh
for everything else.
Failure is per-source¶
A source that cannot be cloned or read is recorded with its reason and the run
continues. See refresh for the reporting shape; it is
identical.
Credentials¶
The forge token resolves through the gitlab.auth configuration — an
environment-variable name, a keychain reference, or a literal — falling back to
GITLAB_TOKEN. See the configuration reference.
A token is optional for cloning, since the corpus is public by construction and
a public repository clones unauthenticated; it only costs rate limit. It is
not optional for discovery: reading a repository's Pages settings needs the
Maintainer role, and without it every candidate is reported unresolved.
Flags¶
build defines no flags of its own. Global flags (--config, --debug,
--output, --ci) are inherited from the root command.
| Name | Description | Default |
|---|---|---|
-h, --help |
Help for build. |
false |
See also¶
index refresh— re-index only what movedindex sources— what qualifies, and whyindex status— what is indexed, and how stale