gentleman-system

Detect host OS and provide structured system information for installer workflows.

1.9k|282|Updated Nov 19, 2023
One-click install
npx skills add https://github.com/Gentleman-Programming/Gentleman.Dots --skill gentleman-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gentleman-system
Source: https://github.com/Gentleman-Programming/Gentleman.Dots/tree/main/skills/gentleman-system
Command: npx skills add https://github.com/Gentleman-Programming/Gentleman.Dots --skill gentleman-system

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps automation engineers quickly detect the host OS and encapsulate environment details to drive consistent installer pipelines.

Core Features & Use Cases

  • OS detection across macOS, Linux (Arch, Debian-based), and Termux environments.
  • Structured SystemInfo output (OS, OSName, IsWSL, IsTermux, HomeDir, HasBrew, Prefix, etc.).
  • Command execution helpers for common package managers (brew, apt/pacman, pkg) and sudo where needed.

Quick Start

Install or integrate the gentleman-system skill into your installer flow to enable automatic OS detection and command routing.

Frequently Asked Questions about gentleman-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect the host OS for cross-platform installer automation in Golang?

Host OS detection for cross-platform installer automation is handled by identifying the operating system and returning structured SystemInfo fields. This mechanism recognizes macOS, Linux variants like Arch and Debian, and Termux on Android to drive consistent installation workflows.

What structured system information is needed to automate cross-platform installation workflows?

Automating cross-platform installation workflows requires structured system information including OS, OSName, IsWSL, IsTermux, HomeDir, HasBrew, and Prefix. These fields encapsulate environment details to route commands accurately across diverse operating systems.

Can I use Golang to automate package manager commands across macOS, Linux, and Termux?

You can automate package manager commands across macOS, Linux, and Termux using built-in execution helpers. The system provides structured command wrappers for brew, apt, pacman, pkg, and sudo to ensure correct privilege escalation and package installation.

Does cross-platform OS detection support WSL and Termux on Android environments?

Cross-platform OS detection explicitly supports WSL and Termux on Android environments. The detection priority logic identifies these specific subsystems alongside standard macOS, Arch, and Debian-based Linux distributions to provide accurate runtime environment details.

What is the best way to route sudo and package manager commands for system provisioning?

The best way to route sudo and package manager commands for system provisioning is to use structured execution helpers that detect the host OS first. This approach automatically maps the target system to the correct package manager like brew, apt, pacman, or pkg.

Why does my automated installer fail to detect Termux or Arch Linux environments?

Automated installers fail to detect Termux or Arch Linux environments when they lack a structured OS detection priority system. Implementing dedicated system detection logic ensures these specific environments are correctly identified before routing package manager commands.