Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); GitHub - Tech-ArthurX/GPM: A golang-based package manager · GitHub
Skip to content

Repository files navigation

GPM

中文 | English

GPM 是面向 Windows PE 和便携式 Windows 工具的包管理项目。 这个仓库保留发布所需的核心内容:包分发、包元数据、脚本执行,以及语言和规范文档。

工作方式

GPM 的服务端负责维护一个简单的 JSON 包索引,里面记录包名、版本、大小、 校验值和下载地址。客户端更新索引后,从索引里的链接下载 .gpm 包, 在本地完成完整性校验、签名验证、解压和安装。

这种设计让服务端保持轻量,也让包安装过程可以在 Windows PE 等环境里稳定运行。 包格式和签名链的细节见 .gpm 包格式信任链规范

包索引

packages.json 是一个数组,每一项代表一个可安装包:

{
"name": "7-Zip",
"version": "24.09",
"author": "ArthurX",
"category": "Archive",
"description": "File archiver",
"size": 1623934,
"sha256": "hex-encoded-sha256",
"filename": "[7-Zip,24.09,ArthurX,1.55MB].gpm",
"url": "https://example.test/packages/7zip.gpm",
"key_id": "ArthurX/7-Zip",
"public_key_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.pem",
"public_key_signature_url": "https://example.test/keys/ArthurX/7-Zip/7-Zip_public_key.sig"
}

最小可用字段是 nameversionauthorurl。 建议同时提供 sizesha256,方便客户端显示大小并校验下载结果。 如果启用包签名,可以再提供 key_idpublic_key_urlpublic_key_signature_url

目录

  • gpm/ - Go CLI、包安装运行时、下载器、GUI WebSocket 后端和 GS 集成。
  • gs/ - GS 解释器/编译器模块和语言规范。
  • gui/ - 原生 Direct2D 前端。
  • server/ - 包索引服务和扫描器。
  • tools/ - 给包脚本和运行时集成使用的可选 PE 工具。
  • build.py - 根目录 .gpm 包构建器,默认更新 server/packages.json
  • gpm/docs/package.md / gpm/docs/package.en.md - .gpm 包格式规范。
  • gpm/docs/trust-chain.md / gpm/docs/trust-chain.en.md - 密钥信任链与验证流程。
  • gs/docs/style.md / gs/docs/style.en.md - GS 写法与风格说明。
  • gs/docs/reference.md / gs/docs/reference.en.md - GS 语言参考。
  • gs/docs/tutorial.md / gs/docs/tutorial.en.md - GS 教程。
  • gs/SPEC.md / gs/SPEC.en.md - GS 规范性契约。
  • gpm/README.md / gpm/README.en.md - GPM CLI 总览。
  • server/README.md / server/README.en.md - 包索引服务总览。
  • gui/README.md / gui/README.en.md - 原生前端总览。

About

A golang-based package manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages