Repository navigation
Add cain vps and an install menu (Full / Light / Dotfiles / Keybindings / Server / Custom) - #1
Merged
Merged
Conversation
- vps.sh bootstraps a fresh server (Debian/Ubuntu, Fedora, RHEL family, Arch, openSUSE, Alpine, Void): installs git + a C compiler, clones and builds cain, then runs `cain vps`. - `cain vps [steps]` runs packages, git, files, bin and shell only; it installs packages marked "terminal": true and skips keys/desktop/GUI. - cain.json: add the programs cain.sh actually uses (python3/pip/venv, tree, nnn, fzf, nmap, ffmpeg, yt-dlp, ssh, iproute2, ...) with per-distro names. Packages accept null per package manager, a "fallback" shell command and a "bin" name. - Package installs: apt is non-interactive, apk/zypper refresh first, pacman does a full -Syu, EPEL (+CRB) is enabled on Rocky/Alma/CentOS/RHEL. CAIN_PM forces a package manager. - Shell: SSH login shells now load ~/.bashrc, and a non-bash login shell is switched to bash. cain.sh gains apk/xbps/yum, a headless `open`, an `ip` that works without `hostname -I`, and a sudo shim for root. - Tests for each distro's package names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012UFcA7u8gWu2RPdtQjpqhW
cain vps: set up any Linux server with just the terminal toolscain vps and an install menu (Full / Light / Dotfiles / Keybindings / Server / Custom)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two changes:
cain vps: a server version of cain that installs only what's used in the terminal, on any mainline Linux distro.cain -ino longer installs everything by default. It asks what you want.Install menu
atoggles all, Enter starts.cain vps.cainuses the same kind of menu to ask Install or Collect.cain install light(orfull,dotfiles,keybindings,server) picks a preset directlycain -i -yinstalls everythingsrc/tui.cis plain C with no dependencies: termios on Linux/macOS, conio on Windows. It clips lines to the terminal width so redraws don't break, and falls back to a numbered prompt if the output isn't a terminal.Server / VPS
On a fresh server:
(That URL works once this is merged.)
vps.shinstalls git and a C compiler, clones cain to~/cain, builds it and runscain vps. Works with apt, dnf/yum, pacman, zypper, apk and xbps: Debian, Ubuntu, Fedora, Rocky/Alma/CentOS/RHEL, Arch, openSUSE, Alpine, Void.cain vps [steps]runspackages git files bin shellonly, installs packages marked"terminal": true, and skips keys, desktop settings, GUI apps and the reboot prompt.cain.jsonadds the programscain.shuses (python3, pip, venv, tree, nnn, fzf, nmap, ffmpeg, yt-dlp, ssh, iproute2, bash, sudo, curl, …) with each distro's package name.nullfor a package manager to skip it there"fallback"shell command, used for micro and yt-dlp, which install into~/.local/bin"bin"to check for when the command isn't the same asname-SyuCAIN_PMforces a package manager, for testing~/.bashrc. A login shell that isn't bash or zsh (e.g. Alpine'sash) is switched to bash.cain.sh:install,updateand the other package aliases now cover apk, xbps and yumipworks withouthostname -Iopenprints links when there's no desktopsudoshim for root when sudo isn't installedThings to know
pacman -Syufirst.Testing
make test: 18 checks pass. The new ones cover each preset's steps and the package names for apt, dnf, pacman, apk and zypper.-Werrorunder gcc and clang, and cross-compiles for Windows with MinGW under-Werror.vps.shin a container:🤖 Generated with Claude Code
https://claude.ai/code/session_012UFcA7u8gWu2RPdtQjpqhW