Skip to content
/ Zigp Public

CLI based Zig package manager that suit your Zig lang needs. ⭐️ Please star to support this work!

Notifications You must be signed in to change notification settings

Zigistry/Zigp

Repository files navigation

Experimental Zig CLI package manager

alt
impvid.mp4

To install run:

curl https://raw.githubusercontent.com/zigistry/zigp/main/install_script.sh -sSf | sh

What all can this do right now?

Adding a package to your zig project:

zigp add gh/<owner-name>/<repo-name>

# Example:
zigp add gh/capy-ui/capy

Updating your zig project's build.zig.zon following zigp.zon:

zigp update all

Update a specific dependency:

zigp update --specific zorsig

Removing a package from zigp.zon as well as build.zig.zon:

zigp remove <package-name>

# Example:
zigp remove zorsig

Installing a program as a binary file (This will also export it to your $PATH):

zigp install gh/<owner-name>/<repo-name>

# Example:
zigp install gh/zigtools/zls

Seeing info of a specific repository

zigp info gh/<owner-name>/<repo-name>

# Example:
zigp info gh/zigtools/zls

Self updating zigp to the latest version

zigp self-update

Release based version management:

"^x.y.z" Allowing updates that don't change the left most 0. "~x.y.z" Allow patch updates within same minor version. "==x.x.x" Fixed version, no changes. "*" Any latest available version allowed. "x.y.z...a.b.c" updates within x.y.z and a.b.c range (both inclusive). "|tag_name" If a release not following semver rules, and zigp is unable to parse it as a semver, the tag_name would be added after a |. No updates, version remains fixed.

Branch based version management:

"%master" will update to latest commit at master branch. "==%master" No changes.

Roadmap:

Zig Packages:

  • Add
  • Add specific version
    • Menu Driven (Choose the version to add from options)
  • Check Info
  • Update
    • Update packages commit
    • Update packages to the latest release if using releases.
    • Update specific packages.
  • Remove

Zig applications:

  • Installing:
    • Specific version
      • Menu Driven (Choose the version to install from options)
    • CLI tools (with exporting them to $PATH)
    • Complete Applications (--cask option to be implemented)
  • Updating:
    • CLI tools
    • Complete Applications (--cask option to be implemented)
  • Removing:
    • CLI tools
    • Complete Applications (--cask option to be implemented)

Providers:

  • GitHub
  • CodeBerg
  • GitLab

Operating Systems:

Implementation:

  • Macos
  • Linux
  • WSL
  • Windows

Shells:

  • Bash
  • Zsh
  • sh

Testing:

  • Macos
  • Linux
  • Windows
  • WSL

Miscelanious:

  • Coloured output
  • Self update
  • One step installation/addition
  • Proper debug/info/error messages (partially completed)

Example zigp.zon:

.{
    .zigp_version = "0.0.0",
    .zig_version = "0.15.1",
    .dependencies = .{
        .zorsig = .{
            .owner_name = "rohanvashisht1234",
            .repo_name = "zorsig",
            .provider = .GitHub,
            .version = "|asdasdasd",
        },
        .capy = .{
            .owner_name = "capy-ui",
            .repo_name = "capy",
            .provider = .GitHub,
            .version = "%master",
        },
        .zap = .{
            .owner_name = "zigzap",
            .repo_name = "zap",
            .provider = .GitHub,
            .version = "0.9.0...0.10.6",
        },
    },
}

About

CLI based Zig package manager that suit your Zig lang needs. ⭐️ Please star to support this work!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published