Skip to main content

UniGo: A fast, flexible, and enterprise-grade Golang CLI template

Project description

UniGo

CI Pipeline CD Pipeline GitHub Pages CodeQL Multi-OS Verified Security Audit SBOM Available License: MIT Release Dependabot Enabled pre-commit GitHub Stars GitHub Issues Code Size

English | 简体中文

UniGo is a fast, flexible, and enterprise-grade Golang CLI template inspired by UniRTM and helloworld. It provides a robust foundation for building modern command-line applications in Go, featuring beautiful terminal output, structured logging, built-in caching, and a comprehensive CI/CD pipeline.

🌟 Features

  • Modern CLI Architecture: Built with Go 1.24+ and Cobra, providing a structured and extensible command-line application framework.
  • Beautiful Output: Utilizes pterm for rich, colorful, and interactive terminal output.
  • Structured Logging: Built-in support for Go's standard slog package for high-performance structured logging.
  • Robust Tooling: Includes built-in commands like doctor, self-update, cache, config, and license.
  • Triple Guarantee Quality: 100% code purity enforced through IDE checks, Pre-commit hooks, and GitHub Actions integrated quality gates.
  • Cross-Platform Ready: Runs seamlessly on macOS, Linux, and Windows.

🏗️ Architecture & Design

Overview

UniGo is engineered to solve the boilerplate problem when starting new Go CLI projects. It standardizes the development environment, architectural patterns, and automation pipelines out of the box.

Core Components

  • CLI Framework: Utilizes spf13/cobra and spf13/viper for powerful command parsing and configuration management.
  • UI & Logging: Integrated pterm for UI components and slog for structured event logging.
  • Database & Caching: SQLite-backed (via modernc.org/sqlite) local caching and transactional data storage.
  • Task Orchestration: Configured with UniRTM for managing local development workflows (lint, test, verify).

📖 Usage Guide

Prerequisites

  • Runtime: Go (>= 1.24).
  • Git: Global git installation required.
  • UniRTM: Required for task execution and orchestration.

Installation

Via NPM:

npm install -g @snowdreamtech/unigo

Via PyPI:

pip install snowdreamtech-unigo

Quick Start

  1. Install UniRTM: Ensure unirtm is installed on your system.
  2. Initialize: unirtm run setup (bootstraps core dependencies and hooks).
  3. Install: unirtm run install (installs project dependencies).
  4. Verify: unirtm run verify (ensures everything is green).
  5. Build: go build -o unigo main.go

Available Commands

  • unigo version: Print the version number
  • unigo doctor: Check system health and diagnose issues
  • unigo self-update: Update to the latest version
  • unigo cache: Manage local cache
  • unigo config: Manage configuration
  • unigo license: Manage copyright license headers

🛠️ Operations Guide

Pre-deployment Checklist

  1. Run unirtm run verify to ensure all quality gates are green (runs formatters, linters, tests, and security audits).
  2. Ensure CHANGELOG.md is updated.

Troubleshooting

  • Problem: unirtm run verify fails with test errors.
    • Solution: Ensure your code passes all Go unit tests. UniGo enforces strict coverage and race condition checks.
  • Problem: Pre-commit hooks fail.
    • Solution: The hooks often auto-fix issues (like formatting). Stage the modified files and commit again.

🔒 Security Considerations

Security Model

  • Audit Logging: All critical operations and security scans are executed during the verify task using tools like trivy, gitleaks, and govulncheck.
  • Dependency Management: Powered by Dependabot to ensure all dependencies are kept up-to-date and secure.

🧑‍💻 Development Guide

Local Development Setup

git clone https://github.com/snowdreamtech/UniGo.git
cd UniGo
unirtm run setup
unirtm run install

🚀 Proxy Usage Scenarios

