Zillowe FoundationZillowe Documentation

Zoi

Universal Package Manager & Environment Setup Tool.

This guide will provide you with everything you need to know to get started, from installation to advanced usage.

Repository

Introduction

Zoi is a universal package manager and environment setup tool, designed to simplify package management and environment configuration across multiple operating systems. It's part of the Zillowe Development Suite (ZDS) and aims to streamline your development workflow by managing tools and project environments with ease.

Features

  • Cross-Platform: Works seamlessly on Linux, macOS, and Windows.
  • Universal Package Support: Install packages from various sources: binaries, compressed archives, build from source, or installer scripts.
  • Extensive Dependency Management: Integrates with over 30+ package managers (apt, brew, cargo, npm, pip, scoop, etc.) to handle dependencies.
  • Rich Dependencies: Packages can define runtime and build dependencies with required, optional, and selectable options groups.
  • Project Environments: Easily define and manage project-specific environments and commands using zoi.yaml.
  • Repository-Based: Manage packages from official or community repositories. Easily add your own.
  • Intuitive CLI: A simple and powerful command-line interface with helpful aliases for a better developer experience.
  • Package Types: Supports standard packages, meta-packages (collections), background services, configuration packages, extensions, libraries, and app templates.
  • Secure Package Distribution: Support for checksums and GPG signatures to verify package integrity and authenticity.
  • Tag-based Discovery: Search by and filter packages using tags for faster discovery.
  • Use as a Library: Integrate Zoi's package management features directly into your Rust applications. See the Library documentation for details.
  • Package Recording & Re-installation: Automatically keeps a record of all installed packages, which can be used to easily reinstall them on a new machine.

Getting Started

Getting started with Zoi is simple. Just follow these three steps:

  1. Install Zoi: Choose one of the installation methods below.

  2. Sync Repositories: Before you can install packages, you need to sync the package repositories.

    zoi sync
  3. Install a Package: Now you can install any package you want. For example, to install hello:

    zoi install hello

Installation

You can install Zoi using a package manager, an installer script, or by building it from source.

Package Managers

Arch Linux (AUR)

Install zoi-bin (Pre-compiled binary) or zoi (built from source) from the AUR:

yay -S zoi-bin

macOS (Homebrew)

brew install Zillowe/tap/zoi

Windows (Scoop)

scoop bucket add zillowe https://github.com/Zillowe/scoop.git
scoop install zoi

From Crates.io

You can install zoi directly from crates.io using cargo

cargo install zoi-rs

From NPM

You can install @zillowe/zoi from npm also.

npx @zillowe/zoi
bunx @zillowe/zoi
pnpm dlx @zillowe/zoi
yarn dlx @zillowe/zoi

Scripts

Linux / macOS:

curl -fsSL https://zillowe.pages.dev/scripts/zoi/install.sh | bash

Windows:

powershell -c "irm zillowe.pages.dev/scripts/zoi/install.ps1|iex"

Build from Source

You'll need Rust installed.

# Build the release binary
# For Linux/macOS
./build/build-release.sh
# For Windows
./build/build-release.ps1

# Install it locally
./configure
make
sudo make install
# Install CLI completions (bash, zsh, fish, elvish, powershell)
make install-completion

Platforms

What platforms we currently support.

OSArchZoi BinaryPackages Support
Linuxamd64✔️✔️
Linuxarm64✔️✔️
macOSamd64✔️✔️
macOSarm64✔️✔️
Windowsamd64✔️✔️
Windowsarm64✔️
FreeBSDamd64✔️
FreeBSDarm64✔️
OpenBSDamd64✔️
OpenBSDarm64✔️

We're planning to add support for more platforms.

Usage & Commands

Zoi provides a wide range of commands to manage your packages and environment. For a full list of commands and their options, you can always run zoi --help.

General Commands

CommandDescription
versionDisplays the version number, build status, branch, and commit hash.
aboutDisplays the full application name, description, author, license, and homepage.
infoDisplays key system details like OS, CPU architecture, and available package managers (requires zoi sync to be run first for package manager detection).
checkVerifies that all required dependencies (like git) are installed.
setupConfigures the shell environment for Zoi to make package binaries available.
--scope <user|system>: Set the scope (default: user).
syncClones or updates the package database from the configured registry.
--verbose: Show the full git output.
--fallback: If the primary registry fails, try to sync from official mirrors (GitHub, Codeberg, GitLab).
--no-pm: Skip checking for installed package managers.
upgradeDownloads the latest release of Zoi and replaces the current executable.
--full: Force a full download, skipping the patch-based upgrade.
--force: Force the upgrade even if the version is the same.
--tag <tag>: Upgrade to a specific git tag.
--branch <branch>: Upgrade to the latest release of a specific branch.
cleanClears the cache of downloaded package binaries.
autoremoveRemoves packages that were installed as dependencies but are no longer needed.
telemetryManages opt-in telemetry.

