Skip to content

Julia Package Registry


Repository URL Structure

Level URL Pattern
Project {gitflic}/project/{userAlias}/{projectAlias}
Team {gitflic}/project/{teamAlias}/{projectAlias}
Company {gitflic}/project/{companyAlias}/{projectAlias}
Parameter Description
userAlias Project owner nickname
projectAlias Project nickname
teamAlias Team nickname
companyAlias Company nickname

Replace {gitflic} with:
- SaaS: gitflic.ru
- Self-hosted: localhost:8080 (port may vary)


Requirements

Install Julia from:
- Official site
- Or via command line:

Linux/macOS:

curl -fsSL https://install.julialang.org | sh

Windows:

winget install julia -s msstore


Package Creation

  1. Launch Julia REPL:

    julia
    

  2. Generate new package:

    using Pkg
    Pkg.generate("MyNewPackage")
    

Directory structure:

MyNewPackage/
├── Project.toml
└── src/
    └── MyNewPackage.jl

  1. Configure Project.toml:

    [package]
    name = "MyNewPackage"
    uuid = "unique-package-uuid"  # Generate with UUIDs.uuid4()
    authors = ["username <email>"]
    version = "0.1.0"
    
    [compat]
    julia = "1.10"
    

  2. Upload package to GitFlic


Registry Creation

Create a dedicated GitFlic project with this structure:

juliarepo/
├── MyNewPackage/
│   ├── Package.toml
│   └── Versions.toml
└── Registry.toml

Configuration Files

Registry.toml:

name = "MyRegistry"
uuid = "unique-registry-uuid"  
repo = "{gitflic}/project/{owner}/{project}.git"

[packages]
unique-package-uuid = {name = "MyNewPackage", path = "MyNewPackage"}

Package.toml:

name = "MyNewPackage"
uuid = "unique-package-uuid"  
authors = ["username <email>"]
version = "0.1.0"
repo = "{gitflic}/project/{owner}/{package-project}.git"

Versions.toml:

["0.1.0"]
git-tree-sha1 = "git-tree-hash"  # Get via: git rev-parse HEAD^{tree}


Registry Management

  1. Add registry:

    Pkg.Registry.add(RegistrySpec(url="{gitflic}/project/{owner}/{registry-project}.git"))
    

  2. Update registry:

    Pkg.Registry.update()
    

  3. Check status:

    Pkg.Registry.status()
    

  4. Install package:

    Pkg.add("MyNewPackage")
    

  5. Verify installation:

    Pkg.status()
    

  6. Use package:

    using MyNewPackage
    MyNewPackage.greeting()
    

Automatic translation!

This page has been automatically translated. The text may contain inaccuracies