# Workflow Tips
Here are some tips for working with Julia efficiently.
# REPL-based workflow
As already elaborated in The Julia REPL, Julia's REPL provides rich functionality
that facilitates an efficient interactive workflow. Here are some tips that might further enhance
your experience at the command line.
# Command-line-based basic editor/REPL workflow
The most basic Julia workflows involve using a text editor in conjunction with the
line. A common pattern includes the following elements:
Generate a new project
$ julia -e 'using Pkg;Pkg.generate("Tmp")'
Generating project Tmp:
$ ls -R Tmp
$ cat -n Tmp/src/Tmp.jl
1 module Tmp
3 greet() = print("Hello World!")
5 end # module
* **Create a test folder**
$ mkdir Tmp/test
* **Put your test code in `test/runtests.jl` file.**
$ cat -n Tmp/test/runtests.jl 1 using Tmp 2 Tmp.greet() ```
- Run test
$ julia -e 'using Pkg;Pkg.activate("Tmp");Pkg.test()' Updating registry at `~/.julia/registries/General` Updating git-repo `https://github.com/JuliaRegistries/General.git` Resolving package versions... Updating `~/Tmp/Project.toml` [no changes] Testing Tmp Resolving package versions... Hello World! Testing Tmp tests passed
- Lather. Rinse. Repeat. Explore ideas at the
juliacommand prompt. Save good ideas in
Tmp.jland test with
# Simplify initialization
To simplify restarting the REPL, put project-specific initialization code in a file, say
which you can run on startup by issuing the command:
julia -L _init.jl
If you further add the following to your
isfile("init.jl") && include(joinpath(pwd(), "init.jl"))
julia from that directory will run the initialization code without the additional
command line argument.
# Browser-based workflow
It is also possible to interact with a Julia REPL in the browser via IJulia.
See the package home for details.