Package Management

CommandDescription
listLists installed or all available packages.
--all: List all packages, not just installed.
--repo <repo>: Filter by repository.
--type <type>: Filter by package type.
showShows detailed information about a package.
--raw: Display the raw, unformatted package file.
searchSearches packages by name, description, and tags.
--repo <repo>: Filter by repository.
--type <type>: Filter by package type.
-t, --tag <tag>: Filter by one or more tags (repeat or comma-separate).
shellInstalls completion scripts for a given shell (e.g. zoi shell bash).
installInstalls one or more packages. Can also install from a zoi.pkgs.json file (to restore all packages) or a <pkg>.manifest.yaml file (for reproducible dependency choices).
--force: Force re-installation if the package already exists.
--interactive: Choose the installation method interactively.
buildBuilds and installs one or more packages from source.
--force: Force the package to be rebuilt.
uninstallRemoves one or more packages. Also removes any of its dependencies that are no longer needed. For collections, it removes all of its dependencies.
updateUpdates one or more packages to the latest version.
pinPins a package to a specific version to prevent updates.
unpinUnpins a package, allowing it to be updated again.
rollbackRolls back a package to its previously installed version. See Package Rollbacks.
whyExplains why a package is installed (e.g. as a dependency or directly).
cloneClones the source code repository of one or more packages. A target directory can only be specified when cloning a single package.
execDownloads a binary to a temporary cache and runs it without installing it.
createCreates an application from an app template. Usage: zoi create <source> <appName>
makeInteractively creates a new pkg.yaml file.
pkg-configProvides compiler and linker flags for installed libraries.

Project Environment

CommandDescription
runExecutes a command from a local zoi.yaml file. Can be run interactively.
envSets up project environments from a zoi.yaml file. Can be run interactively.

See the full schema and examples in Project Configuration (zoi.yaml).

Service Management

CommandDescription
startStarts a package that is a service.
stopStops a running service package.

Sync Management (sync)

Manages the package database registry URL.

SubcommandDescription
sync set <url or keyword>Sets the package database registry URL. Keywords: default, gitlab, github, codeberg.
sync showDisplays the current registry URL.

Repository Management (repo)

Manages the list of package repositories that Zoi uses.

SubcommandDescription
repo add <name-or-url>Add an official repo by name or clone from a git URL (interactive if no args).
repo rm <name>Remove a repository from the active list.
repo lsShow active repositories. Use repo ls all to show all available repositories.
repo git lsList cloned git repositories under ~/.zoi/pkgs/git.
repo git rm <repo-name>Remove a cloned git repository directory (~/.zoi/pkgs/git/<repo-name>).

Example:

# Add a repository interactively
zoi repo add

# Add a repository by name
zoi repo add community

# Add a repository by git URL (auto-clone)
zoi repo add https://example.com/my-zoi-repo.git

# Remove a repository
zoi repo rm community

# List active repositories
zoi repo ls

For an overview of official repositories, mirrors, and repository tiers, see Repositories.

Zoi supports different types of packages, defined in the .pkg.yaml file.

TypeDescription
PackageA standard software package that can be installed. This is the default type.
CollectionA meta-package that groups other packages together as dependencies.
ServiceA package that runs as a background service. Can be managed with shell commands or via Docker Compose.
ConfigA package that manages configuration files. It includes commands for installing and uninstalling the configuration.
AppAn app template. Not installable; used via zoi create to scaffold an application (e.g. frameworks like Rails).
ExtensionA package that can modify Zoi's configuration, such as adding new package repositories. It is not installed in the traditional sense but its changes are applied or reverted.
LibraryA software library with headers and/or binaries (.so, .dll, .a). Can provide pkg-config files.

Creating Packages (pkg.yaml)

Creating a package for Zoi is done by defining a pkg.yaml file. This file contains all the metadata and instructions Zoi needs to install your software. For more examples, see the Package Examples page.

pkg.yaml Structure

Here is a comprehensive overview of the fields available in a pkg.yaml file. For validation and autocompletion in your editor, you can add a $schema line pointing to the official JSON Schema.

# yaml-language-server: $schema=https://gitlab.com/Zillowe/Zillwen/Zusty/Zoi/-/raw/main/app/pkg.schema.json
# The name of the package. This is required and should be unique.
name: my-awesome-app
# The repository where the package is located (e.g. 'core', 'community', 'core/linux/amd64').
repo: community
# The version of the package. Can be a static version number or a URL to a file containing the version.
version: 1.0.0
# (Optional) A map of version channels to version numbers or URLs.
# Zoi will use the 'stable' channel by default if it exists.
versions:
  stable: 1.0.0
  latest: 1.1.0-beta
# A brief description of the package.
description: My awesome application does awesome things.
# (Optional) The official website for the package.
website: https://my-awesome-app.com
# (Optional) A URL to a README file for the package.
readme: https://my-awesome-app.com/README.md
# (Optional) The source code repository URL.
git: https://github.com/user/my-awesome-app
# Information about the package maintainer.
maintainer:
  name: "Your Name"
  email: "[email protected]"
  # (Optional) URL to the maintainer's public GPG key or the 40-character fingerprint.
  key: "DEADC0DEDEADBEEFDEADC0DEDEADBEEFDEADC0DE"
  # (Optional) Website of the maintainer
  website: "https://maintainer.com"
# (Optional) Information about the original author, if different from the maintainer.
author:
  name: "Author Name"
  email: "[email protected]"
  website: "https://author.com"
  # (Optional) URL to the author's public GPG key or the 40-character fingerprint.
  key: "https://example.com/author.gpg"
# (Optional) The license of the package. Should be a valid SPDX license expression
# (e.g. "MIT", "GPL-3.0-or-later", "MIT OR Apache-2.0").
# Use "Proprietary" for non-SPDX/proprietary licenses.
# Zoi will check for OSI-approved licenses and warn if the check fails.
license: MIT
# (Optional) The installation scope. Can be 'user' (default) or 'system'.
scope: user
# (Optional) The package type. Can be 'package' (default), 'collection', 'service', or 'config'.
type: package
# (Optional) An alternate source to resolve this package from. Can be another
# package name (e.g. 'my-app-git'), a URL to a raw .pkg.yaml file, or a local file path.
alt: my-app-v2
# (Optional) The installation method to use for `zoi update`.
# Can be 'binary', 'com_binary', 'script', or 'source'.
updater: binary
# (Optional) Enable or disable rollbacks for this package. Defaults to true.
# This overrides the global setting in Zoi's config.
rollback: true

# (Optional) A list of important messages to show to the user before installation.
updates:
  - type: change
    message: "This version introduces a new configuration file format."
  - type: vulnerability
    message: "A critical vulnerability (CVE-2025-12345) is present in this version."
  - type: update
    message: "This package will no longer be maintained after 2026."

# (Optional) A list of binaries this package provides. Used for conflict detection.
bins:
  - my-awesome-app
# (Optional) A list of package names that this package conflicts with.
conflicts:
  - my-awesome-app-legacy

# (Optional) A list of tags for discovery and filters.
tags:
  - cli
  - devtools

# (Optional) Defines this package as an extension.
extension:
  type: zoi # The type of extension, currently only 'zoi' is supported.
  changes:
    # A list of changes to apply.
    - type: repo-git # Clones a git repository into the git package source.
      add: https://github.com/user/my-zoi-pkgs.git
    - type: registry-repo # Sets the main package database registry URL.
      add: https://my-mirror.com/Zoi-Pkgs.git
    - type: repo-add # Adds an official repository to the active list.
      add: my-custom-repo

# A list of methods to install the package. Zoi will try them in order.
installation:
  - type: binary
    url: "https://github.com/user/my-awesome-app/releases/download/v{version}/my-awesome-app-{platform}"
    platforms: ["linux-amd64", "macos-amd64", "windows-amd64"]
    # (Optional) Checksum verification for the downloaded file.
    checksums:
      # Option A: simple URL to a checksums file (defaults to sha512)
      url: "https://github.com/user/my-awesome-app/releases/download/v{version}/checksums.txt"
      # Option B: explicit list with type (supports sha512 or sha256)
      # type: sha256
      # list:
      #   - file: "my-awesome-app-zip"
      #     checksum: "<hex-digest-or-url>"
    # (Optional) GPG signature verification for the downloaded file.
    # Zoi will use the 'key' from the 'maintainer' or 'author' fields.
    sigs:
      - file: "my-awesome-app-{platform}"
        sig: "https://github.com/user/my-awesome-app/releases/download/v{version}/my-awesome-app-{platform}.sig"
    # (Optional) A list of installer/bundle types like 'dmg', 'msi', or 'appimage'.
    # Zoi will handle these file types with appropriate platform-specific actions.
    binary_types: ["dmg", "msi", "appimage"]

  - type: com_binary
    url: "https://github.com/user/my-awesome-app/releases/download/v{version}/my-awesome-app-v{version}-{platform}.{platformComExt}"
    platforms: ["linux-amd64", "macos-amd64", "windows-amd64"]
    platformComExt:
      linux: tar.zst
      macos: tar.zst
      windows: zip
    # (Optional) The path or filename of the binary inside the archive.
    # If it ends with .exe, Zoi will name the installed file <package>.exe; otherwise <package>.
    # On Windows targets, if binary_path does not end with .exe, Zoi will also try with .exe appended.
    # Examples:
    # binary_path: "bin/my-awesome-app"
    # binary_path: "my-awesome-app.exe"
    binary_path: "bin/my-awesome-app"

  - type: source
    url: "https://github.com/{git}"
    platforms: ["linux-amd64", "macos-amd64", "windows-amd64"]
    # (Optional) Use only one of these. {version} will be expanded.
    # tag: "v{version}"
    # branch: "release/{version}"
    commands:
      - "make build"
      - "mv ./bin/my-awesome-app {store}/my-awesome-app"

