Phel Repl

Evaluate Phel expressions to verify behavior. Use when you need to test Phel code interactively.

phel-lang 2b155ea 937 B Updated

File contents

Phel REPL

Evaluate Phel expressions to verify behavior without writing test files.

Instructions

  1. Take the expression from $ARGUMENTS (or ask for one if empty).

  2. Evaluate it using the Phel CLI eval command:

    timeout 10 ./bin/phel eval '$ARGUMENTS'
    

    Or read the expression from stdin with -:

    echo '$ARGUMENTS' | timeout 10 ./bin/phel eval -
    

    For multi-form snippets that need a namespace, write a temp file:

    echo '(ns repl-test) $ARGUMENTS' > /tmp/phel-repl-test.phel
    timeout 10 ./bin/phel run /tmp/phel-repl-test.phel
    
  3. Report the result. If there's an error, explain what went wrong.

Examples

/phel-repl (+ 1 2)
/phel-repl (map inc [1 2 3])
/phel-repl (defn greet [name] (str "Hello, " name "!"))

phel-lang/phel-lang/tree/main/.agnostic-ai/skills/phel-repl commit 2b155ea947

Frequently asked questions

npx skillmds@latest add phel-lang/phel-repl