The GITHUB_PROXY (default: https://gh-proxy.sn0wdr1am.com/) is optimized for specific network acceleration scenarios. Misusing it for unsupported protocols (like Git) will result in errors.

Scenario Supported? Example / Note
Release Files ✅ Yes .../releases/download/v1.0/tool.zip
Source Archives ✅ Yes .../archive/master.zip or .tar.gz
Direct File Links ✅ Yes .../blob/master/filename
Git Clone No Do not use for git clone or insteadOf configs.
Project Folders No Browsing/cloning via proxy is not supported.

[!IMPORTANT] To prevent breaking toolchains (like unirtm), this template explicitly disables Git redirection via this proxy. Use it only for direct HTTP downloads in scripts.

📄 License

This project is licensed under the MIT License. Copyright (c) 2026-present SnowdreamTech Inc. See the LICENSE file for the full license text.

Star History

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

snowdreamtech_unigo-0.0.7-py3-none-win_arm64.whl (11.0 MB view details)

Uploaded Python 3Windows ARM64

snowdreamtech_unigo-0.0.7-py3-none-win_amd64.whl (11.5 MB view details)

Uploaded Python 3Windows x86-64

snowdreamtech_unigo-0.0.7-py3-none-win32.whl (11.3 MB view details)

Uploaded Python 3Windows x86

snowdreamtech_unigo-0.0.7-py3-none-macosx_11_0_arm64.whl (5.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

snowdreamtech_unigo-0.0.7-py3-none-macosx_10_9_x86_64.whl (5.8 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 3c35423ffa6321a002493a6da7572cf115903a1a8e1f331e596d44f8e07dcd28
MD5 cdbe1cfa2eeafe0d5f5ab0f462011a80
BLAKE2b-256 cd3bda18454d16491492e3372aa3581ae864f6c148aabf162b04c060cb20863e

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 19b0aa7d8d61f5a5b2f40263eb503265b954086b10c19a1ec010ac2aefe6c13e
MD5 6dbbbd4647385f9f609840bce8c98709
BLAKE2b-256 98dfa80f7a7720c4d3c4814185f3376739a4d9b3f81e6c1ebc40218a2b01ebdb

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-win32.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-win32.whl
Algorithm Hash digest
SHA256 fc23384ec73463ec0b1a51876e384537ee5d587ad67acedd583c77edfa19f431
MD5 2f062a8460811971b61c472b8663d71c
BLAKE2b-256 2179e57781068b7ac63bf8208f3f829fa0927cbb75a97ff318702b3d02d76262

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0914fa6731fcecb7405156bacb3b6d0aaadfe68ddbfc6d58009172b0412f88cb
MD5 dc2c9af28ff8648df56859a4f2755587
BLAKE2b-256 d79530b21bb8cf7a00baf8f7f20b6c589a88aaa9bf83e80e8b86707e8ac086ed

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 6d7ec63e7064c49e3b7317d1eee2368dce6e1a900510ca53e9f4412aa69f9536
MD5 06baff7f1af1ee2105e147e91edfcc35
BLAKE2b-256 44b38e4051f3c73e0910310f702be49c6daa9a0999f3dded05419c4cdbd44cee

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 eba47fcbb428c065414b786f47e450b6e866ead92899476ea1bc1bf851700bb6
MD5 94f1963d7fd08f9ba7b48d836f32e273
BLAKE2b-256 ea4f819b93f059f0256c1c1ca862c2284a46e76b865fc2c009e9abe4841f2a92

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_i686.whl
Algorithm Hash digest
SHA256 17a90a5b881b1fdaff71382f330729a6f8b5b1d3b9d908c31d2010bb2ad0fc83
MD5 8a3ad3ffa954dfcda9ad1fa659ed6125
BLAKE2b-256 9b1a456321289071bbedcf90a6847af2d00c84953b0fc404301142ef939200e4

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8b7fa0f3dfd4557aab9682c157d0752f8b5efc6fd52354d1e86abcd178566dc3
MD5 75281bde56791da899532be3e04aec6b
BLAKE2b-256 8635c619e31d7a29c66d4e7c310dea4d10c8a7a83f0072b282a465588705e236

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a75ed25e4570a64a446fdd52b8bd4c1aec08fdc7cbef537de0a8a4653ad1c1e1
MD5 b9341e40529db5b43c5a322d13c3c8aa
BLAKE2b-256 9b7da07879952590071d2da3feb525cc14a6488be9be6c1c16f745d03aafa309

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 02a62616a3b9b30ebb335ddcece141da277576466087a8053c73c5020c939c41
MD5 8f4c5dd960205b51da76cf4da01110a0
BLAKE2b-256 48f2c5cfc60f2e253fa323a4f2bf46d71e8e0ab699776ca8a453bff8c70db5d0

See more details on using hashes here.

File details

Details for the file snowdreamtech_unigo-0.0.7-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.7-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 df82aa5e09d55748798cbf980a382809138430f37894473dfdcbf531deec70af
MD5 f7944e12df7bf1f39f0c4396ddfefeee
BLAKE2b-256 501e5bbad805d2cad4658b95361b241d46e94b91c73acba22db5e1d9018fc304

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page