CLI inspect fallback
The CLI shares the tooling semantics used by the LSP server. Positions are 1-based in CLI commands.
Install the optional CLI in the project that runs these commands:
npm install --save-dev @sqlbraid/clisqlbraid inspect query --file src/query.ts --line 8 --column 20 --jsonsqlbraid inspect symbol UsersRow --jsonsqlbraid inspect diagnostics --file src/query.ts --jsonUse --config ./sqlbraid.config.mjs when repository discovery is ambiguous. JSON is focused and bounded. Unresolved query evidence is reported as resolved: false; it is not an invalid-SQL claim.
A normal workflow is:
- Discover the project config and metadata evidence.
- Prefer LSP requests when available.
- Fall back to one of the JSON inspection commands above.
- If metadata or config changes, run
sqlbraid codegenand thensqlbraid codegen --check. - Treat generated files as derived; never hand-edit them.
sqlbraid check can add ordinary TypeScript diagnostics, while inspect operations focus on SQLBraid evidence.