Skip to main content

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

Project description

UniStack

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 | 简体中文

UniStack 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

UniStack 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/unistack

Via PyPI:

pip install snowdreamtech-unistack

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 unistack main.go

Available Commands

  • unistack version: Print the version number
  • unistack doctor: Check system health and diagnose issues
  • unistack self-update: Update to the latest version
  • unistack cache: Manage local cache
  • unistack config: Manage configuration
  • unistack 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. UniStack 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/UniStack.git
cd UniStack
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_unistack-0.0.5-py3-none-win_arm64.whl (12.2 MB view details)

Uploaded Python 3Windows ARM64

snowdreamtech_unistack-0.0.5-py3-none-win_amd64.whl (12.7 MB view details)

Uploaded Python 3Windows x86-64

snowdreamtech_unistack-0.0.5-py3-none-win32.whl (12.6 MB view details)

Uploaded Python 3Windows x86

snowdreamtech_unistack-0.0.5-py3-none-macosx_11_0_arm64.whl (6.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

snowdreamtech_unistack-0.0.5-py3-none-macosx_10_9_x86_64.whl (6.4 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-win_arm64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 628e9462265a679e7dbca05351e605cafd8c57aa672b2417a403b2414ae702b4
MD5 23c3f26fc232ce8b96097746840df95f
BLAKE2b-256 8fb6c4176be1e797180e47f4096423ccb3b827e902d16862327399eaab6ae3ac

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 33dd341f04314019fd45f08936b3be6c4601ada20464e55c44ce09329ea4dd67
MD5 23fbde34fc9769a66f223657426f3619
BLAKE2b-256 0f71dd81c14a07263d740d8f6c3fb7739e322974b9b9d57b77a2b174235466ce

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-win32.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-win32.whl
Algorithm Hash digest
SHA256 c2a5a3f96d1fee206bd775dbb76fab28e2cbe3f961ad1c392cb65ae3b50f759a
MD5 648ddd5322ced2bbf9b3688b856a722b
BLAKE2b-256 4a9ff128e0334158e84c897b070701dfea3d6a9166ce529b39de55083f544292

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25164062e391cb8daff5e723a356d982eb6225355010cce23e91518aa6d63b3c
MD5 6bfed1069a5b6c5f595eb10912592efb
BLAKE2b-256 3256d767ae70fb8720e92eceb566c64d92ae84b102c7fbade240853f8c52169a

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d88c38a5a0acff43425db2dca6f674f246a5031f2f7767b6cb04d5b639cda001
MD5 7ce54009b53f22a994e4ed25638fa3f4
BLAKE2b-256 766e564f8bf98a99e8f7e628b9477b578041ea0825efe67ad9fb342c53c11d36

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a192b727f8de6c9552773586072e9171c754bec49983b823e7a094fc123d015e
MD5 2dcced137396afb23ec03a768796bce9
BLAKE2b-256 322e30bf4e51cf1d7abee481d405ed70e23da4ed35a77ba88750d84f1b211a8f

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_i686.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_i686.whl
Algorithm Hash digest
SHA256 83ec36a6013c99bf74e78d59b17281eb6a38c9ddd2f8b0294d48801acf4f56b9
MD5 5fb175a70daf187b5d7c0fada18ae84c
BLAKE2b-256 344e3d2c30eb99fb9758d324515874ce98943ba193dccd41e8552b14a2aa5711

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 ac85b41525b65c15e82a22c02992a8b9b247a86c16366d9df3a781a695f0c35d
MD5 7430b384125c35ca6d647b37c1de66ed
BLAKE2b-256 ae2b293b08ea55facc5e178ffb3bc4845c492edfe6a27de3e50d968c917dfb6e

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0bd457d4dec31f0033a38c6c792cc8a73d9c56d3725e92320be9ab549c6d8889
MD5 ee20626811f4dbaf83f2f760feb13354
BLAKE2b-256 814b3ee41d7967ae95872ed8edeb7ecbe4da83197d597d8055cc5068c19bfeae

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74704c474f36ec5242af6985127684fd81aacbc093c67c9c3efe4bdb8b32cf11
MD5 11663da1d7eac4232d56fdc56ffbe4c3
BLAKE2b-256 49867b5aa9dc5ec4821a0e10eb2df86665fe2808aff76d2ab7fdd5a744f5c899

See more details on using hashes here.

File details

Details for the file snowdreamtech_unistack-0.0.5-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for snowdreamtech_unistack-0.0.5-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1f64cda66250f0dd56a8508c1858235076e76e89194b3fdedf7227bc6f4ca91e
MD5 1dbfff7c2dea07dae2729f4b93308beb
BLAKE2b-256 b109cbf058ec2b1cf13da18ea075156c9b5c20418edf433ff9c967d10af3bddf

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