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.8-py3-none-win_arm64.whl (11.0 MB view details)

Uploaded Python 3Windows ARM64

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3Windows x86

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

Uploaded Python 3macOS 11.0+ ARM64

snowdreamtech_unigo-0.0.8-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.8-py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 890d8b0cfbf1f382c053e0a6357fe255d6fafa3f816dca9263a683de7aebfa0b
MD5 02a1155fa829325f1af4527581e71c62
BLAKE2b-256 f2049d4bddcbb5c0d868853f6ae968b02d8a1be10bde477ef815002598005edd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 e0eb14b3e8cdd91a6a3465aa8d8588490f10bb88a189f4b60fbc1716f4932b26
MD5 883cccfd161ce9a061d3cce385f7a96d
BLAKE2b-256 0846c63424992d6e192e49c2ef90d2029acab6e7cabc6c34e1f38b81f101c2d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-win32.whl
Algorithm Hash digest
SHA256 d418d360154d453bef0be9694222d5c94826adc67ff3488295da39399b449f65
MD5 7a7157e8b8517397fdaab405635c3486
BLAKE2b-256 6597ccf804e535119818d68298c7951fa1738511dda77db6c6ac5b044e579072

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4598e958cf5b44c6ed231766b702ec3c2889ddd7a617e11bde9c360968e3512
MD5 c5decadaa7032001dc49cf073773081e
BLAKE2b-256 b99024d15189c80463908ad1915341fe610c19bb6e6bffbfb63efebf617cb550

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 ed53df367d502cee4eafb19f9b820e935369d01be4d9925f0254b89b9ab87914
MD5 21e51db541625494e940f2011c1e9be9
BLAKE2b-256 c3d821e47d9f36ffeaf99d6b278a170b3d82a65bc95ae34a1bb67ebcf758d8c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 23651f8c199fb3147ccabfb920763cb29a4bbc83bcfa655c5d805c8dc869c9f9
MD5 94ebbced36fcca87275d029c3d4a31fa
BLAKE2b-256 9d0c5d9b8c92bffdfa251100534292f3c3f6cff26d36a3ae242027f2bce8de8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b8c53472034a82682e6bdcaeaf5aa22f66142dea2f92d3f8d66ec626096be78c
MD5 9ac95c8184116fadcb67643373cf29d0
BLAKE2b-256 22c070baf9f445f6cd5f82eb04db1e457456cdc2e2f99641fbb8508d50dfac2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b8a75eb5c0690c383babe5aed634a0e19be21cd877e4b4fe607e1130a10ec4ab
MD5 9fe5d1a3f6634d862836bf9b9f85f217
BLAKE2b-256 30ebcd28a28a1587966b5d2831af5dbed8903f89e69b41a3f5b93d5b768e631d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c9ed36b739fca4d3c4311e6298e8b0a8b0dac21e6411ab92c0bebd423afd9e5a
MD5 a812384e2c28c15773e81b8bbb31bb53
BLAKE2b-256 24ba0e002fa443daff6c598b81478e82da844d3fcff39095c4974056ff40bc50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c61787edb24148d9a687639126b9e27acf117ad84276c0f67aef5444d5dc5b94
MD5 80db319dae25b6b91dbe86e98f6a5b5c
BLAKE2b-256 c513d70f1dea2e798b6474df55390007bb87a5febbedb0106ab2e482e3fadcbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for snowdreamtech_unigo-0.0.8-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ddff0dbd7c12dff169111dab809798eaf4665c9259b45112c8b66b4349673724
MD5 898a1674f9d65b5b4c4b888d1940c5dc
BLAKE2b-256 2998700add5f5dde137f32acf120eed7ba24ac40644e96f122fad3dec62348f8

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