Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.
/ hysp Public archive

๐Ÿ“ฆ An independent package manager that every hacker deserves.

License

Notifications You must be signed in to change notification settings

pwnwriter/hysp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

This project has been archived and is no longer maintained.

WHY?

I recently started university and am currently busy with my personal work. Additionally, I've begun using nix, and this project was initially a way for me to learn about package managers and their internals. Therefore, I am archiving this project and do not recommend anyone use it. However, feel free to borrow any parts of it for your own projects if you find them inspiring.


An independent package manager for unix and linux๐ŸŒท

MIT LICENSE

Table of contents ๐Ÿ“”

Why?? ๐Ÿšฉ

I am a CTF player (Capture the flag) who often finds myself without my main laptop in places that lack the tools I need. Some distros don't carry the packages I require and some doesn't keep them updated. That's why I created my own package manager :). It fetches tool binaries easily, ensuring I always have what I need to compete.

Dont touch my shrug

Features โšพ

  1. Versatile : Hysp operates on (*nix) systems and various architectures (x86, aarch64_arm), providing flexibility for your needs.
  2. Simple : No prerequisites is needed for Hysp or hysp-pkgs. Install Hysp as a single binary, no need for Go, Rust, or any other dependencies. Saves space, storage, and time.
  3. Customizable : Pkg-Source can be self-hosted by anyone, allowing hysp to use your very own instead of the default source and local configuration as well. See #Self hosting
  4. Statically compiled : The default source metis-os/hysp-pkgs) has all statically compiled binaries, only statically linked binaries that will run anywhere. You can always host dynamic or whatever you want.
  5. No Special Privileges : Hysp requires no special perms or privileges. It can run completely in userspace with all of its features.
  6. Everything is open source : Hysp uses github actions to build and ship the packages. On top of that it uses sha for varifying the binary.
7. Security Considerations ย 

It is never a good idea to install random binaries from random sources.

Check these HackerNews Discussions

!# PKG Metadata
# Everything is automated via Github Actions & Scripts
Repo --> https://github.com/metis-os/hysp-pkgs
WorkFlows --> https://github.com/metis-os/hysp-pkgs/tree/main/.github/workflows
Scripts --> https://github.com/metis-os/hysp-pkgs/tree/main/.github/scripts

!# Upstream Source
# Everything is automated via Github Actions & Build Scripts
Repo --> https://github.com/Azathothas/Toolpacks
WorkFlows --> https://github.com/Azathothas/Toolpacks/tree/main/.github/workflows
Build Scripts --> https://github.com/Azathothas/Toolpacks/tree/main/.github/scripts

Installation ๐Ÿ“ฉ

๐Ÿค From source
git clone --depth=1 https://github.com/pwnwriter/hysp --branch=main
cd hysp
cargo build --release 

Then go to release dir and ./hysp or move the binary to your any $PATH for instant access from anywhere.

๐Ÿช„ Binary ย 
  • Manual : You can directly download the binary of your arch and run it.
  • One liner : Run this script, requires jq,curl, tar & wget
wget -qO- "$(curl -qfsSL "https://api.github.com/repos/pwnwriter/hysp/releases/latest" | jq -r '.assets[].browser_download_url' | grep -Ei "$(uname -m).*$(uname -s).*musl" | grep -v "\.sha")" | tar -xzf - --strip-components=1
./hysp -h
๐Ÿ’ฎ using Cargo ย 
  • Using crates.io

    cargo install hysp
  • Using binstall

    cargo binstall hysp

    NOTE: This requires a working setup of rust/cargo & binstall.

๐Ÿšฉ METIS Linux ย 
sudo/doas pacman -Sy hysp
๐Ÿ’ข Arch user repository ย 
paru/yay -S hysp-git

Hysp usages ๐ŸŽ 

Firstly, if you intend to access the binaries installed via hysp over the system, you may want to...

