A universal, distributed package manager

Overview

Cask

installation lint test build Latest Version License Repo Size

A universal, distributed package manager.

Installation | Usage | How to publish package? | Design | Contributing | Cask.toml

If you are tired of:

  1. Install different package manager in different platform (Homebrew/Chocolatey/Scoop).
  2. Writing installation scripts many times(Bash/PowerShell).
  3. Update remote package information when release a new version

Then welcome to Cask.

Installation

  1. Shell (Mac/Linux)

    curl -fsSL https://github.com/cask-pkg/cask.rs/raw/main/install.sh | bash
  2. PowerShell (Windows):

    iwr https://github.com/cask-pkg/cask.rs/raw/main/install.ps1 -useb | iex
    
  3. Github release page

    Download the executable, then put it in the $PATH directory.

  4. Upgrade from existing version

    cask self-update

Usage

# cask install 
   
cask install github.com/axetroy/dvm
# cask install 
    
    
   
cask install github.com/axetroy/dvm 1.x
# cask install 
   
cask install https://github.com/axetroy/dvm.git
# cask install from stdin
curl https://raw.githubusercontent.com/axetroy/dvm/master/Cask.toml | cask install

# cask uninstall 
   
cask uninstall github.com/axetroy/dvm
# or uninstall with shorter command
cask rm dvm

Show more information with cask --help command.

Command

Command Description
cask install [VERSION] Install package
cask uninstall Uninstall package
cask info Show information of package
cask update Update package to latest
cask check-updates Check and update packages to latest
cask list List installed package
cask clean Clear residual data
cask self-update Update Cask to the newest version
cask build-in sync Sync build-in formula from remote
cask build-in list List build-in formula

Requirement

Cask depends on Git

Contributors

This project exists thanks to all the people who contribute. How to contribute.

LICENSE

The MIT License

