zsvo/main.go
itexpert228 b4b02e8e82
feat: Add Nix-style binary cache, Linux sandbox, pacman UI, thermal management, fakeroot tests
- Content-addressable store (CAS) like Nix for fast lookups
- Binary cache system with remote support
- Linux chroot sandbox for isolated builds
- Pacman-style UI with progress bars and colors
- Temperature-aware parallel builds
- fakeroot integration tests
- Update .gitignore for Docker and test artifacts

Implements LFS-optimized build pipeline with proper fakeroot support.
2026-03-15 15:24:24 +03:00

60 lines
1.4 KiB
Go

package main
import (
"log"
"os"
"zsvo/cmd"
"zsvo/pkg/i18n"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "zsvo",
Short: "A simple source-based package manager",
SilenceErrors: false,
SilenceUsage: true,
Long: `A minimal package manager for custom Linux distributions based on LFS
Available commands:
build Build a package from recipe
install Install package(s) from local files or auto-build by name
upgrade Upgrade package(s) from package files
remove Remove installed package(s)
list List installed packages
info Show package information
doctor Check system for potential issues
cache Manage build cache
search Search for packages in Debian repositories
lang Set or display interface language
help Show help for a command
`,
}
func init() {
// Register all commands
rootCmd.AddCommand(cmd.BuildCmd)
rootCmd.AddCommand(cmd.InstallCmd)
rootCmd.AddCommand(cmd.UpgradeCmd)
rootCmd.AddCommand(cmd.RemoveCmd)
rootCmd.AddCommand(cmd.ListCmd)
rootCmd.AddCommand(cmd.InfoCmd)
rootCmd.AddCommand(cmd.DoctorCmd)
rootCmd.AddCommand(cmd.CacheCmd)
rootCmd.AddCommand(cmd.SearchCmd)
rootCmd.AddCommand(cmd.LangCmd)
}
func main() {
// Detect language from environment
i18n.DetectLanguage()
// Set up logging
log.SetFlags(log.LstdFlags | log.Lshortfile)
if err := rootCmd.Execute(); err != nil {
log.Printf("Error: %v", err)
os.Exit(1)
}
}