Using JuliaSim Packages Locally via the JuliaHub Registry

To use JuliaSim packages on your local machine, you will need to add JuliaHub as a registry on your computer. To do this, you need to download an authentication token from the platform.

Adding the JuliaHub registry

Start a Julia session and install the PkgAuthentication package. This package can be used for both initial setup and to stay connected to the registry.

using Pkg
Pkg.add("PkgAuthentication")

Next, configure Julia to be aware of http://juliahub.com's package server:

using PkgAuthentication
PkgAuthentication.install("juliahub.com")

Then add all known registries on https://juliahub.com, including the JuliaHub registry, using the command:

Pkg.Registry.add()
Note

The command above will only work on Julia v1.8 and later. On versions prior to v1.8 use the pkg> REPL command registry add instead.

This will open up a new browser window or tab and ask you to sign in to https://juliahub.com or to confirm authenticating as an already logged in user.

JuliaHub Authentication when not logged inJuliaHub Authentication when logged in

Once logged in, the browser tab can be closed. Julia will be authenticated with the package server at https://juliahub.com and download all available registries.

Note

This will also change the package server to https://juliahub.com for all Julia sessions that run startup.jl.

Staying connected to the JuliaHub registry

The authentication token will expire after a while, so it is convenient to enable an automatic mechanism for renewal. This can be achieved using the previously installed PkgAuthentication package, by adding the following snippet to your local <home directory>/.julia/config/startup.jl file.

Base.eval(Module(), quote
    using PkgAuthentication
    PkgAuthentication.install("juliahub.com")
end)

This will ensure that whenever a Pkg operation is performed that an up-to-date authentication token is available either silently or through another browser interaction.

Supported Packages

The following JuliaSim packages currently support usage through the JuliaHub registry:

See the relevant package's documentation for more details.

Note

JuliaSim is a proprietary software developed by JuliaHub Inc. Using the packages through the registry requires a valid JuliaSim license. It is free to use for non-commercial academic teaching and research purposes. For commercial users, license fees apply. Please refer to the End User License Agreement for details. Please contact sales@juliahub.com for purchasing information.