Skip to content

flanksource/deps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deps

A dependency manager for downloading and installing binary tools across multiple platforms and package managers.

Features

  • Multi-platform support: Automatically detects and downloads binaries for Linux, macOS (Intel/ARM), and Windows
  • Multiple package managers: GitHub Releases, GitLab Releases, Apache archives, Maven repositories, and direct downloads
  • Lock file management: Generate reproducible builds with deps-lock.yaml
  • Checksum verification: Ensures binary integrity with SHA256 checksums
  • Version constraints: Supports semantic versioning and version pinning
  • Authentication: Built-in support for GitHub tokens and other auth mechanisms

Installation

Using Go

go install github.com/flanksource/deps/cmd/deps@latest

From Source

git clone https://github.com/flanksource/deps
cd deps
make build
./bin/deps --help

Using the binary directly

Download from the releases page.

Quick Start

  1. Initialize a configuration file:
deps init

This creates a deps.yaml file:

dependencies:
  - name: yq
    source: github.com/mikefarah/yq
    version: v4.40.5
  1. Install dependencies:
deps install
  1. Generate a lock file:
deps lock

This creates deps-lock.yaml with resolved versions and checksums.

Commands

deps install [tool[@version]...]

Install dependencies from deps.yaml or specific tools.

# Install all dependencies
deps install

# Install specific tool
deps install yq

# Install with specific version
deps install yq@v4.40.5

deps lock [package...]

Generate or update deps-lock.yaml with resolved versions and checksums.

# Lock all dependencies
deps lock

# Lock specific packages
deps lock yq kubectl

Flags:

  • --platforms: Comma-separated list of platforms (e.g., linux-amd64,darwin-arm64)

deps update [dependency...]

Check for and optionally update dependencies to newer versions.

# Check for updates
deps update

# Update specific dependency
deps update yq

deps check [tool...]

Check versions of installed tools.

# Check all tools
deps check

# Check specific tool
deps check yq

deps list

List all available dependencies from configuration.

deps version [tool...]

Check installed versions of tools.

deps init

Initialize a new deps.yaml configuration file.

deps whoami

Show authentication status for package managers (GitHub, GitLab, etc.).

Configuration

deps.yaml

# Target directory for installed binaries (default: ./bin)
target: ./bin

# Default installation mode
mode: file  # or "directory"

dependencies:
  - name: yq
    source: github.com/mikefarah/yq
    version: v4.40.5

  - name: kubectl
    source: github.com/kubernetes/kubernetes
    version: v1.28.0

  # Apache package manager
  - name: maven
    source: apache.org/maven
    version: 3.9.5

  # Direct download
  - name: custom-tool
    url: https://example.com/tool-{{.Version}}-{{.Platform}}.tar.gz
    version: 1.2.3

deps-lock.yaml

Generated by deps lock, contains resolved versions and checksums:

dependencies:
  - name: yq
    version: v4.40.5
    platforms:
      linux-amd64:
        url: https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_amd64
        checksum: sha256:abc123...
      darwin-arm64:
        url: https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_darwin_arm64
        checksum: sha256:def456...

Authentication

Set environment variables for private repositories:

# GitHub
export GITHUB_TOKEN=ghp_...

# GitLab
export GITLAB_TOKEN=glpat-...

Check authentication status:

deps whoami

Development

Prerequisites

  • Go 1.25 or later
  • Task (optional, Makefile will auto-install)
  • Ginkgo for testing

Building

# Using make
make build

# Using task
task build

# Build for all platforms
make build-all

Testing

# Run all tests
make test

# Run with report generation
make test:report

# Rerun failed tests
make test:failed

Code Quality

# Format code
make fmt

# Run linter
make lint

# Run all checks
make check

Make/Task Targets

Target Description
build Build the deps binary
build-all Build for all supported platforms
test Run all tests using Ginkgo
test:report Run tests with JSON and JUnit report generation
test:e2e-report Run e2e tests with report generation
test:failed Rerun only failed tests from last test run
lint Run golangci-lint
fmt Format Go code
vet Run go vet
mod-tidy Tidy Go modules
mod-download Download Go module dependencies
clean Clean build artifacts
install Install the binary to GOPATH/bin
check Run all checks (fmt, vet, lint, test)
ci Run all CI checks

Examples

See the examples directory for more configuration examples.

License

See LICENSE file.

About

An npm-like package manager for binaries

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages