Skip to content

Add CLI: transpailer convert command#46

Merged
twiecki merged 1 commit intomainfrom
cli/add-convert-command
Mar 13, 2026
Merged

Add CLI: transpailer convert command#46
twiecki merged 1 commit intomainfrom
cli/add-convert-command

Conversation

@twiecki
Copy link
Copy Markdown
Collaborator

@twiecki twiecki commented Mar 13, 2026

Summary

  • Adds a click-based CLI with transpailer convert <file> --to <framework> command
  • Supports auto-detection of source framework from file extension (.stan, .jl, .r) and Python imports (pymc, pytorch, jax, etc.)
  • Supports stdin piping (cat model.stan | transpailer convert --to pymc), --output file, --from override, --model selection, --verbose mode
  • Loads domain-specific skills (from transpailer/skills/) for known transpilation pairs (e.g. Stan→PyMC, JAX→PyTorch)
  • Registers transpailer console script entry point in pyproject.toml

Test plan

  • uv run transpailer --version0.1.0
  • uv run transpailer convert model.stan --to pymc -v → correct PyMC output
  • Stdin pipe: echo '...' | uv run transpailer convert --to jax → correct JAX output
  • Test --output flag writes to file
  • Test error cases (missing --to, same source/target, undetectable framework)

🤖 Generated with Claude Code

Adds a click-based CLI that wraps the core transpilation logic:
- `transpailer convert <file> --to <framework>` for file input
- stdin support for piping
- Auto-detection of source framework from extension/imports
- Loads domain-specific skills for known transpilation pairs
- --from, --output, --model, --verbose flags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@twiecki twiecki merged commit c26396e into main Mar 13, 2026
2 of 3 checks passed
@twiecki twiecki deleted the cli/add-convert-command branch March 13, 2026 02:13
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.

1 participant