Skip to content

ElioNeto/agnostikos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

135 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AgnosticOS

A meta-wrapper package manager β€” unify Pacman, Nix, and Flatpak under a single CLI.

License: MIT Go Version CI Release


πŸš€ Installation

Via install script (recommended)

curl -fsSL https://raw.githubusercontent.com/ElioNeto/agnostikos/main/scripts/install.sh | sh

The script automatically detects your architecture (amd64 / arm64), fetches the latest release from GitHub, verifies the SHA256 checksum, and installs the agnostic binary to /usr/local/bin (or ~/.local/bin as fallback).

Manual download

Download the pre-built binary for your platform from the Releases page, extract it, and place it in your PATH:

tar -xzf agnostikos_*.tar.gz
sudo install agnostic /usr/local/bin/

πŸ“– Overview

AgnosticOS is a meta-wrapper package manager that abstracts multiple package ecosystems behind a single, unified command-line interface. Instead of learning pacman -S, nix profile install, and flatpak install separately, you use agnostic install β€” the tool dispatches to the right backend automatically.

Built from scratch in Go, AgnosticOS is designed for developers who work across distributions and want a consistent, scriptable package management experience.

Key features:

  • πŸ”€ Multi-backend dispatch β€” Pacman, Nix, and Flatpak, all from one CLI
  • πŸ“‹ Config-driven installs β€” declare your packages in agnostic.yaml
  • πŸ” Full lifecycle management β€” agnostic search, list, install, remove, update for complete package management
  • πŸ–₯️ Terminal UI β€” interactive package browser with agnostic tui
  • 🌐 Web UI β€” browser-based management with agnostic serve
  • πŸ”’ Namespace isolation β€” optional Linux mount namespace sandboxing
  • πŸ—οΈ Build pipeline β€” full ISO generation: RootFS β†’ toolchain β†’ kernel β†’ busybox β†’ initramfs β†’ GRUB β†’ ISO (BIOS or UEFI)
  • πŸ’Ώ ISO builder β€” standalone ISO generation from an existing RootFS (agnostic iso)

🧩 Supported backends

Backend Scope Use case Status
Pacman Arch Linux Native Arch packages βœ…
Nix NixOS / multi Reproducible, declarative pkgs βœ…
Flatpak Universal Sandboxed desktop apps βœ…

πŸš€ Quick start

# Clone
git clone https://github.com/ElioNeto/agnostikos.git
cd agnostikos

# Install dependencies & build
make deps
make build

# See available commands
./build/agnostic --help

Install a single package:

./build/agnostic install firefox --backend flatpak

Install from config file:

./build/agnostic install --config agnostic.yaml

List installed packages:

./build/agnostic list

Search for packages:

./build/agnostic search neovim --backend nix

Remove a package:

./build/agnostic remove firefox

Update packages:

./build/agnostic update                # update all packages
./build/agnostic update firefox        # update a specific package
./build/agnostic update --dry-run      # simulate update without executing

Launch the TUI:

./build/agnostic tui

Start the Web UI server:

./build/agnostic serve

πŸ—οΈ Build pipeline

The build command runs the complete ISO generation pipeline β€” from creating the RootFS to producing a bootable ISO image.

# Default build (auto-detects architecture, uses kernel 6.6, busybox 1.36.1)
sudo ./build/agnostic build --output /tmp/agnostikos.iso

# Build from a recipe file
./build/agnostic build recipes/base.yaml

# Quick build (skip lengthy toolchain compilation)
./build/agnostic build --skip-toolchain --output /tmp/agnostikos.iso

# Full build with UEFI
sudo ./build/agnostic build \
  --uefi \
  --output /tmp/agnostikos.iso

Note: The bootstrap subcommand is still available internally for advanced use (agnostic bootstrap --help), but build is the recommended entry point.

Key flags

Flag Default Description
-o, --output agnostikos-latest.iso Output ISO path
-t, --target $AGNOSTICOS_ROOT RootFS target directory
--device β€” Disk for BIOS grub-install
--efi-partition β€” ESP partition for UEFI grub-install
--uefi false Enable UEFI boot support
--kernel-version 6.6 Linux kernel version
--busybox-version 1.36.1 Busybox version
--arch auto-detect Target architecture (amd64, arm64)
--recipe β€” Load settings from a YAML recipe file
--skip-toolchain false Skip toolchain compilation
--skip-kernel false Skip kernel compilation
--skip-busybox false Skip busybox compilation
--skip-initramfs false Skip initramfs generation
--skip-grub false Skip GRUB installation
--force false Rebuild all steps from scratch

πŸ“ Project structure

agnostikos/
β”œβ”€β”€ cmd/agnostic/          # CLI entry point (Cobra)
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ bootstrap/         # RootFS, kernel, busybox, initramfs, GRUB
β”‚   β”œβ”€β”€ config/            # YAML config parsing
β”‚   β”œβ”€β”€ dotfiles/          # Dotfile backup/restore/sync
β”‚   β”œβ”€β”€ iso/               # ISO builder (xorriso/mkisofs)
β”‚   β”œβ”€β”€ isolation/         # Linux namespace isolation
β”‚   β”œβ”€β”€ manager/           # PackageService interface + backends
β”‚   β”œβ”€β”€ server/            # Web UI server
β”‚   └── tui/               # Terminal UI (Bubble Tea)
β”œβ”€β”€ recipes/               # YAML image definitions (base.yaml)
β”œβ”€β”€ scripts/               # QEMU runner, CI helpers
β”œβ”€β”€ docs/                  # Architecture & requirements docs
β”œβ”€β”€ agnostic.yaml.example  # Example configuration
β”œβ”€β”€ Makefile               # Build, test, lint, ISO targets
└── main.go                # Binary entry point

