- Notifications
You must be signed in to change notification settings - Fork5
📦 Poor man's package manager. +3180 statically linked binaries in the (default) repos! The easy to use, easy to get, suckless software distribution system.
License
ISC, Unknown licenses found
Licenses found
xplshn/dbin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
dbin is a simple, Golang-based rewrite of the originalBDL, it is like a package manager, but without the hassle of dependencies nor the bloat, every binary provided is statically linked. This tool is made to operate on Linux systems, with plans to expand to other platforms soon, dbin is particularly well-suited for embedded systems, we support both amd64 & aarch64. (freeBSD + linuxlator is supported and works quite wonderfully, specially if you want an embedded-ready freeBSD install, you can pair it withdbin
instead ofpkg
)
Why?
“I tend to think the drawbacks of dynamic linking outweigh the advantages for many (most?) applications.” – John Carmack. If you are looking for more in-depth arguments, see:cat-v.ORG - Dynamic Linking
I've seen lots of package manager projects without "packages". What is different about this one?
There are currently binaries in our repos. They are all statically linked.
$ dbin --help Copyright (c) 2025: xplshn and contributors For more details refer to https://github.com/xplshn/dbin Synopsis dbin [-v|-h] [list|install|remove|update|run|info|search|tldr|eget2] <-args-> Description: The easy to use, easy to get, software distribution system Options: -h, --help Show this help message -v, --version Show the version number Commands: list List all available binaries install, add Install a binary remove, del Remove a binary update Update binaries, by checking their SHA against the repo's SHA run Run a specified binary from cache info Show information about a specific binary OR display installed binaries search Search for a binary by supplying one or more search terms Variables: DBIN_CACHEDIR If present, it must contain a valid directory path DBIN_INSTALL_DIR If present, it must contain a valid directory path DBIN_NOTRUNCATION If present, and set to ONE (1), string truncation will be disabled DBIN_REOWN If present, and set to ONE (1), it makes dbin update programs that may not have been installed by dbin DBIN_REPO_URLS If present, it must contain one or more repository URLS ended in / separated by ; DBIN_METADATA_URLS If present, it must contain one or more repository's metadata url separated by ;
dbin search editor dbin install micro.upx dbin install lux kakoune aretext shfmt dbin --silent install bed && echo "[bed] was installed to $INSTALL_DIR/bed" dbin del bed dbin del orbiton tgpt lux dbin info dbin info | grep a-utils | xargs dbin add # install the entire a-utils suite dbin info jq dbin list --described dbin tldr gum dbin --verbose run curl -qsfSL "https://raw.githubusercontent.com/xplshn/dbin/master/stubdl" | sh - dbin --silent run elinks -no-home "https://fatbuffalo.neocities.org/def" dbin --silent run --transparent micro ~/.profile dbin run firefox "https://www.paypal.com/donate/?hosted_button_id=77G7ZFXVZ44EE" # Donate?
In the case of--transparent
, it runs the program from $PATH and if it isn't available in the user's $PATH it will pull the binary fromdbin
's repos and run it from cache.In the case of--silent
, it simply hides the progressbar and all optional messages (warnings) thatdbin
can show, which would always report if the binary is found on cache + the return code of the binary to be run if it differs from 0 otherwise.
--silent
, it hides the progressbar and doesn't print the installation message
Update can receive an optional list of specific binaries to update OR no arguments at all. Whenupdate
receives no arguments it updates everything that is both found in the repos and in your$DBIN_INSTALL_DIR
.
Wheninfo
is called with no arguments, it displays binaries which are part of thelist
and are also found on your$DBIN_INSTALL_DIR
. Ifinfo
is called with a binary's name as argument,info
will display as much information of it as is available. The "Size", "SHA256", "Version" fields may not match your local installation if the binary wasn't provided bydbin
or if it isn't up-to-date.
$ dbin info microName: microDescription: A modern and intuitive terminal-based text editorVersion: v2.0.14Download URL: https://bin.pkgforge.dev/x86_64/microSize: 11.67 MBB3SUM: 2455db4db6e117717b33f6fb4a85d6630268442b111e1012e790feae6255484aSHA256: 6be82c65571f6aac935e7ef723932322ed5d665028a2179d66211b5629d4b665Build Date: 2024-08-31T01:08:46Source URL: https://github.com/zyedidia/microWeb URL: https://github.com/zyedidia/microBuild Script: https://github.com/Azathothas/Toolpacks/tree/main/.github/scripts/x86_64_Linux/bins/micro.shBuild Log: https://bin.pkgforge.dev/x86_64/micro.log.txtCategory: command-line, cross-platform, editor, go, golang, micro, terminal, text-editor
list
can receive the optional argument--described
/-d
. It will display all binaries that have a description in their metadata.
search
can only receive ONE search term, if the name of a binary or a description of a binary contains the term, it is shown as a search result.search
can optionally receive a--limit
argument, which changes the limit on how many search results can be displayed (default is 90).
To begin using dbin, simply run one of these commands on your Linux system. No additional setup is required. You may also build the project usinggo build or go install
wget -qO- "https://raw.githubusercontent.com/xplshn/dbin/master/stubdl" | sh -s -- --help
wget -qO- "https://raw.githubusercontent.com/xplshn/dbin/master/stubdl" | sh -s -- --install "$HOME/.local/bin/dbin"
Whenever you want to pull a specific GNU coreutil, busybox, toybox, etc, insert a bash snippet, use a *fetch tool, etc, you can use dbin for the job! There's also a--transparent
flag forrun
, which will use the users' installed version of the program you want to run, and if it is not found in the$PATH
dbin will fetch it and run it from$DBIN_CACHEDIR
.
system_info=$(wget -qO-"https://raw.githubusercontent.com/xplshn/dbin/master/stubdl"| sh -s -- run --silent albafetch --no-logo -|| curl -qsfSL"https://raw.githubusercontent.com/xplshn/dbin/master/stubdl"| sh -s -- run --silent albafetch --no-logo -)
Hmm, can I add my own repos?
Yup, you'll need to provide a repository index, a JSON (or CBOR/YAML) file like this:
{"SillyRepo": [ {"pkg":"a-utils/ed","pkg_name":"ed","pkg_id":"github.com.xplshn.a-utils","description":"Ed with syntax highlighting (ed from u-root but with syntax highlighting)","version":"0.0.5","download_url":"https://hf.co/datasets/pkgforge/bincache/resolve/main/a-utils/official/ed/0.0.5-x86_64-linux/a-utils.static","size":"5.4 MB","bsum":"1f0213b604bf964dbd2ad0dbaddab1c6a64e5da7ea89febcbdb9de337a081d19","shasum":"e2deb5cb912858603900a890630876e0830a9a912d2a71c05742b697c98bc768","build_date":"2025-01-21T02:21:53Z","src_urls": ["https://github.com/xplshn/a-utils" ],"web_urls": ["https://github.com/xplshn/a-utils","https://github.com/xplshn/Andes" ],"build_script":"https://github.com/pkgforge/soarpkgs/blob/main/binaries/a-utils/static.official.stable.yaml","build_log":"https://api.ghcr.pkgforge.dev/pkgforge/bincache/a-utils/official/ed?tag=0.0.5-x86_64-linux\u0026download=ed.log","notes": ["Pre Built Binary Fetched from Upstream. Check/Report @ https://github.com/xplshn/a-utils" ],"ghcr_pkg":"oci://ghcr.io/pkgforge/bincache/a-utils/official/ed:0.0.5-x86_64-linux","ghcr_blob":"oci://ghcr.io/pkgforge/bincache/a-utils/official/ed@sha256:e2deb5cb912858603900a890630876e0830a9a912d2a71c05742b697c98bc768","rank":1822 },... More Entries here ...}
NOTE: Not all fields are essential :)
I am using these two libraries fordbin
:
- https://github.com/urfave/cli (v3)
- https://github.com/hedzr/progressbar (an attractive-looking progressbar, but with a messy API and codebase. Currently the only good alternative to mpb/v8+)
- https://github.com/goccy/go-json (index files can be .json)
- https://github.com/goccy/go-yaml (config && index files can be .yaml)
- https://github.com/klauspost/compress (index files can be .zst && .gz)
- https://github.com/fxamacker/cbor (index files can be .cbor)
- https://github.com/zeebo/blake3 (checksums)
- https://golang.org/x/term
Contributions are welcome! Whether you've found a bug, have a feature request, or wish to improve the documentation, your input is valuable. Fork the repository, make your changes, and submit a pull request. Together, we can make dbin even more powerful and simpler. If you can provide repos that meet the requirements to add them todbin
, I'd be grateful.
dbin is licensed under the ISC (equivalent to MIT but without unnecessary legal wording) or RABRMS Licenses, choose whichever fits your needs best.
About
📦 Poor man's package manager. +3180 statically linked binaries in the (default) repos! The easy to use, easy to get, suckless software distribution system.