Comments
  • install script not working

    install script not working

    It doesn't work with or without sudo.

    https://user-images.githubusercontent.com/71897736/158862974-4e183c33-972e-40c7-9978-ef1d41ea7374.mp4

    Neofetch

                       -`                    z@frame
                      .o+`                   -------
                     `ooo/                   OS: Arch Linux x86_64
                    `+oooo:                  Host: HP 250 G7 Notebook PC
                   `+oooooo:                 Kernel: 5.16.13-arch1-1
                   -+oooooo+:                Uptime: 3 hours, 49 mins
                 `/:-:++oooo+:               Packages: 991 (pacman)
                `/++++/+++++++:              Shell: zsh 5.8.1
               `/++++++++++++++:             Resolution: 1366x768, 1600x900
              `/+++ooooooooooooo/`           WM: i3
             ./ooosssso++osssssso+`          Theme: Adwaita [GTK2/3]
            .oossssso-````/ossssss+`         Icons: Adwaita [GTK2/3]
           -osssssso.      :ssssssso.        Terminal: WezTerm
          :osssssss/        osssso+++.       CPU: Intel i5-1035G1 (8) @ 3.600GHz
         /ossssssss/        +ssssooo/-       GPU: Intel Iris Plus Graphics G1
       `/ossssso+/:-        -:/+osssso+-     GPU: NVIDIA GeForce MX110
      `+sso+:-`                 `.-/+oso:    Memory: 3690MiB / 15785MiB
     `++:.                           `-/+/
     .`                                 `/
    
    
    opened by UltiRequiem 8
  • Why need a separate repo to store Cask.toml

    Why need a separate repo to store Cask.toml

    I see the configuration is only one file, why not just put Cask.toml in the project repo instead of creating a separate one, I understand that Cask.toml should also be part of the project, no need to store it separately.

    opened by iawia002 8
  • Support for fetching formula directly from the project repo

    Support for fetching formula directly from the project repo

    close #4

    I didn't use the method of determining if the repo exists first, since we are supporting two repo scenarios, there may be a repo in {package}-cask format but it is not used to store the Cask.toml file, this patch uses a simpler method and supports more scenarios, see my test results for https://github.com/iawia002/casktest-cask repo:

    Fetching github.com/iawia002/casktest formula...
    Downloading https://github.com/iawia002/lux/releases/download/v0.14.0/lux_0.14.0_macOS_64-bit.tar.gz
      [00:00:04] [###############################################################################################################################################################################################################] 13.79MiB/13.79MiB (3.41MiB/s, 0s)
    The package 'github.com/iawia002/lux 0.14.0' has been installed!
    Try run the command 'lux --help' to make sure it works!
    

    Repo non-existent test:

    Fetching github.com/iawia002/casktest1 formula...
    It looks like the package does not support Cask
    If you are the package owner, see our documentation for how to publish a package: https://github.com/axetroy/cask.rs/blob/main/DESIGN.md#how-do-i-publish-myothers-package
    thread 'main' panicked at 'install package fail!: clone repository fail and exit code: 128
    

    cc @axetroy I'll update the documentation if it's okay

    opened by iawia002 1
  • support template renderer in Hook script

    support template renderer in Hook script

    [package]
    name = "github.com/axetroy/gpm.rs"
    bin = "gpm"
    versions = ["0.1.12", "0.1.11"]
    authors = ["Axetroy <[email protected]>"]
    keywords = ["gpm", "git", "project", "manager"]
    repository = "https://github.com/axetroy/gpm.rs"
    description = """
    A command line tool, manage your hundreds of repository, written with Rust.
    """
    
    [context]
    foo = "bar"
    
    [hook.unix.sh]
    preinstall = """
    echo "Welcome install {package.name}"
    echo "hello {context.foo}"
    """
    postinstall = """
    echo "{package.bin}@{version} has been installed."
    echo "Try runing with fllowing command {package.bin} --help"
    """
    
    [darwin]
    x86_64 = "https://github.com/axetroy/gpm.rs/releases/download/v{version}/gpm_darwin_amd64.tar.gz"
    
    
    opened by axetroy 0
  • Running hook in diff platform

    Running hook in diff platform

    Windows:

    Cmd or PowerShell

    Unix:

    sh or shell

    Command:

    [hook]
    preinstall = "echo 'preinstall'"
    postinstall = "echo 'postinstall'"
    

    Windows:

    # running hook in windows with PowerShell
    [hook.windows]
    preinstall = "echo 'preinstall'"
    postinstall = "echo 'postinstall'"
    

    Unix:

    # running hook in windows with sh
    [hook.unix]
    preinstall = "echo 'preinstall'"
    postinstall = "echo 'postinstall'"
    
    enhancement 
    opened by axetroy 0
  • BREAKING CHANGE: remove {package}-cask.git fallback

    BREAKING CHANGE: remove {package}-cask.git fallback

    cask will priority to requests {package}-cask.git

    If that exists. then fetch Cask.toml from it.

    if not then fetch from {package}.git

    This looks great, but no one seems to want to create one more repository.

    So, I want to remove it

    opened by axetroy 0
  • feat: extract file from sub-folder in tarball

    feat: extract file from sub-folder in tarball

    [darwin]
    x86_64 = { url = "https://github.com/xxx/xxx/releases/download/v{version}/golangci-lint-{version}-darwin-amd64.tar.gz", path = "/path/to/sub/folder" }
    
    opened by axetroy 0
  • Simplify the download url

    Simplify the download url

    Current:

    # Cask.toml
    [darwin]
    x86_64 = { url = "https://github.com/<username>/<repo>/releases/download/v{version}/darwin_amd64.tar.gz" }
    

    If the CASK.TOML file is just a simple point to binary, we can simplify it.

    [darwin]
    - x86_64 = { url = "https://github.com/<username>/<repo>/releases/download/v{version}/darwin_amd64.tar.gz" }
    + x86_64 = "https://github.com/<username>/<repo>/releases/download/v{version}/darwin_amd64.tar.gz"
    
    opened by axetroy 0
  • Remove `tar` command dependency

    Remove `tar` command dependency

    block on https://github.com/alexcrichton/tar-rs/issues/286

    Since tar-rs does not decompress files correctly, the system's decompression command tar is prioritized.

    When the tar-rs is fixed, the dependence of the tar command will be removed.

    opened by axetroy 0
  • refactor: remove unused check_exist function

    refactor: remove unused check_exist function

    Since #9 used another way, we don't need this function anymore, this patch removes this function to avoid the blow warning:

    warning: function is never used: `check_exist`
      --> src/git.rs:18:8
       |
    18 | pub fn check_exist(url: &str) -> Result<bool, Report> {
       |        ^^^^^^^^^^^
       |
       = note: `#[warn(dead_code)]` on by default
    
    warning: `cask` (bin "cask") generated 1 warning
    
    opened by iawia002 0
  • feat: support build step

    feat: support build step

    [package]
    name = "github.com/axetroy/gpm.rs"
    bin = "gpm"
    versions = ["0.1.12", "0.1.11"]
    authors = ["Axetroy <[email protected]>"]
    keywords = ["gpm", "git", "project", "manager"]
    repository = "https://github.com/axetroy/gpm.rs"
    description = """
    A command line tool, manage your hundreds of repository, written with Rust.
    """
    
    [build.unix]
    sh = """
    git clone https://github.com/axetroy/gpm.rs
    make
    """
    [[build.unix.binary]]
    name = "gpm"
    path = "./gpm"
    
    [build.windows]
    cmd = """
    git clone https://github.com/axetroy/gpm.rs
    make
    """
    [[build.windows.binary]]
    name = "gpm"
    path = "./gpm.exe"
    
    

    This formula will clone https://github.com/axetroy/gpm.rs and then run make command.

    opened by axetroy 1
  • Support build for powerpc

    Support build for powerpc

    https://github.com/axetroy/cask.rs/runs/5643148108?check_suite_focus=true

    error: failed to run custom build command for `bzip2-sys v0.1.11+1.0.8`
    
    Caused by:
      process didn't exit successfully: `/home/runner/work/cask.rs/cask.rs/target/release/build/bzip2-sys-a6ccc4bdf2d32a24/build-script-build` (exit status: 1)
      --- stdout
      cargo:rerun-if-env-changed=BZIP2_NO_PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_powerpc64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_powerpc64_unknown_linux_gnu
      cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
      cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
      cargo:rerun-if-env-changed=PKG_CONFIG_powerpc64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_powerpc64_unknown_linux_gnu
      cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_powerpc64-unknown-linux-gnu
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_powerpc64_unknown_linux_gnu
      cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
      TARGET = Some("powerpc64-unknown-linux-gnu")
      OPT_LEVEL = Some("z")
      HOST = Some("x86_64-unknown-linux-gnu")
      CC_powerpc64-unknown-linux-gnu = None
      CC_powerpc64_unknown_linux_gnu = None
      TARGET_CC = None
      CC = None
      CROSS_COMPILE = None
      CFLAGS_powerpc64-unknown-linux-gnu = None
      CFLAGS_powerpc64_unknown_linux_gnu = None
      TARGET_CFLAGS = None
      CFLAGS = None
      CRATE_CC_NO_DEFAULTS = None
      DEBUG = Some("false")
      CARGO_CFG_TARGET_FEATURE = None
      running: "powerpc-linux-gnu-gcc" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "bzip2-1.0.8" "-D_FILE_OFFSET_BITS=64" "-DBZ_NO_STDIO" "-o" "/home/runner/work/cask.rs/cask.rs/target/powerpc64-unknown-linux-gnu/release/build/bzip2-sys-111e0700d8097fca/out/lib/bzip2-1.0.8/blocksort.o" "-c" "bzip2-1.0.8/blocksort.c"
    
      --- stderr
    
    
      error occurred: Failed to find tool. Is `powerpc-linux-gnu-gcc` installed?
    

    remove bzip2-sys and use in pure-rust impl

    opened by axetroy 0
  • feat: implement dependencies in `Cask.toml`

    feat: implement dependencies in `Cask.toml`

    [dependencies]
    "github.com/example/foo" = "1.0.0"
    "github.com/example/bar" = { version = "1.0.0" }
    "github.com/example/cool" = { version = "1.x" }
    
    opened by axetroy 0
  • v1.0 roadmap

    v1.0 roadmap

    • [x] extrator: drop tar command #21
    • [x] extractor: extract file from sub-folder in tarball #29
    • [x] extractor: support more tarball format
      • [x] .~7z~ it's very rare in the distribution software, so drop it
      • [x] .~rar~ it's very rare in the distribution software, so drop it
      • [x] .tar.bz2
    • [ ] Stable Cask.toml
      • [x] Simplify the download url #27
      • [ ] Support checksums file
      • [ ] Support build step instead of specify download URL
      • [x] Support binary file in sub-folder 7ca7a8a8bb22c563166db26837a22ff73eb6ede1
      • [ ] Implement dependencies #28
    • [ ] Maybe: drop git command, use pure rust implement Git lib #36
    • [ ] Command-line auto-complete
    • [x] ~Colorful some important information in stdout/stderr~ d882909687d039771641b8c2497cd626c5e4c010
    • [x] Add check for update command #13
    • [ ] A documentation website
    • [x] https://github.com/axetroy/cask.rs/issues/31
    • [x] Cross compile #33
    opened by axetroy 0
Releases(v0.4.9)
Owner
null
A model checker for implementing distributed systems.

A model checker for implementing distributed systems.

Stateright Actor Framework 1.3k Dec 15, 2022
Magical Automatic Deterministic Simulator for distributed systems in Rust.

MadSim Magical Automatic Deterministic Simulator for distributed systems. Deterministic simulation MadSim is a Rust async runtime similar to tokio, bu

MadSys Research Group 249 Dec 28, 2022
The lightest distributed consensus library. Run your own replicated state machine! ❤️

Little Raft The lightest distributed consensus library. Run your own replicated state machine! ❤️ Installing Simply import the crate. In your Cargo.to

Ilya Andreev 359 Dec 26, 2022
Raft distributed consensus for WebAssembly in Rust

WRaft: Raft in WebAssembly What is this? A toy implementation of the Raft Consensus Algorithm for WebAssembly, written in Rust. Basically, it synchron

Emanuel Evans 60 Oct 22, 2022
Paxakos is a pure Rust implementation of a distributed consensus algorithm

Paxakos is a pure Rust implementation of a distributed consensus algorithm based on Leslie Lamport's Paxos. It enables distributed systems to consistently modify shared state across their network, even in the presence of failures.

Pavan Ananth Sharma 2 Jul 5, 2022
Sorock is an experimental "so rocking" scale-out distributed object storage

Sorock is an experimental "so rocking" scale-out distributed object storage

Akira Hayakawa 6 Jun 13, 2022
🗽 Universal Node Package Manager

?? NY Universal Node Package Manager node • yarn • pnpm Features Universal - Picks the right package manager for you based on the lockfile in your fol

Kris Kaczor 46 Oct 12, 2023
Damavand is a quantum circuit simulator. It can run on laptops or High Performance Computing architectures, such CPU distributed architectures or multi GPU distributed architectures.

Damavand is a quantum circuit simulator. It can run on laptops or High Performance Computing architectures, such CPU distributed architectures or multi GPU distributed architectures.

MichelNowak 0 Mar 29, 2022
open source training courses about distributed database and distributed systemes

Welcome to learn Talent Plan Courses! Talent Plan is an open source training program initiated by PingCAP. It aims to create or combine some open sour

PingCAP 8.3k Dec 30, 2022
Damavand is a quantum circuit simulator. It can run on laptops or High Performance Computing architectures, such CPU distributed architectures or multi GPU distributed architectures.

Damavand is a code that simulates quantum circuits. In order to learn more about damavand, refer to the documentation. Development status Core feature

prevision.io 6 Mar 29, 2022
A simple to use rust package to generate or parse Twitter snowflake IDs,generate time sortable 64 bits unique ids for distributed systems

A simple to use rust package to generate or parse Twitter snowflake IDs,generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)

houseme 5 Oct 6, 2022
Semi-automatic OSINT framework and package manager

sn0int sn0int (pronounced /snoɪnt/) is a semi-automatic OSINT framework and package manager. It was built for IT security professionals and bug hunter

null 1.4k Dec 31, 2022
A cryptographically verifiable code review system for the cargo (Rust) package manager.

A cryptographically verifiable code review system for the cargo (Rust) package manager.

crev - Code REView system 1.8k Jan 2, 2023
Cargo - The Rust package manager

Cargo downloads your Rust project’s dependencies and compiles your project.

The Rust Programming Language 9.5k Jan 4, 2023
basic multiple package manager

baka basic multiple package manager Docs Env baka_root_setting Windows: %USERPROFILE%/.baka/config Linux, Mac: $HOME/.baka/config baka_plugins (Just u

null 8 Dec 29, 2021
Volt - A powerful, fast and memory safe package manager for the web

Volt - A powerful, fast and memory safe package manager for the web

Volt Package Manager 811 Dec 30, 2022
A cryptographically verifiable code review system for the cargo (Rust) package manager.

image credit cargo-crev A cryptographically verifiable code review system for the cargo (Rust) package manager. Introduction Crev is a language and ec

crev - Code REView system 1.8k Jan 5, 2023
Novus - A blazingly fast and efficient package manager for windows.

Novus - A blazingly fast and efficient package manager for windows. Why Novus Swift Unlike any other package manager, Novus uses multithreaded downloads

Novus 197 Dec 18, 2022
Wally is a modern package manager for Roblox projects inspired by Cargo

Wally is a package manager for Roblox inspired by Cargo (Rust) and npm (JavaScript). It brings the familiar, community-oriented world of sharing code from other communities into the Roblox ecosystem.

Uplift Games 194 Jan 3, 2023
A package manager for the Lite-XL code editor

Lite-XL Package Manager (lpm) (Under Development) lpm is an attempt to create a package manager for the Lite-XL code editor. It's primary goal is to p

Debarchito Nath 12 Dec 11, 2022