orstrum scan

Walk the repository AST and write the dependency graph to .orstrum/graph.db.

$ orstrum scan [--config <path>] [--force]

What it does

scan parses every file in the configured repos from a real AST — ts-morph for TypeScript/JavaScript and a tree-sitter WASM grammar for Python — not regex or line parsing. For TS/JS it resolves path aliases from tsconfig.json (when present) and follows barrel re-exports. The result (nodes, exports, and edges) is written to a local SQLite database at .orstrum/graph.db.

No network access is required. The scanner runs entirely locally.

Incremental scanning

Each file's source bytes are hashed with SHA-256. On subsequent scans, only files whose hash has changed are re-parsed. Large repos typically re-scan in under a second after the initial build.

Options

--config <path>
string
Path to orstrum.config.ts. Defaults to auto-discovery from the current directory upward.
--force
flag
Re-parse all files regardless of hash. Use after upgrading Orstrum to ensure the graph format is current.

Output

$ orstrum scan

Scan complete
  scanned   : 847
  upserted  : 835
  unchanged : 12
  skipped   : 4 ignored, 2 non-source, 0 parse-error
  graph     : .orstrum/graph.db