Skip to main content
Scope Explorer exposes the compiler’s declaration index through sqb scope. It is read-only and offline: it never connects to the warehouse, moves files, or edits configuration. Use this page for common workflows. See the sqb scope CLI reference for every flag, filter, text section, and JSON field.

Inspect a resource

Start with a model, test, scenario, hook, function, audit, source, or declaration identity:
The report separates concepts that are easy to conflate:

Explain one declaration

Ask why a declaration is visible, inaccessible, used, or granted:
Explanation output retains the resolution route. Expected-model grants remain distinct from path visibility, and macro dependency routes retain the consuming macro.

Browse nearby declarations

Use nearby output when you know the resource but not the declaration name:
Browse the scope index like a deterministic tree when exploring a larger project:
Filters for declaration kind, definition path, glob matching, and actual usage can be combined. Use pagination for large reports rather than trimming the compiler facts.

Check a prospective path

Inspect what a resource would see before its file exists:
Use --as-path to evaluate an existing resource from a proposed destination without moving it:

Preview a resource move

Use --as-path to preview moving an existing authored resource such as a model, test, hook, or function. The report shows retained, gained, and lost declarations and direct usages the move would invalidate:
The destination must be valid for that resource kind. Scope Explorer does not move the file or preview moving declaration files themselves.

Automation

Use --json for editor integrations and repository tooling. Scope JSON has a versioned schema, stable ordering, value-free declaration metadata, completeness facts, filters, pagination, and move preview results. Secret connection settings and declaration values are not included.

Visibility and Resolution

Review the compiler rules behind the report.

CLI Reference

See all selectors, filters, pagination options, output sections, and JSON behavior.