βš™οΈ Prerequisites

Tool Version / Notes
Go 1.22+
GNU Make Any recent version
grub-install GRUB 2 (apt install grub-efi-amd64 or grub-pc)
xorriso ISO creation (apt install xorriso)
qemu-system-x86 QEMU for ISO testing (apt install qemu-system-x86)
ovmf UEFI firmware for QEMU (apt install ovmf)
git Version control

See docs/requirements.md for detailed setup instructions.


πŸ”§ Makefile targets

make build              # Compile CLI binary
make test               # Run unit tests with race detector
make test-iso           # Test ISO in QEMU (graphical)
make test-iso-headless  # Test ISO in QEMU (headless, for CI)
make lint               # Run golangci-lint
make fmt                # Format Go code
make install            # Install to /usr/local/bin
make clean              # Remove build artifacts
make iso                # Build ISO from RootFS
make bootstrap          # (internal) RootFS bootstrap pipeline (requires root)
make dev                # Run in development mode

Note: make build runs the full pipeline and does NOT require root unless you use --device/--efi-partition for GRUB installation into real hardware. make bootstrap is kept for backward compatibility but make build [ARGS="..."] is the recommended target.


πŸ“„ Example configuration (agnostic.yaml)

version: "1.0"
locale: pt_BR.UTF-8
timezone: America/Sao_Paulo

packages:
  base:
    - vim
    - git
    - curl
  extra:
    - docker
    - neovim

backends:
  default: pacman
  fallback: nix

user:
  name: dev
  shell: /bin/zsh

Then run:

agnostic install --config agnostic.yaml

πŸ—ΊοΈ Roadmap

  • CLI bootstrap with Cobra
  • PackageService interface
  • Pacman backend
  • Nix backend
  • Flatpak backend
  • Namespace isolation (CLONE_NEWNS)
  • ISO builder (BIOS + UEFI)
  • CI pipeline (build, test, lint)
  • RootFS generator (FHS + usrmerge)
  • Toolchain download (binutils, gcc, glibc)
  • GRUB installation (BIOS + UEFI, auto ESP mount)
  • Kernel compilation
  • Busybox compilation
  • Initramfs generation
  • Full LFS bootstrap recipe
  • QEMU smoke test in CI
  • agnostic.yaml schema validation
  • Multi-architecture support (ARM64)

πŸš€ Post-Boot Flow

After booting a custom AgnosticOS ISO, the system starts with busybox init as the PID 1 process.

Init system

The kernel launches /init which is a symlink to busybox's /sbin/init. The init process reads /etc/inittab to determine what to run:

::sysinit:/etc/init.d/rcS       β†’  system initialization
::ctrlaltdel:/sbin/reboot       β†’  Ctrl+Alt+Del handling
::shutdown:/sbin/swapoff -a     β†’  swap teardown
::shutdown:/bin/umount -a -r    β†’  filesystem unmount

The boot script /etc/init.d/rcS mounts virtual filesystems, sets up device nodes via mdev, and configures the hostname.

Login

  • Auto-login mode (default for live sessions): If AutoLoginUser is set in the bootstrap config, the configured user is automatically logged in on tty1 via /bin/login -f <user>.
  • Manual login mode: When no auto-login user is configured, init presents a login prompt on the console (::askfirst:-/bin/sh). The default credentials depend on the contents of /etc/passwd and /etc/shadow in the rootfs.

Available commands

Once logged in, the following agnostic commands are available:

Command Description
agnostic tui Launch the interactive terminal UI (TUI)
agnostic install <package> Install a package via the default backend
agnostic install --config <file> Install packages declared in a YAML config
agnostic list List installed packages across all backends
agnostic search <query> Search for packages in configured backends
agnostic remove <package> Remove an installed package
agnostic backend list Show available backends (pacman, nix, flatpak)

Package installation

# Install a single package using the default backend
agnostic install firefox

# Install using a specific backend
agnostic install firefox --backend flatpak

# Install from a declarative config file
agnostic install --config /etc/agnostic.yaml

Building a custom ISO

# Full pipeline: RootFS β†’ toolchain β†’ kernel β†’ busybox β†’ initramfs β†’ GRUB β†’ ISO
sudo make build ARGS="--output /tmp/custom.iso"

# Quick build (skip toolchain, use cached artifacts)
sudo make build ARGS="--skip-toolchain --output /tmp/custom.iso"

# Build with a recipe file
./build/agnostic build recipes/base.yaml

⬇️ Download

Pre-built binaries for Linux (amd64 and arm64) are available on the Releases page.

Each release includes:

  • agnostikos_<version>_linux_amd64.tar.gz
  • agnostikos_<version>_linux_arm64.tar.gz
  • checksums.txt (SHA256)

Man pages

Man pages are included in the release archive under docs/man/. To install them:

sudo install -d /usr/local/share/man/man1
sudo install -m 644 docs/man/* /usr/local/share/man/man1/
sudo mandb  # update the man database

You can also generate the latest man pages from source:

make docs
sudo install -m 644 docs/man/* /usr/local/share/man/man1/
sudo mandb

🀝 Contributing

Please read CONTRIBUTING.md for details on our code of conduct, development setup, and the PR process.


πŸ“„ License

MIT β€” see LICENSE


Author: Elio Neto β€” Santa Catarina, Brasil

About

AgnosticOS: A developer-focused Linux distro with a hybrid package manager written in Go

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors