GUP (Go Update) is a command-line tool developed in Go that uses Bubble Tea and Cobra to automate common maintenance tasks on Ubuntu servers.
- Interactive Interface: Uses Bubble Tea for a modern and attractive user experience
- Structured Commands: Implemented with Cobra for robust command and argument handling
- Minimal Dependencies: Designed to use as few dependencies as possible
- Standalone Binary: Generates an independent executable binary
- Multilingual (i18n): Full support for Spanish and English, with automatic system language detection
- Go 1.21 or higher
- Ubuntu system (for maintenance functions)
- Administrator permissions (sudo) for system commands
# Clone the repository
git clone https://github.com/hartlink/gup.git
cd gup
# Download dependencies
go mod tidy
# Compile the binary
make build
# Or compile directly with Go
go build -o gup main.goAfter compilation, you can deploy the binary to your Ubuntu server:
# Copy the binary to your server
scp build/gup user@your-server:/tmp/
# On the server, move it to a system path
ssh user@your-server
sudo mv /tmp/gup /usr/local/bin/
sudo chmod +x /usr/local/bin/gup
# Verify installation
gup versionAlternatively, compile directly on the server:
# On the server
git clone https://github.com/hartlink/gup.git
cd gup
make build
sudo cp build/gup /usr/local/bin/Updates the system package list by running apt update.
gup updateUpgrades all installed packages to their latest versions. Automatically runs apt update first.
gup upgradeInstalls one or more packages. Automatically runs apt update first.
gup install <package1> [package2] [...]
# Example
gup install nginx postgresqlNote: All commands will use
sudoautomatically if needed.
Options:
-v, --verbose: Shows detailed information during execution-l, --lang: Select language (es/en)
GUP automatically detects your system language, but you can change it manually:
# Spanish
gup --lang es
# English
gup --lang en
# Applicable to any command
gup version --lang es
gup update --lang enFor more information about the translation system, see docs/i18n.md.
You can set your preferred language permanently:
# Create configuration file
mkdir -p ~/.gup
echo '{"language":"en"}' > ~/.gup/config.jsonSee more options in docs/config.md.
# Update package list
gup update
# Upgrade all packages
gup upgrade
# Install specific packages
gup install nginx
gup install postgresql redis-server
# Update with detailed output
gup update --verbose
# View help
gup --help
gup update --helpcli_go/
├── main.go # Main entry point
├── cmd/ # Cobra commands
│ ├── root.go # Root command
│ ├── update.go # Update command
│ ├── upgrade.go # Upgrade command
│ ├── install.go # Install command
│ ├── demo.go # Demo command
│ └── version.go # Version command
├── internal/ # Internal application code
│ ├── ui.go # Bubble Tea interface
│ ├── apt/ # APT package management
│ │ └── apt.go # Update/Upgrade/Install logic
│ ├── i18n/ # Internationalization system
│ │ └── i18n.go # ES/EN translations
│ └── config/ # Configuration system
│ └── config.go # Config management
├── docs/ # Documentation
│ ├── i18n.md # Internationalization guide
│ └── config.md # Configuration guide
├── build/ # Compiled binary
│ └── gup # Executable
├── go.mod # Go module
├── go.sum # Dependencies checksums
├── Makefile # Build commands
├── .gitignore # Ignored files
├── README.md # This file (English)
└── README_ES.md # Spanish version
# Compile
make build
# Clean binaries
make clean
# Run in development mode
make dev
# Install dependencies
make deps- Create a new file in
cmd/(e.g.,cmd/upgrade.go) - Implement the command using Cobra
- Use the Bubble Tea interface from
internal/ui.go - Register the command in
cmd/root.go
-
gup upgrade- Upgrade system packages -
gup install- Install packages -
gup cleanup- Clean unnecessary packages -
gup status- Show system status -
gup logs- View system logs -
gup services- Manage systemd services - Customizable configuration
- Advanced logging
- Unit tests
This project is available in:
Contributions are welcome. Please:
- Fork the project
- Create a branch for your feature (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
This project is licensed under the GPLv3. See the LICENSE file for more details.
- Root Permissions: Many commands require administrator permissions
- Compatibility: Designed specifically for Ubuntu/Debian systems
- Responsible Use: Always review commands before running them in production