Skip to content

thineshsubramani/syslite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

syslite

Minimal system information extractor written in Go. (Trying my best to keep this lightweight) Currently supports only YAML config-based execution.

echo "You love Bash commands or script..."
echo "Until you need 20 system infos, YAML configs and env injection."
echo "Copy-pasting the same mess across repos makes you question your life."

Features

  • Extracts system data (based on configured fields)

  • Supports flexible output rendering

    • File output (path)
    • Console output (stdout)
  • Easily extendable


Directory Structure

syslite/
├── config/     # YAML config loader
├── extract/    # Extract system data
├── outputs/    # Output renderer
└── main.go     # Entry point

Sample config.yaml

extract:
  - hostname
  - os
  - distro

output:
  formats:
    json:
      path: "out/system.json"
      stdout: true

Run It

Step 1: Auto-inject env vars (Your binary)

- name: Inject sys info
  run: |
    ./syslite  # injects into $GITHUB_ENV

Step 2: Use injected vars

- name: Use kernel info
  run: |
    echo "Kernel version: $KERNEL_VERSION"
    if [[ "$KERNEL_MAJOR" == "6" ]]; then
      echo "Modern Linux Kernel"
    fi

Example of what syslite injects

KERNEL_VERSION=6.8.0-xyz
KERNEL_MAJOR=6
HOSTNAME=ci-runner-07

Boom. Any job after syslite now uses those injected env vars natively. Zero parsing. It can support any workflow (eg.Ansible runtime)


Planned

  • Support CLI flags (e.g., --format, --stdout)
  • Auto-detect config location
  • Extend extractors (CPU, RAM, etc.)

About

A totally overengineered way to get hostname and uname. Parses YAML, writes JSON, injects env vars, all so you don't write 3 lines of Bash..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages