Skip to content

Add nebi CLI tool #5

@Adam-D-Lewis

Description

@Adam-D-Lewis

Darb CLI is the command-line interface for managing reproducible conda environments using OCI registries. It enables users to create, push, pull, and manage environments from the terminal.

Overview

The CLI should support all workflows defined in #8, enabling both standalone usage (darb <command>) and as a pixi extension (pixi darb <command>).

Target Registries

Initial implementation should focus on:

  • Docker Hub
  • GitHub Container Registry (ghcr.io)
  • Quay.io

Users authenticate using the native CLI tools of each registry (e.g., docker login, gh auth login). Darb reads existing credentials from the system.

Commands

Registry Management

# Add a registry to browse/pull from
darb registry add ghcr.io/myorg

# List configured registries
darb registry list

# Remove a registry
darb registry remove ghcr.io/myorg

Environment Operations

# Create a new environment (wraps pixi init + pixi add)
darb env create myenv
darb env create myenv --packages numpy pandas scikit-learn

# List environments
darb env list              # all environments
darb env list --local      # only local
darb env list --remote     # only from subscribed registries

# Show environment details
darb env info myenv

# Delete a local environment
darb env delete myenv

# List versions/tags of a remote environment
darb env versions ghcr.io/myorg/data-science

Push & Pull

# Push environment to registry
darb push                                    # push from current directory
darb push myenv                              # push named environment
darb push myenv --tag v1.0.0                 # push with specific tag
darb push myenv --tag stable                 # semantic tags supported

# Pull environment from registry
darb pull ghcr.io/myorg/data-science         # pull latest
darb pull ghcr.io/myorg/data-science:v1.0.0  # pull specific version
darb pull ghcr.io/myorg/data-science:stable  # pull by tag

Activation (ref: #7)

# Activate environment (conda-like workflow)
darb activate myenv

# Deactivate environment
darb deactivate

# Shell into environment
darb shell myenv

Pixi Extension Support

Darb should be usable as a pixi extension. When installed, users can run:

pixi darb push
pixi darb pull ghcr.io/myorg/data-science
pixi darb registry add ghcr.io/myorg

This is achieved by naming the binary pixi-darb, which pixi automatically discovers as a subcommand.

Note on Upstream Pixi Work

There is ongoing work in pixi to support conda-like named environments natively:

  • PR #5277: Adds pixi registry add/list/remove commands for named workspace support

If this lands upstream, Darb may leverage it directly. In the interim, Darb should provide its own activation mechanism to enable the conda-like workflow that data scientists expect (see #7).

@Adam-D-Lewis's WIP PR: #4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions