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
original_active_project = Base.active_project()
try
  withenv("JULIA_PKG_SERVER" => nothing) do
    Pkg.activate()
    Pkg.add("PkgAuthentication")
  end
finally
  Pkg.activate(original_active_project)
end

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

Pkg.Registry.add()

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.

Staying connected to the JuliaHub registry

Note

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

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.