Setup path for hysp bin
  • Add the following line to your shellrc. [ zshrc, bashrc etc. ]

    export PATH="$HOME/.local/share/hysp/bin/:$PATH" # While using default config, else use your own path to bin
Help menu ย 
hysp |install|uninstall|search| -h # check for help menu

screenshot_2023-12-13_19-51-00

Installing packages ย 
hysp install -p <foo,bar,buzz> # use --force to overwrite already installed binary, --quiet to supress console io

screenshot_2023-12-13_19-55-36

Removing packages ย 
hysp remove -p <foo,bar,buzz> 

screenshot_2023-12-13_19-57-26

Search for available pkgs ย 
hysp search -p <pkg> 
  • Raw mode (default)

screenshot_2023-12-13_19-58-22

  • Database mode

screenshot_2023-12-13_19-59-55

  • Fuzzy mode

screenshot_2023-12-13_20-00-34

Checking configuration health ย 
hysp health

screenshot_2023-12-13_20-01-34

Numerous other options exist. Consider installing Hysp and checking it out, wouldn't you?

Hosting custom repo ๐Ÿ’พ

  • Hysp provies the following configuration, which can be overwritten by defining a config file in ~/.config/hysp/config.toml

    [source]
    remote = "https://raw.githubusercontent.com/metis-os/hysp-pkgs/main/data/x86_64"
    metadata ="https://raw.githubusercontent.com/metis-os/hysp-pkgs/main/data/metadata.toml"
    aarch = "Architecture"
    
    [local]   
    home="/home/user/.local/share/hysp"
    bin="/home/user/.local/share/hysp/bin/" 
    data="/home/user/.local/share/hysp/data/" 
    
  • Explanation

Name Description Default
remote Package repository metis-os/hysp-pkgs
metadata Available pkg info metis-os/hysp-pkgs/metadata.toml
home Home for hysp hysp
bin Directory to save the binaries ~/.local/share/hysp/bin
data Directory to save pkg data ~/.local/share/hysp/data
aarch Your system Architecture Only supported X86_64,aarch64
๐ŸŽ„ Tree view of the repo ย 
.
โ”œโ”€โ”€ available.toml # Storing available pkgs info (Optional)
โ”œโ”€โ”€ data
โ”‚ย  โ””โ”€โ”€ foo.toml # where the package data are stored (needed)
๐Ÿ“‚ Sample pkg ย 
[bin]
name = "$BIN" # Name of the pkg to be installed as

[package]
architecture = "x86_64" # Your aarchitecture 
name = "$BIN" # Your package name
description = "$DESCRIPTION" # Description
author = "$AUTHOR" # Author 
repo = "$REPO_URL" 
stars = "${STARS}"
version = "$PKG_VERSION"
updated = "$PKG_RELEASED"
size = "$SIZE"
sha = "$SHA" 
source = "$SOURCE_URL" # Source of the binary wherever it's hosted
language = "$LANGUAGE"
license = "$LICENSE"

[package.conditions]
conflicts  = ["$BIN"] # Conflictions 
requires = [] # Dependencies 

[package.metadata]
keywords = $TOPICS
categories = ["Utilities"]

Packages whuat?? ๐Ÿ“ฆ

There is a list of packages available in metis-os/hysp-pkgs . You can confidently utilize the default configuration without any hesitation. However, if you prefer to host your own packages, you have the option to do so by creating your own custom configuration file under ~/.config/hysp/config.toml. See #repo

Support ๐Ÿ’Œ

I am a student currently attending university. I like working for Open Source in my free time. If you find my tool or work beneficial, please consider supporting me via KO-FI or ESEWA* (Nepal only), Or by leaving a star โญ ; I'll appreciate your action :)

License ใŠ™๏ธ

Everything is license under the MIT except for the packages... They hold their own livess :oOO

Copyright ยฉ 2023 pwnwriter xyz โ˜˜๏ธ