{"id":15567100,"url":"https://github.com/pylipp/sdd","last_synced_at":"2025-07-07T01:05:22.894Z","repository":{"id":45616051,"uuid":"179159454","full_name":"pylipp/sdd","owner":"pylipp","description":"setup-da-distro framework to manage installation of programs for non-root users on Linux systems","archived":false,"fork":false,"pushed_at":"2025-04-01T08:36:40.000Z","size":371,"stargazers_count":16,"open_issues_count":9,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T23:48:53.472Z","etag":null,"topics":["bash","command-line","linux","program-management","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pylipp.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-02T21:12:18.000Z","updated_at":"2025-04-01T08:36:43.000Z","dependencies_parsed_at":"2025-04-23T23:48:55.397Z","dependency_job_id":"15887bb9-0018-4d74-baff-3ea354322ed0","html_url":"https://github.com/pylipp/sdd","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/pylipp/sdd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pylipp%2Fsdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pylipp%2Fsdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pylipp%2Fsdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pylipp%2Fsdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pylipp","download_url":"https://codeload.github.com/pylipp/sdd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pylipp%2Fsdd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263996083,"owners_count":23541399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","command-line","linux","program-management","shell"],"created_at":"2024-10-02T17:09:55.664Z","updated_at":"2025-07-07T01:05:22.871Z","avatar_url":"https://github.com/pylipp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `setup-da-distro`\n\n[![Build Status](https://travis-ci.org/pylipp/sdd.svg?branch=master)](https://travis-ci.org/pylipp/sdd)\n\n\u003e A framework to manage programs from web sources for non-privileged users on Linux systems\n## Motivation\n\nDuring occasional strolls on reddit or github, my attention is often drawn towards programs that increase productivity or provide an enhancement over others. (As a somewhat irrelevant side note - these programs mostly work in the command line.) Usually these programs are available for download as binary or script, meaning that naturally, the management (installation, upgrade, removal) of those programs has to be performed manually. At this point `sdd` comes into play: It provides a framework to automatize the tasks of managing the programs (or, in `sdd` terminology, 'apps'). The procedures to manage specific apps are defined within scripts in this repository (at `lib/sdd/apps/user/`).\n\n`sdd` enables me to keep track of my favorite programs, on different machines. I'm working towards having systems set up in a reproducible way on my machines. `sdd` helps me, since I might have different Linux distributions installed on these machine, with different package manager providing different versions of required programs (or none at all). I can freeze the versions of all apps managed by sdd with `sdd list --installed \u003e sdd_freeze.txt`, and re-create them with `sdd install \u003c(cat sdd_freeze.txt | xargs)`.\n\nFinally on some systems I might not have root access, and hence I can't install missing programs using a package manager. `sdd` allows for unprivileged management of programs.\n\n## WARNINGS\n\n`sdd` is a simple collection of bash scripts, not a mature package manager (neither do I aim to turn it into one...). Using it might break things on your system (e.g. overwrite existing program files).\n\nWhen using `sdd`, you execute functionality to manipulate your system. Especially, you download programs from third parties, and install them on your system. Most sources are provided by GitHub releases pages. Keep in mind that repositories can be compromised, and malicious code placed inside; and `sdd` will still happily download it. (If you have an idea how to mitigate this security flaw, please open an issue.)\n\n`sdd` is targeted to 64bit Linux systems. Some apps might not work when installed to different architectures. If available, `bash` and/or `zsh` shell completion and `man` pages are set up when installing an app.\n\n## Demo\n\nThe following screencast demonstrates how `sdd` is used to install, upgrade and uninstalled the [`fd`](https://github.com/sharkdp/fd) utility.\n\n![Demo](./demo.svg)\n\n## Installation\n\nClone the directory and run the bootstrap script to install `sdd` to `~/.local`:\n\n    git clone https://github.com/pylipp/sdd\n    cd sdd\n    git checkout v0.1.1.0  # or any other revision\n    ./bootstrap.sh\n\nYou can specify the installation directory with the `PREFIX` environment variable:\n\n    PREFIX=/usr ./bootstrap.sh\n\nPlease verify that the `bin` sub-directory of the installation directory is present in your `PATH`. You might want to append this to your shell configuration file:\n\n    export PATH=\"~/.local/bin:$PATH\"\n\nSame applies for the `MANPATH`:\n\n    export MANPATH=\"~/.local/share/man:$MANPATH\"\n\nFor enabling `zsh` completion functions (`oh-my-zsh` users: put this before the line that sources `oh-my-zsh.sh` since it calls `compinit` for setting up completions):\n\n    fpath=(~/.local/share/zsh/site-functions $fpath)\n\nFor enabling `bash` completion functions, you should be fine if you already use the [`bash-completion`](https://github.com/scop/bash-completion) package. Otherwise add this snippet to your `~/.bashrc`:\n\n```bash\nif [ -d ~/.local/share/bash_completion ]; then\n    # Source custom completion files\n    while IFS= read -r -d '' f; do\n        . \"$f\"\n    done \u003c \u003c(find ~/.local/share/bash_completion -type f -print0)\nfi\n```\n\n`sdd` is tested with `bash` 4.4.12.\n\n### Dependencies\n\n`sdd` depends on `bash`, `git`, and `wget`. Python-related apps require `python3`.\n\n## Upgrading\n\nOnce the program is bootstrapped, upgrade to the latest version by\n\n    sdd upgrade sdd\n\n## Usage\n\n### Installing an app\n\nInstall an app to `SDD_INSTALL_PREFIX` (defaults to `~/.local`) with\n\n    sdd install \u003capp\u003e\n\nYou can specify a custom installation prefix like this:\n\n    SDD_INSTALL_PREFIX=~/bin sdd install \u003capp\u003e\n\nor by exporting the `SDD_INSTALL_PREFIX` environment variable.\n\nBy default, `sdd` installs the latest version of the app available. You can specify a version for installation:\n\n    sdd install \u003capp\u003e=\u003cversion\u003e\n\n\u003e This command overwrites an existing installation of the app without additional conformation.\n\n\u003e The format of the `\u003cversion\u003e` specifier depends on the app that is managed (usually it's the tag of the release on GitHub).\n\n### Upgrading an app\n\nTo upgrade an app to the latest version available, run\n\n    sdd upgrade \u003capp\u003e\n\nIf you want to upgrade to a specific version, run\n\n    sdd upgrade \u003capp\u003e=\u003cversion\u003e\n\nInternally, `sdd` executes un- and re-installation of the app for upgrading unless a specific upgrade routine has been defined.\nThe usage of `SDD_INSTALL_PREFIX` is the same as for the `install` command.\n\n### Uninstalling an app\n\nTo uninstall an app, run\n\n    sdd uninstall \u003capp\u003e\n\nThe usage of `SDD_INSTALL_PREFIX` is the same as for the `install` command.\n\n### Batch commands\n\nThe commands `install`, `upgrade`, and `uninstall` can take multiple arguments to manage apps, e.g.\n\n    sdd install \u003capp1\u003e \u003capp2\u003e=\u003cversion\u003e \u003capp3\u003e\n\n### Listing app management information\n\nList installed apps by running\n\n    sdd list\n    sdd list --installed\n\nList all apps available for management in `sdd` with\n\n    sdd list --available\n\nList all installed apps that can be upgraded to a more recent version with\n\n    sdd list --upgradable\n\nThe `list` command options come in short forms, too: `-i`, `-a`, `-u`\n\n### General help\n\nHigh-level program output during management is forwarded to the terminal. Output of the `sdd_*` functions of the app management file is in `/tmp/sdd-\u003ccommand\u003e-\u003capp\u003e.stderr`. For increased verbosity when running `sdd`, set the respective environment variable before invoking the program\n\n    SDD_VERBOSE=1 sdd install \u003capp\u003e\n\nYou can always consult\n\n    sdd --help\n\n## Apps available\n\nIn alphabetical order:\n\nName | Description\n:--- | :---\n[bat](https://github.com/sharkdp/bat) | A cat(1) clone with syntax highlighting and Git integration\n[borg](https://www.borgbackup.org/) | Deduplicating archiver with compression and authenticated encryption\n[broot](https://github.com/Canop/broot) | A new way to see and navigate directory trees\n[circleci](https://github.com/CircleCI-Public/circleci-cli) | Use CircleCI from the command line\n[dasel](https://github.com/TomWright/dasel) | Query and update data structures from the command line\n[delta](https://github.com/dandavison/delta) | A syntax-highlighter for git and diff output\n[diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) | Human readable diffs\n[direnv](https://github.com/direnv/direnv) | Handle environment variables depending on current directory\n[docker-compose](https://github.com/docker/compose) | Define and run multi-container applications with Docker (v2)\n[dust](https://github.com/bootandy/dust) | A more intuitive version of du in rust\n[fd](https://github.com/sharkdp/fd) | A simple, fast and user-friendly alternative to 'find'\n[ffsend](https://github.com/timvisee/ffsend) | Easily and securely share files from the command line\n[gh](https://github.com/cli/cli) | GitHub's official command line tool\n[gitui](https://github.com/extrawurst/gitui) | blazing fast terminal-ui for git written in rust\n[git-trim](https://github.com/foriequal0/git-trim) | Automatically trims your branches whose tracking remote refs are merged or stray\n[go](https://github.com/golang/go) | The Go programming language\n[hub](https://github.com/github/hub) | Command line tool to interact with GitHub\n[jira](https://github.com/go-jira/jira) | Simple JIRA command line client in Go\n[jq](https://github.com/stedolan/jq) | Command line JSON processor\n[ncdu](https://dev.yorhel.nl/ncdu) | Disk usage analyzer with ncurses interface\n[oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) | Framework for managing zsh configuration\n[Pandoc](https://github.com/jgm/pandoc) | Universal markup converter\n[pip](https://pypi.org/project/pip/) | Python package manager\n[Python](https://github.com/indygreg/python-build-standalone) | Python language installed from redistributable builds\n[qrcp](https://github.com/claudiodangelis/qrcp) | Transfer files over wifi from your computer to your mobile device by scanning a QR code\n[ripgrep](https://github.com/BurntSushi/ripgrep) | Line-oriented text search tool\nsdd | Thanks for being here :)\n[slack-term](https://github.com/erroneousboat/slack-term) | Slack client for your terminal\n[ShellCheck](https://github.com/koalaman/shellcheck) | A static analysis tool for shell scripts\n[shfmt](https://github.com/mvdan/sh) | A shell parser, formatter, and interpreter (sh/bash/mksh)\n[Telegram](https://github.com/telegramdesktop/tdesktop) | Telegram Desktop messaging app\n[wuzz](https://github.com/asciimoo/wuzz) | Interactive cli tool for HTTP inspection\n[xh](https://github.com/ducaale/xh) | Friendly and fast tool for sending HTTP requests\n[xsv](https://github.com/BurntSushi/xsv) | A fast CSV command line toolkit written in Rust\n\n## Customization\n\nYou can both\n\n- define app management files for apps that are not shipped with `sdd`, and\n- extend app management files for apps that are shipped with `sdd`.\n\nThe procedure in either case is:\n\n1. Create an empty bash file named after the app in `~/.config/sdd/apps` (without `.bash` extension).\n1. Add the functions `sdd_install` and `sdd_uninstall` with respective functionality. It's mandatory to add a function, even if without functionality (define `sdd_uninstall() { return; }`).\n1. Optionally, you can add an `sdd_upgrade` function. It will be executed for upgrading, instead of `sdd_uninstall` followed by `sdd_install`.\n1. You're able to manage the app as described in the 'Usage' section. `sdd` tells you when it found a customization for the app specified on the command line.\n\nFor exemplary files, see my personal definitions and extensions [here](https://github.com/pylipp/dotfiles/tree/master/sdd_apps).\n\n## Project structure\n\nIt is distinguished between\n\n- framework files,\n- app management files,\n- testing files, and\n- project meta-files.\n\n### Description\n\n1. Framework files contain the logic to run the program. They provide generic utility methods (generating symlinks, reading environment variables, etc.). Examples are: program executable, library files.\n1. App management files contain instructions to manage specific apps. For each app, at least one management file exists. A management file contains at least methods for installing, upgrading, and uninstalling an app. Management files are organized in directories indicating their level (user or root).\n1. Testing files cover the functionality of both the framework and the app management files. They are executed in an isolated environment.\n1. Project meta-files comprise documentation files, configuration files for development tools, an installation script, among others.\n\n## Contributing\n\n### Requirements\n\n- `git`\n- `docker`\n- `python3`\n- optionally: `docker-compose`\n\n### Development environment\n\nClone this repository and pull the Docker image to enable testing and style-checking.\n\n    git clone https://github.com/pylipp/sdd\n    docker pull pylipp/sdd\n\nSet up the local environment for style-checking using the [pre-commit](https://pre-commit.com/) framework.\n\n    test/setup/venv\n\n### Testing\n\nThe program is tested in a container environment using the `bats` framework. Invoke the test runner by\n\n    test/run.sh\n\nYou might want to skip app tests since they require an internet connection\n\n    NO_APP_TESTS=1 test/run.sh\n\nFor attaching to the test container after the tests have completed, do\n\n    test/run.sh --debug\n\nFor running specific tests (paths relative to repository root)\n\n    test/run.sh test/apps/fd.bats test/apps/sdd.bats\n\nFor creating a Docker container and attaching it to the terminal, do\n\n    test/run.sh --open\n\nFor style checking, run\n\n    test/run.sh --style\n\nFor building the image, run\n\n    docker build test/setup -t sdd:latest\n\nYou can also build and test the image in a single command by\n\n    docker-compose -f test/setup/docker-compose.test.yml up\n\nNote that DockerHub automatically builds the image when source code is pushed to GitHub, and pushes it the DockerHub repository if the tests succeeded. The tests are defined in `test/setup/docker-compose.test.yml`.\n\n### Extending\n\nYou're looking for managing an app but it's not included in `sdd` yet? Here's how contribute an app management script:\n\n1. Fork this repository.\n1. In your fork, create a feature branch.\n1. Create an empty bash file named after the app in `lib/sdd/apps/user`.\n1. Add a test in `test/apps/\u003capp\u003e.bats`, e.g. verifying the version of the app to be installed.\n1. Add the functions `sdd_install` and `sdd_uninstall` with respective functionality.\n1. Add app name, link, and description to the table of available apps in the README file.\n1. Add the new files, commit, and push.\n1. Open a PR!\n\n### Releasing\n\n1. Update Changelog.\n1. Run `./release VERSION`\n\n## Related projects\n\nUse case | Tool\n--- | ---\nManaging Python packages (system-wide or user-specific) | pip\nManaging Python apps (system-wide or user-specific) | [pipx](https://pipxproject.github.io/pipx/)\nGenerate packages from Makefile and track installation by package manager | [CheckInstall](https://asic-linux.com.mx/~izto/checkinstall/)\nDeclarative whole-system configuration; unprivileged package management | [GNU Guix](https://guix.gnu.org/)\nCreating packages of various formats | [fpm](https://github.com/jordansissel/fpm)\n\nNote that maintaining packages (deb, rpm, etc.) might still require root privileges, depending on your system.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpylipp%2Fsdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpylipp%2Fsdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpylipp%2Fsdd/lists"}