Inspect a project with discovery
sqlrs discover
With no flags, discovery runs four project analyzers. It reads files and prints advice; it does not
fix anything, run prepare, or create an instance. Other sqlrs commands never depend on discovery.
| Analyzer | What it looks for | What it returns |
|---|---|---|
--aliases |
Supported prepare or run inputs that do not have an alias | A reviewable sqlrs alias create … command |
--gitignore |
Local .sqlrs/ and coverage-current files not ignored by Git |
Target .gitignore, missing entries, and an add command |
--vscode |
A missing yaml.schemas mapping for **/.sqlrs/config.yaml |
Merged JSON and a command that can write the setting |
--prepare-shaping |
Directories whose filenames mix stable-schema and changing-data markers | Advice to review whether schema preparation and test data should be separated |
Run only the checks you need, and choose JSON when another CI check will parse the result:
sqlrs discover --aliases --prepare-shaping
sqlrs --output json discover --gitignore
If at least one analyzer flag is present, only the selected analyzers run. Even in JSON mode, discovery remains advisory and does not change the project.
What discovery does not do
Section titled “What discovery does not do”- It does not install Docker, Podman, Liquibase, or the Local engine.
- It does not run
initor edit.sqlrs/config.yaml. - It does not decide which migrations are the schema source of truth.
- It does not create aliases or edit
.gitignoreor.vscode/*. - It does not verify that migrations apply successfully.
- It does not connect a test runner to the returned DSN.
--prepare-shapingdoes not parse psql includes or Liquibase changelog relationships.
Read each suggestion, inspect the referenced file, and only then run the proposed command. For a new
alias, follow with sqlrs alias check and a real prepare.