# Can I save the code I typed in the REPL?

**URL:** <https://discourse.julialang.org/t/can-i-save-the-code-i-typed-in-the-repl/84654>\
**Category:** New to Julia\
**Created:** [July 22, 2022, 10:13pm UTC](https://discourse.julialang.org/t/can-i-save-the-code-i-typed-in-the-repl/84654 "2022-07-22T22:13:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduardo-zambrano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eduardo-zambrano/32/38099_2.png) [@eduardo-zambrano](https://discourse.julialang.org/u/eduardo-zambrano)\
**Post date:** [July 22, 2022, 10:13pm UTC](https://discourse.julialang.org/t/can-i-save-the-code-i-typed-in-the-repl/84654/1 "2022-07-22T22:13:14Z")

</div>

Hi everyone,

I’m very new to Julia. This is my first question here in Discourse. Before asking I looked it up using the search function and could not see an answer for it.

Say I have written a few lines of code in the REPL. I want to know if there is a way to save the typed code (not the output) as a .jl file without doing any cutting and pasting. I think I know ways to do this in Pluto and VS Code but I want to know if it can be done in the REPL directly.

Thank you!

---

<div class="post-metadata">

**Author:** ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Post date:** [July 22, 2022, 10:22pm UTC](https://discourse.julialang.org/t/can-i-save-the-code-i-typed-in-the-repl/84654/2 "2022-07-22T22:22:25Z")

</div>

The REPL history is in the file `.julia/logs/repl_history.jl`, at least on Linux.

---

<div class="post-metadata">

**Author:** ![eduardo-zambrano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eduardo-zambrano/32/38099_2.png) [@eduardo-zambrano](https://discourse.julialang.org/u/eduardo-zambrano)\
**Post date:** [July 22, 2022, 10:36pm UTC](https://discourse.julialang.org/t/can-i-save-the-code-i-typed-in-the-repl/84654/3 "2022-07-22T22:36:13Z")

</div>

Thank you. After reading your answer I knew what to search for and came across this package, which I found useful: [https://github.com/PetrKryslUCSD/REPLHistory.jl](https://github.com/PetrKryslUCSD/REPLHistory.jl)

and for reference I found that in this post: [Is there an easy way to get at the history of REPL input?](https://discourse.julialang.org/t/is-there-an-easy-way-to-get-at-the-history-of-repl-input/18025)
