LCM Logo
Project Scaffolding

Julia

Installation

Our recommendation is to use juliaup to install and manage Julia versions.

Install juliaup

In macOS or Linux, you can install juliaup using Homebrew:

shell
brew install juliaup

In Windows, you can install juliaup using Scoop:

shell
scoop install juliaup

Install Julia

You can install the latest version of Julia using juliaup:

shell
juliaup add release

Create a new project

For a simple project, use either Pkg.generate:

julia
using Pkg
Pkg.generate("MyProject")
Pkg.activate("MyProject")
Pkg.add("Example") # Add dependencies

or the package manager's interactive mode:

julia
pkg> generate MyProject
pkg> activate MyProject
pkg> add Example # Add dependencies

For a complete package with testing, CI/CD, and license files, you can use PkgTemplates.jl:

julia
using Pkg
Pkg.add("PkgTemplates")
using PkgTemplates

# Interactive template creation
Template(interactive=true)("MyPkg")

Activate Julia project

To start the Julia REPL with the project environment activated, use:

shell
cd MyProject
julia --project=.

or after starting the REPL, activate the project:

cd MyProject
julia
julia
pkg> activate .

On this page