# \[ANN\] ReplExit.jl: type exit at the REPL, no parentheses needed

**URL:** <https://discourse.julialang.org/t/ann-replexit-jl-type-exit-at-the-repl-no-parentheses-needed/139970>\
**Category:** Package Announcements\
**Created:** [October 12, 2026, 12:55pm UTC](https://discourse.julialang.org/t/ann-replexit-jl-type-exit-at-the-repl-no-parentheses-needed/139970 "2026-10-12T12:55:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Post date:** [October 12, 2026, 12:55pm UTC](https://discourse.julialang.org/t/ann-replexit-jl-type-exit-at-the-repl-no-parentheses-needed/139970/1 "2026-10-12T12:55:18Z")

</div>

Every Julia user has typed `exit` at the REPL, been shown `exit (generic function with 2 methods)`, sighed, and typed `exit()`. ReplExit.jl is the small package that ends the sigh:

```julia-auto
julia> exit
$

```

`quit` works the same way.

**How it works.** The REPL runs every parsed input through a list of AST transforms before evaluating it. ReplExit adds one: a line consisting of nothing but the bare symbol `exit` or `quit` is rewritten to `exit()`. Nothing else is touched, so `exit` stays an ordinary function value everywhere: `f = exit`, `exit` in a script, `exit` inside an `include`d file all behave exactly as before. In particular it is not the oft-posted `Base.show(io, ::MIME"text/plain", ::typeof(exit)) = exit()` trick, which is type piracy and quits whenever the function object happens to get displayed.

**Install.** Add it to your default environment, then let it wire itself into `startup.jl`:

```julia
(@v1.11) pkg> add ReplExit

julia> using ReplExit
julia> ReplExit.install()

```

From the next session on, bare `exit` quits. `install()` adds a guarded `try using ReplExit catch ... end` block to `~/.julia/config/startup.jl`, backs up the previous file, is idempotent, and can never keep Julia from starting; `uninstall()` takes the block out again. Within a session, `disable!()` and `enable!()` turn the rewrite off and on.

**Caveats.** REPL only; no effect on scripts, `julia -e`, or editors and notebooks that bypass the REPL. It relies on `REPL.repl_ast_transforms` and `Base.active_repl_backend`, which are internals; tested on Julia 1.10 and up against a real REPL on a pseudo-terminal, and if a future release renames them, `enable!` warns and does nothing rather than breaking your REPL.

Repo and docs: [GitHub - NittanyLion/ReplExit.jl: Type exit at the Julia REPL, without parentheses, and it quits · GitHub](https://github.com/NittanyLion/ReplExit.jl)

Feedback and PRs welcome.

---

<div class="post-metadata">

**Author:** ![ForceBru](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/forcebru/32/21389_2.png) [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Post date:** [October 12, 2026, 3:24pm UTC](https://discourse.julialang.org/t/ann-replexit-jl-type-exit-at-the-repl-no-parentheses-needed/139970/2 "2026-10-12T15:24:55Z")

</div>

> [@Joris\_Pinkse](#):
>
> Every Julia user has typed `exit` at the REPL, been shown `exit (generic function with 2 methods)`, sighed, and typed `exit()`.

Simply hit Ctrl+D, no need to call `exit()`.

---

<div class="post-metadata">

**Author:** ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Post date:** [October 12, 2026, 3:34pm UTC](https://discourse.julialang.org/t/ann-replexit-jl-type-exit-at-the-repl-no-parentheses-needed/139970/3 "2026-10-12T15:34:35Z")

</div>

force of habit: whenever I wish to close a terminal window or the repl I type exit