# (Optional) Dependencies required by the package.
dependencies:
  # Dependencies are split into 'build' and 'runtime'.
  build:
    required:
      - native:cmake
    optional:
      - native:doxygen:for generating documentation
  runtime:
    required:
      # Simple required dependency
      - zoi:another-zoi-package
      # A group of selectable required dependencies
      options:
        - name: "GUI Toolkit"
          desc: "Choose a GUI provider"
          all: no # User must choose one
          depends:
            - native:qt6:for KDE desktops
            - native:gtk4:for GNOME desktops
    optional:
      - zoi:awesome-plugin:to enable the awesome feature

# (Optional) Post-installation commands to run after a successful installation.
post_install:
  - platforms: ["linux", "macos"]
    commands:
      - "{name} generate-completions bash > ~/.local/share/bash-completion/completions/{name} || true"
      - "{name} generate-completions zsh > ~/.zsh/completions/_{name} || true"
      - "{name} generate-completions fish > ~/.config/fish/completions/{name}.fish || true"
  - platforms: ["windows-amd64"]
    commands:
      - "powershell -NoProfile -Command \"$p=\"$env:USERPROFILE\\Documents\\PowerShell\"; if(!(Test-Path $p)){New-Item -ItemType Directory -Path $p|Out-Null}; {name}.exe generate-completions powershell >> \"$p\\Microsoft.PowerShell_profile.ps1\"\""

# (Optional) Post-uninstallation commands to run before the package is removed.
post_uninstall:
  - platforms: ["linux", "macos"]
    commands:
      - "rm -f ~/.local/share/bash-completion/completions/{name}"
      - "rm -f ~/.zsh/completions/_{name}"
      - "rm -f ~/.config/fish/completions/{name}.fish"

Installation Methods

Zoi supports four types of installation methods within the installation list:

  1. binary: Downloads a pre-compiled binary directly from a URL.
  2. com_binary: Downloads a compressed archive (.zip, .tar.gz, etc.), extracts it, and finds the binary within. Supports binary_path to point to the executable inside the archive. On Windows targets, if binary_path lacks .exe, Zoi will also try with .exe appended.
  3. source: Clones a git repository and runs a series of build commands you define. Supports optional tag or branch (use only one). If none is provided, the default branch HEAD is used. tag can include placeholders like v{version}.
  4. script: Downloads and executes an installation script (e.g. install.sh).

For the list of supported archive formats for com_binary, see Supported Archives for Compressed Binaries.

Dependencies

For the full list of supported dependency managers, usage semantics, and commands Zoi runs, see Dependencies & Supported Package Managers.

FAQ
















Examples

  • Install a package:

    zoi install <package_name>
  • Install multiple packages:

    zoi install <package_1> <package_2>
  • Update a package:

    zoi update <package_name>
  • Update multiple packages:

    zoi update <package_1> <package_2>
  • Update all packages:

    zoi update all
  • Uninstall a package:

    zoi uninstall <package_name>
  • Uninstall multiple packages:

    zoi uninstall <package_1> <package_2>
  • Install from a specific repository:

    # Install from a top-level repository
    zoi install @community/htop
    
    # Install from a nested repository
    zoi install @core/linux/amd64/nvidia-driver
  • List all available packages from active repos:

    zoi list --all
  • Search for a package:

    zoi search <term>
  • Search by tag directly:

    # The term matches tags too
    zoi search editor
    
    # Require specific tag(s)
    zoi search editor -t cli,devtools
    zoi search editor -t cli -t devtools
  • Check why a package is installed:

    zoi why <package_name>
  • Create an app from a template:

    zoi create <source> <appName>
    # e.g.
    zoi create rails-app MyBlog
    zoi create @community/rails-app MyBlog

Last updated on

2025 © All Rights Reserved.

  • All the content is available under CC BY-SA 4.0, expect where otherwise stated.