Skip to content
Latchkey

deno repl: The Interactive REPL

deno repl opens an interactive read-eval-print loop for experimenting with code.

The REPL is a local tool, but its --eval preamble and permission flags are worth knowing so you can script reproducible experiments.

What it does

deno repl starts an interactive session where each line is evaluated immediately. --eval runs setup code before the prompt, and the usual permission flags apply because the REPL can do anything deno run can.

Common usage

Terminal
deno repl
deno repl --allow-net
# preload setup code before the prompt
deno repl --eval "import { assert } from 'jsr:@std/assert'"

Options

FlagWhat it does
--eval <code>Run code before the interactive prompt
--eval-file <file>Run a file before the prompt
--allow-net / --allow-readGrant permissions for the session
--no-checkSkip type-checking in the REPL

In CI

Do not invoke deno repl in CI: with no TTY it has nothing to read and will hang or exit immediately, stalling the job. For inline execution in a pipeline use deno eval, and for files use deno run.

Common errors in CI

Launched in a non-interactive CI shell, the REPL gets EOF on stdin and exits at once, or appears to hang waiting for input until the job times out. The fix is to use deno eval or deno run instead. A --eval-file path that does not exist fails before the prompt opens.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →