@snowdreamtech/unirtm-windows-x64 0.0.10 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,225 +1,187 @@
1
- # UniRTM (Universal Runtime Manager)
1
+ <div align="center">
2
2
 
3
- Inspired by [mise](https://github.com/jdx/mise) (licensed under MIT). Special thanks to jdx and the mise community for the great ideas.
3
+ <h1 align="center">
4
+ UniRTM
5
+ </h1>
4
6
 
5
- [![CI Pipeline](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/ci.yml?branch=main&label=CI%20Pipeline)](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
6
- [![CD Pipeline](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/cd.yml?branch=main&label=CD%20Pipeline)](https://github.com/snowdreamtech/template/actions/workflows/cd.yml)
7
- [![GitHub Pages](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/pages.yml?branch=main&label=Docs&logo=github)](https://github.com/snowdreamtech/template/actions/workflows/pages.yml)
8
- [![CodeQL](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/codeql.yml?branch=main&label=CodeQL&logo=github)](https://github.com/snowdreamtech/template/actions/workflows/codeql.yml)
9
- [![Multi-OS Verified](https://img.shields.io/badge/Verified-Linux%20%7C%20macOS%20%7C%20Windows-blue)](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
10
- [![Security Audit](https://img.shields.io/badge/Security-Zizmor%20%7C%20Trivy%20%7C%20Gitleaks-brightgreen)](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
11
- [![SBOM Available](https://img.shields.io/badge/SBOM-Available-success)](https://github.com/snowdreamtech/template/releases/latest)
12
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/MIT)
13
- [![Release](https://img.shields.io/github/v/release/snowdreamtech/template?logo=github&sort=semver)](https://github.com/snowdreamtech/template/releases/latest)
14
- [![Dependabot Enabled](https://img.shields.io/badge/Dependabot-Enabled-brightgreen?logo=dependabot)](https://github.com/snowdreamtech/template/blob/main/.github/dependabot.yml)
15
- [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
16
- [![GitHub Stars](https://img.shields.io/github/stars/snowdreamtech/template?style=social)](https://github.com/snowdreamtech/template)
17
- [![GitHub Issues](https://img.shields.io/github/issues/snowdreamtech/template)](https://github.com/snowdreamtech/template/issues)
18
- [![Code Size](https://img.shields.io/github/languages/code-size/snowdreamtech/template)](https://github.com/snowdreamtech/template)
7
+ <p>
8
+ <a href="https://github.com/snowdreamtech/UniRTM/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/snowdreamtech/UniRTM?style=for-the-badge&color=6B7F4E"></a>
9
+ <a href="https://github.com/snowdreamtech/UniRTM/actions/workflows/pages.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/snowdreamtech/UniRTM/pages.yml?style=for-the-badge&color=C5975B"></a>
10
+ </p>
19
11
 
20
- [English](README.md) | [简体中文](README_zh-CN.md)
12
+ <p><b>Dev tools, env vars, and tasks in one CLI with built-in security.</b><br><i>Inspired by and paying tribute to <a href="https://github.com/jdx/mise">mise</a>.</i></p>
21
13
 
22
- An enterprise-grade, foundational template designed for multi-AI IDE collaboration. This repository serves as a **Single Source of Truth** for AI agent rules, workflows, and project configurations, supporting over 50 different AI-assisted IDEs with massive multi-language support.
14
+ <p align="center">
15
+ <a href="https://unirtm.snowdream.tech/guide/getting-started.html">Getting Started</a> •
16
+ <a href="https://unirtm.snowdream.tech">Documentation</a> •
17
+ <a href="https://unirtm.snowdream.tech/dev-tools/overview.html">Dev Tools</a> •
18
+ <a href="https://unirtm.snowdream.tech/environments/overview.html">Environments</a> •
19
+ <a href="https://unirtm.snowdream.tech/tasks/overview.html">Tasks</a>
20
+ </p>
23
21
 
24
- ## 🌟 Features
22
+ <hr />
25
23
 
26
- - **Multi-IDE Compatibility**: Out-of-the-box support for Cursor, Windsurf, GitHub Copilot, Cline, Roo Code, Trae, Gemini, Claude Code, and 50+ other AI editors.
27
- - **Unified Rule System**: Centralized rule definitions in `.agent/rules/`. Changes propagate automatically to all supported IDEs via a secure symlink/redirect pattern.
28
- - **80+ Language & Framework Rules**: Pre-configured high-quality rules from Rust, Go, TypeScript, Python to Ansible, Kubernetes, and API design.
29
- - **Smart Workflows (SpecKit)**: Standardized `.agent/workflows/` commands (`speckit.plan`, `speckit.analyze`, `snowdreamtech.init`) that behave consistently across all supported environments.
30
- - **Triple Guarantee Quality**: 100% code purity enforced through Pre-commit and GitHub Actions integrated quality gates.
31
- - **Cross-Platform Ready**: Runs seamlessly on macOS (Homebrew/MacPorts), Linux, and Windows.
24
+ </div>
32
25
 
33
- ## 🏗️ Section 1 — Design & Architecture
26
+ > [!TIP]
27
+ > UniRTM introduces native SBOM generation and security scanning via Trivy & Syft directly into your dev tools installation flow!
34
28
 
35
- ### Overview
29
+ ## What is it?
36
30
 
37
- The Snowdream Tech Template is a foundational scaffold engineered to solve the "N-IDE Fragmentation" problem. It standardizes the development environment, AI agent rules, and automation pipelines across varied platforms and languages.
31
+ `UniRTM` (Universal Runtime Manager) prepares your development environment before each command runs. It keeps project tools, environment variables, and tasks in one `.unirtm.toml` file so new shells, checkouts, and CI jobs all start from the exact same setup.
38
32
 
39
- **Key Capabilities:**
33
+ - Install and switch between **dev tools** like node, python, go, and more.
34
+ - Load **environment variables** per project directory, including values from `.env` files and secure secret managers like SOPS.
35
+ - Define and run **tasks** for building, testing, linting, and deploying projects.
40
36
 
41
- - Provides a **Unified Rule Engine** that governs AI behavior consistently across 50+ IDEs.
42
- - Enforces **Cross-Platform Portability** through dynamically adapting POSIX shell automation.
43
- - Implements a **Triple Guarantee Quality Gate** (IDE, CLI, CI) to prevent regressions.
44
- - Supports **Massive Multi-Language Stacks** with modular onboarding logic.
37
+ While taking heavy inspiration from the brilliant tool `mise` (dev tools, env vars, and tasks in one CLI), UniRTM introduces several distinct architectural choices:
45
38
 
46
- ### Architecture
39
+ - **Pure Go Engine**: Extreme parallel downloading capabilities leveraging goroutines.
40
+ - **Zero Shims**: UniRTM strictly avoids bash shims. It directly prepends the absolute paths of installed tools to your `$PATH`, ensuring 100% execution speed and transparency for IDEs.
41
+ - **Native Security**: Built-in integration with Trivy and Syft to generate SBOMs and scan for vulnerabilities whenever you install a tool.
42
+ - **Absolute Locking**: Generates a `unirtm.lock` file that pins the exact checksums and versions of your downloaded tools for reproducible environments.
47
43
 
48
- ```mermaid
49
- graph TD
50
- A["Developers & Agents"] -->|Operates via| IDE["Cursor / Windsurf / Copilot / 50+ Others"]
51
- IDE -->|Reads Rules via Redirects| R1[".vscode/"]
52
- IDE -->|Reads Rules via Redirects| R2[".github/"]
53
- IDE -->|Reads Rules via Redirects| R3[".cline/ .trae/ etc."]
44
+ ## Quickstart
54
45
 
55
- R1 -.->|SSoT Pointer| CoreRules[".agent/rules/"]
56
- R2 -.->|SSoT Pointer| CoreRules
57
- R3 -.->|SSoT Pointer| CoreRules
46
+ ### Install UniRTM
58
47
 
59
- CoreRules -->|Governs| Src["Source Code"]
60
- CoreRules -->|Governs| Scripts["CI/CD & Shell Scripts"]
61
- ```
62
-
63
- ### Design Principles
64
-
65
- - **Single Source of Truth (SSoT)**: All AI rules, commands, and Git hooks live in one place. No duplicated IDE configurations.
66
- - **Cross-Platform Portability**: Heavy automation logic is written in POSIX Shell, with thin wrappers for Windows PowerShell/Batch.
67
- - **Triple Guarantee Quality**: Linting and formatting form an impenetrable wall, enforced at the IDE layer, pre-commit layer, and CI/CD GitHub Actions layer.
68
-
69
- ### Responsibilities
70
-
71
- - **.agent/rules/**: Owns the definitive behavioral logic for AI agents across all supported languages.
72
- - **scripts/**: Owns the cross-platform automation and lifecycle logic.
73
- - **.agent/workflows/**: Owns the interactive AI commands (SpecKit).
74
-
75
- ---
76
-
77
- ## 📖 Section 2 — Usage Guide
78
-
79
- ### Prerequisites
80
-
81
- - **Runtime**: Node.js (>= 20.x), Python (>= 3.10.x).
82
- - **Git**: Global git installation required.
83
-
84
- ### Quick Start
85
-
86
- 1. **Initialize & Install**: `unirtm install` (installs all project tools and dependencies).
87
- 2. **Verify**: `make verify` (ensures everything is green).
88
-
89
- ### Configuration Reference
90
-
91
- | Parameter | Purpose | Location |
92
- | :------------- | :---------------------------------------------------------------- | :---------------------- |
93
- | `PROJECT_NAME` | Project identity | `init-project.sh` |
94
- | `GITHUB_PROXY` | Network optimization (See [Proxy Usage](#-proxy-usage-scenarios)) | `.unirtm.toml` |
95
- | `VERSION` | Semantic versioning | `package.json` |
96
-
97
- ### File Structure
48
+ See [Getting started](https://unirtm.snowdream.tech/guide/getting-started.html) for more options.
98
49
 
99
- ```text
100
- project-root/
101
- ├── .agent/ # 🤖 Canonical AI configuration (The Brain)
102
- │ ├── rules/ # 📏 Unified AI behavioral rules (80+ sets, SSoT)
103
- │ └── workflows/ # 🛠️ Unified commands & AI workflows (SpecKit)
104
- ├── .agents/ # 🧩 Shared command sources (Auto-managed symlinks)
105
- ├── .github/ # 🐙 GitHub integration & Copilot settings
106
- ├── .vscode/ # 💻 Optimized VS Code configurations
107
- └── src/ # 📦 Your actual application source code
50
+ ```sh-session
51
+ $ curl -sL https://raw.githubusercontent.com/snowdreamtech/UniRTM/main/install.sh | bash
52
+ $ ~/.local/bin/unirtm --version
53
+ UniRTM v0.1.0 macos-arm64 (2026-05-28)
108
54
  ```
109
55
 
110
- ---
56
+ Hook UniRTM into your shell (pick the right one for your shell):
111
57
 
112
- ## 🛠️ Section 3 — Operations Guide
113
-
114
- ### Pre-deployment Checklist
115
-
116
- 1. Run `make verify` to ensure all quality gates are green.
117
- 2. Run `make audit` to verify security compliance.
118
- 3. Ensure `CHANGELOG.md` is updated.
119
-
120
- ### Performance Considerations
121
-
122
- - **Linting Speed**: Pre-commit hooks target < 5s by scanning staged files only.
123
- - **CI Throughput**: GitHub Actions use matrix builds for parallel testing across OS types.
124
-
125
- ### Troubleshooting
58
+ ```sh-session
59
+ # note this assumes unirtm is located at ~/.local/bin/unirtm
60
+ echo 'eval "$(~/.local/bin/unirtm env)"' >> ~/.bashrc
61
+ echo 'eval "$(~/.local/bin/unirtm env)"' >> ~/.zshrc
62
+ echo '~/.local/bin/unirtm env | source' >> ~/.config/fish/config.fish
63
+ ```
126
64
 
127
- - **Problem**: `unirtm install` fails on Windows.
128
- - **Diagnosis**: Check if `ExecutionPolicy` allows script execution.
129
- - **Solution**: Run `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass`.
130
- - **Problem**: Gitleaks detects false positives.
131
- - **Diagnosis**: Check `.gitleaks.toml` allowlist.
132
- - **Solution**: Add fingerprint to `.gitleaksignore`.
133
- - **Problem**: Pre-commit hooks fail on macOS after `unirtm install` with Python errors.
134
- - **Diagnosis**: Check if the venv exists: `ls .venv/bin/python`.
135
- - **Solution**: Rebuild the venv: `rm -rf .venv && unirtm install`.
65
+ ### Execute commands with specific tools
136
66
 
137
- ---
67
+ ```sh-session
68
+ $ unirtm exec node@20 -- node -v
69
+ unirtm node@20.x.x ✓ installed
70
+ v20.x.x
71
+ ```
138
72
 
139
- ## 🔒 Section 4 — Security Considerations
73
+ ### Install tools
140
74
 
141
- ### Security Model
75
+ ```sh-session
76
+ $ unirtm use --global node@22 go@1.22
77
+ $ node -v
78
+ v22.x.x
79
+ $ go version
80
+ go version go1.22.x macos/arm64
81
+ ```
142
82
 
143
- - **Secret Management**: All secrets must be injected via environment variables or handled by HashiCorp Vault. Never commit `.env` files.
144
- - **Audit Logging**: All critical operations (commits, releases, state changes) are traced via Git and CI logs.
145
- - **Supply Chain**: All CI actions are pinned to exact versions/SHAs.
83
+ See [dev tools](https://unirtm.snowdream.tech/dev-tools/) for more examples.
146
84
 
147
- ### Best Practices
85
+ ### Manage environment variables
148
86
 
149
- | Aspect | Requirement | Implementation |
150
- | :---------- | :--------------------------- | :-------------------------------- |
151
- | Secrets | No plaintext secrets in repo | `gitleaks` enforced at commit |
152
- | Integrity | Verify downloads | SHA-256 validation in `common.sh` |
153
- | Permissions | Non-root execution | Dockerfile best practices |
87
+ ```toml
88
+ # .unirtm.toml
89
+ [env]
90
+ SOME_VAR = "foo"
91
+ ```
154
92
 
155
- ---
93
+ ```sh-session
94
+ $ unirtm set SOME_VAR=bar
95
+ $ echo $SOME_VAR
96
+ bar
97
+ ```
156
98
 
157
- ## 🧑‍💻 Section 5 Development Guide
99
+ Note that `UniRTM` can also [load `.env` files](https://unirtm.snowdream.tech/environments/#env-directives).
158
100
 
159
- ### Code Organization
101
+ ### Run tasks
160
102
 
161
- ```text
162
- project-root/
163
- ├── .agent/ # AI configuration (Single Source of Truth)
164
- │ ├── rules/ # 88 behavioral rule files for AI agents
165
- │ └── workflows/ # SpecKit slash-command definitions
166
- ├── .github/ # GitHub ecosystem (Actions, templates, Dependabot)
167
- │ └── workflows/ # CI/CD pipelines (lint, verify, release, security)
168
- ├── .devcontainer/ # DevContainer configuration for reproducible environments
169
- ├── docs/ # Project documentation
170
- │ ├── adr/ # Architecture Decision Records
171
- │ ├── runbooks/ # Operations and recovery runbooks
172
- │ └── glossary.md # Bilingual term glossary
173
- ├── scripts/ # POSIX shell automation (setup, install, verify)
174
- │ └── lib/ # Shared shell library functions
175
- └── Makefile # Task orchestration (setup, install, lint, verify, audit)
103
+ ```toml
104
+ # .unirtm.toml
105
+ [tasks.build]
106
+ description = "build the project"
107
+ run = "echo building..."
176
108
  ```
177
109
 
178
- **Naming Conventions**: Rule files use `NN-kebab-case.md` (core rules) or `technology.md`
179
- (language stacks). Workflow files use `namespace.verb.md`. Shell scripts use `kebab-case.sh`.
180
-
181
- ### Extension Points
110
+ ```sh-session
111
+ $ unirtm run build
112
+ building...
113
+ ```
182
114
 
183
- 1. **Adding Rules**: Create a new `.md` file in `.agent/rules/` and link it in `00-index.md`.
184
- 2. **Adding Commands**: Add `.md` files to `.agent/workflows/`.
185
- 3. **Adding IDE Support**: Create a redirect folder (e.g., `.myide/`) following the symlink pattern in Rule 03.
115
+ See [tasks](https://unirtm.snowdream.tech/tasks/) for more information.
116
+
117
+ ### Example UniRTM project
118
+
119
+ Here is a combined example to give you an idea of how you can use UniRTM to manage your a project's tools, environment, and tasks with security baked in.
120
+
121
+ ```toml
122
+ # .unirtm.toml
123
+ [tools]
124
+ terraform = "1"
125
+ aws-cli = "2"
126
+ node = "20"
127
+
128
+ [env]
129
+ TF_WORKSPACE = "development"
130
+ AWS_REGION = "us-west-2"
131
+ NODE_ENV = "production"
132
+
133
+ [tasks.plan]
134
+ description = "Run terraform plan with configured workspace"
135
+ run = """
136
+ terraform init
137
+ terraform workspace select $TF_WORKSPACE
138
+ terraform plan
139
+ """
140
+
141
+ [tasks.validate]
142
+ description = "Validate AWS credentials and terraform config"
143
+ run = """
144
+ aws sts get-caller-identity
145
+ terraform validate
146
+ """
147
+
148
+ [tasks.audit]
149
+ description = "Run deep security scans using Trivy and Gitleaks"
150
+ run = """
151
+ trivy fs --format cyclonedx --output sbom.json .
152
+ gitleaks detect --source . --no-banner
153
+ """
154
+
155
+ [tasks.deploy]
156
+ description = "Deploy infrastructure after validation and audit"
157
+ depends = ["validate", "audit", "plan"]
158
+ run = "terraform apply -auto-approve"
159
+ ```
186
160
 
187
- ### Local Development Setup
161
+ Run it with:
188
162
 
189
- ```bash
190
- git clone <repo>
191
- cd <repo>
192
- git config core.ignorecase false # MANDATORY for Mac/Windows
193
- unirtm install
163
+ ```sh-session
164
+ unirtm install # install tools specified in .unirtm.toml with automatic SBOM generation
165
+ unirtm run deploy # automatically runs validation and audit dependencies first
194
166
  ```
195
167
 
196
- ### References
197
-
198
- - [Full Documentation](docs/index.md)
199
- - [Project Glossary](docs/glossary.md)
200
- - [Conventional Commits](https://www.conventionalcommits.org/)
168
+ ## Full Documentation
201
169
 
202
- ### 🚀 Proxy Usage Scenarios
170
+ See [unirtm.snowdream.tech](https://unirtm.snowdream.tech)
203
171
 
204
- 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.
172
+ ## GitHub Issues & Discussions
205
173
 
206
- | Scenario | Supported? | Example / Note |
207
- | :-------------------- | :--------- | :----------------------------------------------------- |
208
- | **Release Files** | ✅ Yes | `.../releases/download/v1.0/tool.zip` |
209
- | **Source Archives** | ✅ Yes | `.../archive/master.zip` or `.tar.gz` |
210
- | **Direct File Links** | ✅ Yes | `.../blob/master/filename` |
211
- | **Git Clone** | ❌ **No** | Do **not** use for `git clone` or `insteadOf` configs. |
212
- | **Project Folders** | ❌ **No** | Browsing/cloning via proxy is not supported. |
174
+ For feature requests, bug reports, and community support:
213
175
 
214
- > [!IMPORTANT]
215
- > To prevent breaking toolchains (like `mise` or `asdf`), this template explicitly disables Git redirection via this proxy. Use it only for direct HTTP downloads in scripts.
176
+ - [Discussions](https://github.com/snowdreamtech/UniRTM/discussions)
177
+ - [Issues](https://github.com/snowdreamtech/UniRTM/issues)
216
178
 
217
- ## 📄 License
179
+ ## Special Thanks
218
180
 
219
- This project is licensed under the **MIT License**.
220
- Copyright (c) 2026-present [SnowdreamTech Inc.](https://github.com/snowdreamtech)
221
- See the [LICENSE](./LICENSE) file for the full license text.
181
+ <p>
182
+ Inspired by the architecture and developer experience pioneered by <a href="https://github.com/jdx/mise">mise</a>.
183
+ </p>
222
184
 
223
- ## Star History
185
+ ## License
224
186
 
225
- [![Star History Chart](https://api.star-history.com/image?repos=snowdreamtech/template&type=date&legend=top-left)](https://www.star-history.com/?repos=snowdreamtech%2Ftemplate&type=date&legend=top-left)
187
+ MIT License. Copyright (c) 2026-present SnowdreamTech Inc.
package/README_zh-CN.md CHANGED
@@ -1,228 +1,187 @@
1
- # UniRTM (Universal Runtime Manager)
1
+ <div align="center">
2
2
 
3
- [mise](https://github.com/jdx/mise) 启发(采用 MIT 协议)。特别感谢 jdx 和 mise 社区提供的优秀创意。
3
+ <h1 align="center">
4
+ UniRTM
5
+ </h1>
4
6
 
5
- [![CI 流水线](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/ci.yml?branch=main&label=CI%20Pipeline)](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
6
- [![CD 自动化发布](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/cd.yml?branch=main&label=CD%20Pipeline)](https://github.com/snowdreamtech/template/actions/workflows/cd.yml)
7
- [![文档站点](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/pages.yml?branch=main&label=%E6%96%87%E6%A1%A3&logo=github)](https://github.com/snowdreamtech/template/actions/workflows/pages.yml)
8
- [![CodeQL 审计](https://img.shields.io/github/actions/workflow/status/snowdreamtech/template/codeql.yml?branch=main&label=CodeQL&logo=github)](https://github.com/snowdreamtech/template/actions/workflows/codeql.yml)
9
- [![跨平台验证](https://img.shields.io/badge/Verified-Linux%20%7C%20macOS%20%7C%20Windows-blue)](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
10
- [![安全审计](https://img.shields.io/badge/Security-Zizmor%20%7C%20Trivy%20%7C%20Gitleaks-brightgreen)](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
11
- [![SBOM 背书](https://img.shields.io/badge/SBOM-Available-success)](https://github.com/snowdreamtech/template/releases/latest)
12
- [![许可证: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/license/MIT)
13
- [![最新发布](https://img.shields.io/github/v/release/snowdreamtech/template?logo=github&sort=semver)](https://github.com/snowdreamtech/template/releases/latest)
14
- [![Dependabot 已启用](https://img.shields.io/badge/Dependabot-Enabled-brightgreen?logo=dependabot)](https://github.com/snowdreamtech/template/blob/main/.github/dependabot.yml)
15
- [![pre-commit 已启用](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
16
- [![GitHub Stars](https://img.shields.io/github/stars/snowdreamtech/template?style=social)](https://github.com/snowdreamtech/template)
17
- [![GitHub Issues](https://img.shields.io/github/issues/snowdreamtech/template)](https://github.com/snowdreamtech/template/issues)
18
- [![代码规模](https://img.shields.io/github/languages/code-size/snowdreamtech/template)](https://github.com/snowdreamtech/template)
7
+ <p>
8
+ <a href="https://github.com/snowdreamtech/UniRTM/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/snowdreamtech/UniRTM?style=for-the-badge&color=6B7F4E"></a>
9
+ <a href="https://github.com/snowdreamtech/UniRTM/actions/workflows/pages.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/snowdreamtech/UniRTM/pages.yml?style=for-the-badge&color=C5975B"></a>
10
+ </p>
19
11
 
20
- [English](README.md) | [简体中文](README_zh-CN.md)
12
+ <p><b>集开发工具、环境变量和任务管理于一体的 CLI(内置安全扫描)。</b><br><i>灵感来源于出色的 <a href="https://github.com/jdx/mise">mise</a> 项目,在此向其致敬。</i></p>
21
13
 
22
- 一个企业级、为多 AI IDE 协作而设计的基石模板。本项目作为 AI Agent 规则、工作流和项目配置的**单一事实来源 (Single Source of Truth)**,支持超过 50 种不同的 AI 辅助 IDE,并提供海量的多语言支持。
14
+ <p align="center">
15
+ <a href="https://unirtm.snowdream.tech/zh/guide/getting-started.html">快速开始</a> •
16
+ <a href="https://unirtm.snowdream.tech/zh/">官方文档</a> •
17
+ <a href="https://unirtm.snowdream.tech/zh/dev-tools/overview.html">开发工具</a> •
18
+ <a href="https://unirtm.snowdream.tech/zh/environments/overview.html">环境变量</a> •
19
+ <a href="https://unirtm.snowdream.tech/zh/tasks/overview.html">任务系统</a>
20
+ </p>
23
21
 
24
- ## 🌟 特性
22
+ <hr />
25
23
 
26
- - **多 IDE 兼容性**:开箱即用支持 Cursor、Windsurf、GitHub Copilot、Cline、Roo Code、Trae、Gemini、Claude Code 等 50 多种 AI 编辑器。
27
- - **统一规则系统**:在 `.agent/rules/` 中维护中心化规则定义。在此修改规则通过安全的软链接/重定向模式自动传播到所有支持的 IDE。
28
- - **80+ 语言与框架规则**:预配置的高质量规则,涵盖从 Rust、Go、TypeScript、Python 到 Ansible、Kubernetes 和 API 设计等各个领域。
29
- - **智能工作流 (SpecKit)**:标准化的 `.agent/workflows/`(命令),如 `speckit.plan`、`speckit.analyze` 和 `snowdreamtech.init`,在所有支持的环境中保持一致。
30
- - **三重保证质量**:通过 Pre-commit 和 GitHub Actions 集成门禁检查,确保 100% 的代码纯净。
31
- - **跨平台就绪**:在 macOS (Homebrew/MacPorts)、Linux 和 Windows 上无缝运行。
24
+ </div>
32
25
 
33
- ## 🏗️ 第 1 节 — 设计与架构
26
+ > [!TIP]
27
+ > UniRTM 将 SBOM 自动生成与 Trivy/Syft 安全漏洞扫描直接无缝集成到了你的工具安装流程中!
34
28
 
35
- ### 概览 (Overview)
29
+ ## 介绍
36
30
 
37
- Snowdream Tech 模板是一个基础脚手架,专为解决“多重 AI IDE 协作产生的配置碎片化”问题而设计。它在各种平台和语言中标准化了开发环境、AI Agent 规则以及自动化流水线。
31
+ `UniRTM` (Universal Runtime Manager) 能够在每次执行命令前自动准备好你的开发环境。它将项目所需的工具版本、环境变量和常用任务统一集中在 `.unirtm.toml` 文件中进行管理,确保每次打开新终端、切换分支或运行 CI 任务时,环境配置都绝对一致。
38
32
 
39
- **核心能力 (Key Capabilities):**
33
+ - 安装并在诸如 node, python, go 等各类 **开发工具** 之间无缝切换。
34
+ - 基于不同目录加载隔离的 **环境变量**,支持读取 `.env` 以及 SOPS 加密数据。
35
+ - 编写并运行项目的构建、测试、代码检查及部署 **任务**。
40
36
 
41
- - 提供**统一的规则引擎**,跨 50+ IDE 一致地约束 AI 行为。
42
- - 通过动态适配的 POSIX Shell 自动化脚本,强制保证**跨平台便携性**。
43
- - 实施**三重保证质量门禁**(IDE、CLI、CI),严防代码劣化。
44
- - 支持**大规模多语言技术栈**,并配备模块化的加载逻辑。
37
+ 虽然在概念上我们深受伟大的 `mise` 启发(在此致敬),但 UniRTM 在架构上引入了几个独特的选择:
45
38
 
46
- ### 架构 (Architecture)
39
+ - **纯 Go 引擎**: 底层完全由 Go 语言编写,利用 goroutines 实现了极致的并发下载能力。
40
+ - **无 Shims 垫片**: UniRTM 严格避免使用 Bash 垫片(Shims)。它直接将安装工具的绝对路径前置插入到你的 `$PATH` 变量中,保证了 100% 的执行性能,并对各种 IDE 完全透明。
41
+ - **原生安全检测**: 底层原生集成了 Trivy 和 Syft。当你下载工具时,会自动生成 SBOM 并扫描已知的安全漏洞。
42
+ - **强制版本锁定**: 自动生成 `unirtm.lock` 锁文件,不仅锁定版本号,还精确锁定所有下载包的校验和,从而保障团队环境的绝对可复现。
47
43
 
48
- ```mermaid
49
- graph TD
50
- A["开发者与智能体 (Agents)"] -->|操作| IDE["Cursor / Windsurf / Copilot / 50+ 其它"]
51
- IDE -->|通过重定向读取规则| R1[".vscode/"]
52
- IDE -->|通过重定向读取规则| R2[".github/"]
53
- IDE -->|通过重定向读取规则| R3[".cline/ .trae/ 等等"]
44
+ ## 快速入门
54
45
 
55
- R1 -.->|SSoT 指针| CoreRules[".agent/rules/"]
56
- R2 -.->|SSoT 指针| CoreRules
57
- R3 -.->|SSoT 指针| CoreRules
46
+ ### 安装 UniRTM
58
47
 
59
- CoreRules -->|管理与约束| Src["项目应用源码"]
60
- CoreRules -->|管理与约束| Scripts["CI/CD 与统一自动化脚本"]
61
- ```
62
-
63
- ### 设计原则
64
-
65
- - **唯一事实来源 (SSoT)**: 所有 AI 行为准则、开发脚手架命令和 Git 生态钩子均集中在一处维护,彻底消灭各 IDE 之间的配置孤岛与冗余。
66
- - **跨平台多态性 (Cross-Platform)**: 核心自动化流水线基于原生 POSIX Shell 编写,且强制为 Windows (PowerShell / Batch) 提供对等兼容的轻量级包装层。
67
- - **三重质量护城河 (Triple Guarantee)**: 由 IDE 实时自动修复、Pre-commit 本地强制阻断、以及 CI/CD (GitHub Actions) 远端全量审计,三层联防共同构建 100% 代码纯净度防线。
68
-
69
- ### 职责分工
70
-
71
- - **.agent/rules/**: 拥有跨所有支持语言的 AI Agent 权威行为逻辑。
72
- - **scripts/**: 拥有跨平台自动化和生命周期逻辑。
73
- - **.agent/workflows/**: 拥有交互式 AI 命令 (SpecKit)。
74
-
75
- ---
76
-
77
- ## 📖 第 2 节 — 使用指南
78
-
79
- ### 前置条件
48
+ 你可以通过多种方式安装 UniRTM,详见 [快速开始](https://unirtm.snowdream.tech/zh/guide/getting-started.html)。
80
49
 
81
- - **运行时**: Node.js (>= 20.x), Python (>= 3.10.x)。
82
- - **Git**: 需要全局安装 git。
83
- - **Make**: 统一命令执行所必需。
84
-
85
- ### 快速开始
86
-
87
- 1. **初始化与安装**:`unirtm install`(安装开发所需核心工具与项目依赖)。
88
- 2. **验证**:`make verify`(确保环境健康)。
89
-
90
- ### 配置参考
91
-
92
- | 参数 | 用途 | 位置 |
93
- | :------------- | :----------------------------------------- | :---------------------- |
94
- | `PROJECT_NAME` | 项目身份 | `init-project.sh` |
95
- | `GITHUB_PROXY` | 网络优化 (见 [代理使用场](#-代理使用场景)) | `.unirtm.toml` |
96
- | `VERSION` | 语义化版本 | `package.json` |
97
-
98
- ### 目录结构
99
-
100
- ```text
101
- project-root/
102
- ├── .agent/ # 🤖 权威 AI 配置 (大脑)
103
- │ ├── rules/ # 📏 统一 AI 行为规则 (80+ 套件, SSoT)
104
- │ └── workflows/ # 🛠️ 统一命令与 AI 工作流 (SpecKit)
105
- ├── .agents/ # 🧩 共享命令源 (自动管理的软链接)
106
- ├── .github/ # 🐙 GitHub 集成与 Copilot 设置
107
- ├── .vscode/ # 💻 优化的 VS Code 配置
108
- └── src/ # 📦 您的实际应用源代码
50
+ ```sh-session
51
+ $ curl -sL https://raw.githubusercontent.com/snowdreamtech/UniRTM/main/install.sh | bash
52
+ $ ~/.local/bin/unirtm --version
53
+ UniRTM v0.1.0 macos-arm64 (2026-05-28)
109
54
  ```
110
55
 
111
- ---
112
-
113
- ## 🛠️ 第 3 节 — 运维指南
56
+ 将 UniRTM 挂载到你的 Shell 中(请选择与你对应的 Shell):
114
57
 
115
- ### 部署前检查清单
116
-
117
- 1. 运行 `make verify` 确保所有质量门禁均为绿色。
118
- 2. 运行 `make audit` 验证安全合规性。
119
- 3. 确保 `CHANGELOG.md` 已更新。
120
-
121
- ### 性能考虑
122
-
123
- - **Lint 速度**: Pre-commit 钩子通过仅扫描暂存文件,目标耗时 < 5s。
124
- - **CI 吞吐量**: GitHub Actions 使用矩阵构建在不同操作系统上并行测试。
125
-
126
- ### 故障排除
127
-
128
- - **问题**: `unirtm install` 在 Windows 上失败。
129
- - **诊断**: 检查 `ExecutionPolicy` 是否允许脚本执行。
130
- - **解决方案**: 运行 `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass`。
131
- - **问题**: Gitleaks 检测到误报。
132
- - **诊断**: 检查 `.gitleaks.toml` 白名单。
133
- - **解决方案**: 将特征码添加到 `.gitleaksignore`。
134
- - **问题**: `unirtm install` 后,macOS 上的 Pre-commit 钩子出现 Python 报错。
135
- - **诊断**: 检查 venv 是否存在:`ls .venv/bin/python`。
136
- - **解决方案**: 重建 venv:`rm -rf .venv && unirtm install`。
137
-
138
- ---
139
-
140
- ## 🔒 第 4 节 — 安全注意事项
58
+ ```sh-session
59
+ # 假设 unirtm 被安装在默认的 ~/.local/bin/unirtm 下
60
+ echo 'eval "$(~/.local/bin/unirtm env)"' >> ~/.bashrc
61
+ echo 'eval "$(~/.local/bin/unirtm env)"' >> ~/.zshrc
62
+ echo '~/.local/bin/unirtm env | source' >> ~/.config/fish/config.fish
63
+ ```
141
64
 
142
- ### 安全模型
65
+ ### 单次执行指定版本的工具
143
66
 
144
- - **机密管理**: 所有机密必须通过环境变量注入或由 HashiCorp Vault 处理。严禁提交 `.env` 文件。
145
- - **审计日志**: 所有关键操作(提交、发布、状态变更)均通过 Git CI 日志记录。
146
- - **供应链**: 所有 CI Action 均锁定到精确的版本/SHA。
67
+ ```sh-session
68
+ $ unirtm exec node@20 -- node -v
69
+ unirtm node@20.x.x installed
70
+ v20.x.x
71
+ ```
147
72
 
148
- ### 最佳实践
73
+ ### 全局安装开发工具
149
74
 
150
- | 维度 | 要求 | 实现 |
151
- | :----- | :--------------- | :---------------------------- |
152
- | 机密 | 仓库中无明文机密 | 提交时强制执行 `gitleaks` |
153
- | 完整性 | 验证下载内容 | `common.sh` 中的 SHA-256 校验 |
154
- | 权限 | 非 root 执行 | Dockerfile 最佳实践 |
75
+ ```sh-session
76
+ $ unirtm use --global node@22 go@1.22
77
+ $ node -v
78
+ v22.x.x
79
+ $ go version
80
+ go version go1.22.x macos/arm64
81
+ ```
155
82
 
156
- ---
83
+ 查看 [开发工具指南](https://unirtm.snowdream.tech/zh/dev-tools/) 获取更多示例。
157
84
 
158
- ## 🧑‍💻 第 5 节 — 开发者指南
85
+ ### 管理环境变量
159
86
 
160
- ### 代码组织 (Code Organization)
87
+ ```toml
88
+ # .unirtm.toml
89
+ [env]
90
+ SOME_VAR = "foo"
91
+ ```
161
92
 
162
- ```text
163
- project-root/
164
- ├── .agent/ # AI 配置(单一事实来源)
165
- │ ├── rules/ # 88 个 AI Agent 行为规则文件
166
- │ └── workflows/ # SpecKit 斜杠命令定义
167
- ├── .github/ # GitHub 生态(Actions、模板、Dependabot)
168
- │ └── workflows/ # CI/CD 流水线(lint、verify、release、security)
169
- ├── .devcontainer/ # DevContainer 配置,保障可复现的开发环境
170
- ├── docs/ # 项目文档
171
- │ ├── adr/ # 架构决策记录
172
- │ ├── runbooks/ # 运维与恢复手册
173
- │ └── glossary.md # 中英文对照术语表
174
- ├── scripts/ # POSIX Shell 自动化脚本(setup、install、verify)
175
- │ └── lib/ # 共享 Shell 库函数
176
- └── Makefile # 任务编排(setup、install、lint、verify、audit)
93
+ ```sh-session
94
+ $ unirtm set SOME_VAR=bar
95
+ $ echo $SOME_VAR
96
+ bar
177
97
  ```
178
98
 
179
- **命名规范**:核心规则文件使用 `NN-短横线命名.md`,语言栈规则使用 `technology.md`,
180
- 工作流文件使用 `namespace.verb.md`,Shell 脚本使用 `kebab-case.sh`。
99
+ 此外,`UniRTM` 同样可以自动读取本地的 [`.env` 文件](https://unirtm.snowdream.tech/zh/environments/#env-directives)。
181
100
 
182
- ### 扩展点
101
+ ### 运行任务
183
102
 
184
- 1. **添加规则**: 在 `.agent/rules/` 中创建新的 `.md` 文件,并在 `00-index.md` 中关联。
185
- 2. **添加命令**: 将 `.md` 文件添加到 `.agent/workflows/`。
186
- 3. **添加 IDE 支持**: 按照 Rule 03 中的软链接模式创建重定向文件夹(例如 `.myide/`)。
103
+ ```toml
104
+ # .unirtm.toml
105
+ [tasks.build]
106
+ description = "编译项目"
107
+ run = "echo building..."
108
+ ```
187
109
 
188
- ### 本地开发设置
110
+ ```sh-session
111
+ $ unirtm run build
112
+ building...
113
+ ```
189
114
 
190
- ```bash
191
- git clone <repo>
192
- cd <repo>
193
- git config core.ignorecase false # Mac/Windows 用户必须执行此设置
194
- unirtm install
115
+ 查看 [任务系统指南](https://unirtm.snowdream.tech/zh/tasks/) 获取更多高级用法。
116
+
117
+ ### UniRTM 综合实战配置
118
+
119
+ 下面是一个综合的 `.unirtm.toml` 示例,展示了如何在一个项目中同时管理开发工具、环境变量,并使用内置的安全扫描执行高级的部署任务编排:
120
+
121
+ ```toml
122
+ # .unirtm.toml
123
+ [tools]
124
+ terraform = "1"
125
+ aws-cli = "2"
126
+ node = "20"
127
+
128
+ [env]
129
+ TF_WORKSPACE = "development"
130
+ AWS_REGION = "us-west-2"
131
+ NODE_ENV = "production"
132
+
133
+ [tasks.plan]
134
+ description = "运行带有工作区配置的 terraform plan"
135
+ run = """
136
+ terraform init
137
+ terraform workspace select $TF_WORKSPACE
138
+ terraform plan
139
+ """
140
+
141
+ [tasks.validate]
142
+ description = "验证 AWS 凭据与 terraform 配置"
143
+ run = """
144
+ aws sts get-caller-identity
145
+ terraform validate
146
+ """
147
+
148
+ [tasks.audit]
149
+ description = "执行深度的底层安全扫描"
150
+ run = """
151
+ trivy fs --format cyclonedx --output sbom.json .
152
+ gitleaks detect --source . --no-banner
153
+ """
154
+
155
+ [tasks.deploy]
156
+ description = "在验证和安全扫描后正式部署基础设施"
157
+ depends = ["validate", "audit", "plan"]
158
+ run = "terraform apply -auto-approve"
195
159
  ```
196
160
 
197
- ### 参考资料
161
+ 你可以这样运行:
198
162
 
199
- - [完整文档](docs/index.md)
200
- - [项目术语表](docs/glossary.md)
201
- - [约定式提交](https://www.conventionalcommits.org/)
163
+ ```sh-session
164
+ unirtm install # 安装所需要的所有工具,并自动在底层生成安全 SBOM
165
+ unirtm run deploy # 在部署前,将自动按顺序并行执行校验和安全审查任务
166
+ ```
202
167
 
203
- ### 🚀 代理使用场景
168
+ ## 官方文档
204
169
 
205
- `GITHUB_PROXY` (默认: `https://gh-proxy.sn0wdr1am.com/`) 针对特定的网络加速场景进行了优化。在不支持的协议(如 Git)上误用它会导致错误。
170
+ 完整的架构解析与高级配置指南请前往官网:[unirtm.snowdream.tech](https://unirtm.snowdream.tech/zh/)
206
171
 
207
- | 场景 | 是否支持 | 示例 / 说明 |
208
- | :--------------------- | :------------ | :--------------------------------------------- |
209
- | **Release 文件** | ✅ 支持 | `.../releases/download/v1.0/tool.zip` |
210
- | **源码归档 (Archive)** | ✅ 支持 | `.../archive/master.zip` 或 `.tar.gz` |
211
- | **文件直接链接** | ✅ 支持 | `.../blob/master/filename` |
212
- | **Git Clone** | ❌ **不支持** | **请勿**用于 `git clone` 或 `insteadOf` 配置。 |
213
- | **项目文件夹** | ❌ **不支持** | 不支持通过代理进行项目文件夹的浏览或克隆。 |
172
+ ## 社区支持与 Issues
214
173
 
215
- > [!IMPORTANT]
216
- > 为了防止破坏工具链(如 `mise` 或 `asdf`),本模板显式禁用了通过此代理进行的 Git 重定向。请仅在脚本中进行直接 HTTP 下载时使用它。
174
+ 如果你遇到任何 bug 或有新功能提议,欢迎在 GitHub 提交:
217
175
 
218
- ---
176
+ - [Discussions (讨论区)](https://github.com/snowdreamtech/UniRTM/discussions)
177
+ - [Issues (问题追踪)](https://github.com/snowdreamtech/UniRTM/issues)
219
178
 
220
- ## 📄 许可证
179
+ ## 致谢鸣谢
221
180
 
222
- 本项目采用 **MIT 许可证** 授权。
223
- 版权所有 (c) 2026-现在 [SnowdreamTech Inc.](https://github.com/snowdreamtech)
224
- 详见 [LICENSE](./LICENSE) 文件。
181
+ <p>
182
+ 本项目在架构设计和开发者体验上深受伟大的 <a href="https://github.com/jdx/mise">mise</a> 的启发。
183
+ </p>
225
184
 
226
- ## Star History
185
+ ## 开源协议
227
186
 
228
- [![Star History Chart](https://api.star-history.com/image?repos=snowdreamtech/template&type=date&legend=top-left)](https://www.star-history.com/?repos=snowdreamtech%2Ftemplate&type=date&legend=top-left)
187
+ 本项目基于 MIT 许可证开源。版权所有 (c) 2026-至今 SnowdreamTech Inc。
package/bin/unirtm.exe CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowdreamtech/unirtm-windows-x64",
3
- "version": "0.0.10",
3
+ "version": "0.2.0",
4
4
  "description": "unirtm binary for Windows x64",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/snowdreamtech/unirtm",