Starts an interactive REPL for testing PTC-Lisp expressions.
Usage
mix ptc.repl # Interactive REPL (default)
mix ptc.repl -l prelude.clj # Load file, then interactive
mix ptc.repl -e "(+ 1 2)" # Eval and print result
mix ptc.repl --upstreams-config upstreams.json -e "(tool/servers)"
mix ptc.repl -e "(def x 1)" -e "(* x 2)" # Chain evals (memory persists)
mix ptc.repl script.clj # Run script file
mix ptc.repl - # Run from stdinOptions
-e, --eval- Evaluate expression and print result (can be repeated)-l, --load- Load file before entering interactive mode--upstreams-config- Root upstream JSON config path (orPTC_RUNNER_UPSTREAMS)--max-tool-calls- Per-evaluationtool/callcap--max-catalog-ops- Per-evaluation discovery form cap--upstream-call-timeout-ms- Per-upstream-call timeout--max-upstream-response-bytes- Per-upstream response cap--catalog-mode- Catalog exposure mode:auto,inline, orlazy--catalog-snapshot-mode- Catalog snapshot mode:liveorfrozen-h, --help- Print this help
Features
- Evaluate PTC-Lisp expressions interactively
- Multi-line input: continues prompting until parens are balanced
- Turn history:
*1,*2,*3reference last 3 results - Memory persists between evaluations
- Optional upstream runtime for
(tool/call ...),(tool/servers),dir,doc,meta, andapropos - Exit with Ctrl+D
Example Session
ptc> (+ 1 2)
3
ptc> (* *1 10)
30
ptc> {:sum *1, :product *2}
%{sum: 30, product: 30}