Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 3, 2026

Summary

Add working exec and trace CLI commands that use the runtime engine.

Commands

exec - Execute a query and output JSON:

plotnik exec query.ptk source.ts
plotnik exec -q '(identifier) @id' -l javascript source.ts

trace - Execute with step-by-step trace output:

plotnik trace query.ptk source.ts

Changes

  • exec.rs - Now functional, executes queries and outputs JSON
  • trace.rs - New command for debugging execution
  • run_common.rs - Shared utilities for both commands
  • cli.rs - Added trace command, updated exec arguments
  • main.rs - Wire up both commands

Test plan

  • cargo check passes
  • Clippy passes

@zharinov zharinov enabled auto-merge (squash) January 3, 2026 12:21
@zharinov zharinov merged commit 547d786 into master Jan 3, 2026
4 checks passed
@zharinov zharinov deleted the feat/cli-exec-trace branch January 3, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants