@snowdreamtech/unirtm-windows-x64 0.1.0 → 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 +142 -180
- package/README_zh-CN.md +142 -183
- package/bin/unirtm.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,225 +1,187 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<h1 align="center">
|
|
4
|
+
UniRTM
|
|
5
|
+
</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
10
|
-
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
11
|
-
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
12
|
-
[](https://opensource.org/license/MIT)
|
|
13
|
-
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
14
|
-
[](https://github.com/snowdreamtech/template/blob/main/.github/dependabot.yml)
|
|
15
|
-
[](https://github.com/pre-commit/pre-commit)
|
|
16
|
-
[](https://github.com/snowdreamtech/template)
|
|
17
|
-
[](https://github.com/snowdreamtech/template/issues)
|
|
18
|
-
[](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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
22
|
+
<hr />
|
|
25
23
|
|
|
26
|
-
|
|
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
|
-
|
|
26
|
+
> [!TIP]
|
|
27
|
+
> UniRTM introduces native SBOM generation and security scanning via Trivy & Syft directly into your dev tools installation flow!
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
## What is it?
|
|
36
30
|
|
|
37
|
-
|
|
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
|
-
**
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
56
|
-
R2 -.->|SSoT Pointer| CoreRules
|
|
57
|
-
R3 -.->|SSoT Pointer| CoreRules
|
|
46
|
+
### Install UniRTM
|
|
58
47
|
|
|
59
|
-
|
|
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
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
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
|
-
|
|
73
|
+
### Install tools
|
|
140
74
|
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
85
|
+
### Manage environment variables
|
|
148
86
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
-
|
|
99
|
+
Note that `UniRTM` can also [load `.env` files](https://unirtm.snowdream.tech/environments/#env-directives).
|
|
158
100
|
|
|
159
|
-
###
|
|
101
|
+
### Run tasks
|
|
160
102
|
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
110
|
+
```sh-session
|
|
111
|
+
$ unirtm run build
|
|
112
|
+
building...
|
|
113
|
+
```
|
|
182
114
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
|
|
161
|
+
Run it with:
|
|
188
162
|
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
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
|
-
|
|
170
|
+
See [unirtm.snowdream.tech](https://unirtm.snowdream.tech)
|
|
203
171
|
|
|
204
|
-
|
|
172
|
+
## GitHub Issues & Discussions
|
|
205
173
|
|
|
206
|
-
|
|
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
|
-
|
|
215
|
-
|
|
176
|
+
- [Discussions](https://github.com/snowdreamtech/UniRTM/discussions)
|
|
177
|
+
- [Issues](https://github.com/snowdreamtech/UniRTM/issues)
|
|
216
178
|
|
|
217
|
-
##
|
|
179
|
+
## Special Thanks
|
|
218
180
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
##
|
|
185
|
+
## License
|
|
224
186
|
|
|
225
|
-
|
|
187
|
+
MIT License. Copyright (c) 2026-present SnowdreamTech Inc.
|
package/README_zh-CN.md
CHANGED
|
@@ -1,228 +1,187 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<h1 align="center">
|
|
4
|
+
UniRTM
|
|
5
|
+
</h1>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
10
|
-
[](https://github.com/snowdreamtech/template/actions/workflows/ci.yml)
|
|
11
|
-
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
12
|
-
[](https://opensource.org/license/MIT)
|
|
13
|
-
[](https://github.com/snowdreamtech/template/releases/latest)
|
|
14
|
-
[](https://github.com/snowdreamtech/template/blob/main/.github/dependabot.yml)
|
|
15
|
-
[](https://github.com/pre-commit/pre-commit)
|
|
16
|
-
[](https://github.com/snowdreamtech/template)
|
|
17
|
-
[](https://github.com/snowdreamtech/template/issues)
|
|
18
|
-
[](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
|
-
|
|
12
|
+
<p><b>集开发工具、环境变量和任务管理于一体的 CLI(内置安全扫描)。</b><br><i>灵感来源于出色的 <a href="https://github.com/jdx/mise">mise</a> 项目,在此向其致敬。</i></p>
|
|
21
13
|
|
|
22
|
-
|
|
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
|
-
|
|
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
|
-
|
|
26
|
+
> [!TIP]
|
|
27
|
+
> UniRTM 将 SBOM 自动生成与 Trivy/Syft 安全漏洞扫描直接无缝集成到了你的工具安装流程中!
|
|
34
28
|
|
|
35
|
-
|
|
29
|
+
## 介绍
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
`UniRTM` (Universal Runtime Manager) 能够在每次执行命令前自动准备好你的开发环境。它将项目所需的工具版本、环境变量和常用任务统一集中在 `.unirtm.toml` 文件中进行管理,确保每次打开新终端、切换分支或运行 CI 任务时,环境配置都绝对一致。
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
- 安装并在诸如 node, python, go 等各类 **开发工具** 之间无缝切换。
|
|
34
|
+
- 基于不同目录加载隔离的 **环境变量**,支持读取 `.env` 以及 SOPS 加密数据。
|
|
35
|
+
- 编写并运行项目的构建、测试、代码检查及部署 **任务**。
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
- 通过动态适配的 POSIX Shell 自动化脚本,强制保证**跨平台便携性**。
|
|
43
|
-
- 实施**三重保证质量门禁**(IDE、CLI、CI),严防代码劣化。
|
|
44
|
-
- 支持**大规模多语言技术栈**,并配备模块化的加载逻辑。
|
|
37
|
+
虽然在概念上我们深受伟大的 `mise` 启发(在此致敬),但 UniRTM 在架构上引入了几个独特的选择:
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
- **纯 Go 引擎**: 底层完全由 Go 语言编写,利用 goroutines 实现了极致的并发下载能力。
|
|
40
|
+
- **无 Shims 垫片**: UniRTM 严格避免使用 Bash 垫片(Shims)。它直接将安装工具的绝对路径前置插入到你的 `$PATH` 变量中,保证了 100% 的执行性能,并对各种 IDE 完全透明。
|
|
41
|
+
- **原生安全检测**: 底层原生集成了 Trivy 和 Syft。当你下载工具时,会自动生成 SBOM 并扫描已知的安全漏洞。
|
|
42
|
+
- **强制版本锁定**: 自动生成 `unirtm.lock` 锁文件,不仅锁定版本号,还精确锁定所有下载包的校验和,从而保障团队环境的绝对可复现。
|
|
47
43
|
|
|
48
|
-
|
|
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
|
-
|
|
56
|
-
R2 -.->|SSoT 指针| CoreRules
|
|
57
|
-
R3 -.->|SSoT 指针| CoreRules
|
|
46
|
+
### 安装 UniRTM
|
|
58
47
|
|
|
59
|
-
|
|
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
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
-
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
85
|
+
### 管理环境变量
|
|
159
86
|
|
|
160
|
-
|
|
87
|
+
```toml
|
|
88
|
+
# .unirtm.toml
|
|
89
|
+
[env]
|
|
90
|
+
SOME_VAR = "foo"
|
|
91
|
+
```
|
|
161
92
|
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
-
|
|
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
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
unirtm
|
|
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
|
-
-
|
|
200
|
-
|
|
201
|
-
|
|
163
|
+
```sh-session
|
|
164
|
+
unirtm install # 安装所需要的所有工具,并自动在底层生成安全 SBOM
|
|
165
|
+
unirtm run deploy # 在部署前,将自动按顺序并行执行校验和安全审查任务
|
|
166
|
+
```
|
|
202
167
|
|
|
203
|
-
|
|
168
|
+
## 官方文档
|
|
204
169
|
|
|
205
|
-
|
|
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
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
181
|
+
<p>
|
|
182
|
+
本项目在架构设计和开发者体验上深受伟大的 <a href="https://github.com/jdx/mise">mise</a> 的启发。
|
|
183
|
+
</p>
|
|
225
184
|
|
|
226
|
-
##
|
|
185
|
+
## 开源协议
|
|
227
186
|
|
|
228
|
-
|
|
187
|
+
本项目基于 MIT 许可证开源。版权所有 (c) 2026-至今 SnowdreamTech Inc。
|
package/bin/unirtm.exe
CHANGED
|
Binary file
|