Skip to content


Creating packages

  1. Create the package locally. If using PkgTemplates.jl, this automatically initializes the github repo and sets it as the origin (git remote add origin <url>).
  2. Write some code.
  3. Push to github.


The typical flow would be:

using PkgTemplates
gitIgnore = ["*.jl.cov", "*.jl.*.cov", "*.jl.mem", "/deps/deps.jl", "/docs/build"];
t = Template(;
    dir = joinpath(homedir(), "Documents", "julia"),
    plugins = [
        Git(; jl = false, ignore = gitIgnore),


Note that dir points to the parent directory of the new packages to be created.

Even if one does not want to deploy documentation, the Documenter plugin is needed to create the barebones file structure.

PkgSkeleton.jl (1.5)

The easiest way for creating a package is PkgSkeleton.jl. You need to set your github info ( etc) using

git config --global YourName

This must be done inside a git directory. Then generate generates the directory structure and the required files (Project.toml etc). Example:



  • I first create the repo on github and clone it to the local dir.
  • Then I use, from the parent dir: PkgSkeleton.generate("MyPackage", skip_existing_dir = false)
  • This way everything is linked to github from the start.

Github and packages

The basic steps (after creating the package locally):

  1. Create the package on github.
  2. git branch -M main
  3. git push -u origin main

Or import the package repo into Github Desktop.

Pkg Errors

Occasionally, Pkg complains that a package is not registered. ]registry up tends to solve that issue.