game-deploy by opusgamelabs/game-creator
npx skills add https://github.com/opusgamelabs/game-creator --skill game-deploy将您的浏览器游戏部署以供公开访问。here.now 是默认选项——零配置的即时静态托管。当您需要基于 git 的部署时,GitHub Pages 可作为替代方案。
here-now 技能 (npx skills add heredotnow/skill --skill here-now -g)$HERENOW_API_KEY 或 ~/.herenow/credentialsnpm run build
~/.agents/skills/here-now/scripts/publish.sh dist/
脚本会输出一个实时 URL,例如 https://<slug>.here.now/。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
basebase: '/' 或默认值)curl、file 和 jqhere.now 从子域名根目录提供服务,因此请使用默认基础路径:
export default defineConfig({
base: '/',
// ... 其余配置
});
没有 API 密钥时,发布是匿名的,并在 24 小时后过期。发布脚本会返回一个认领 URL——用户必须访问此 URL 并创建一个免费的 here.now 账户才能永久保留网站。认领令牌仅显示一次,无法恢复。 如果用户不认领,网站将消失。
每次匿名发布后,您都必须告知用户关于 24 小时窗口期和认领 URL 的信息。 这是强制要求。
| 功能 | 匿名 | 已认证 |
|---|---|---|
| 过期时间 | 24 小时(然后删除!) | 永久 |
| 最大文件大小 | 250 MB | 5 GB |
| 速率限制 | 5次/小时/IP | 60次/小时/账户 |
要为永久托管设置 API 密钥(完全跳过 24 小时窗口期):
首先检查密钥是否已存在:test -f .env && grep -q '^HERENOW_API_KEY=.' .env && echo "found" 如果找到,使用 set -a; . .env; set +a 导出它并跳过提示。
否则:
curl -sS https://here.now/api/auth/login -H "content-type: application/json" -d '{"email": "user@example.com"}'HERENOW_API_KEY=their-key-here(自动保存到 .env 并隐藏)mkdir -p ~/.herenow && grep '^HERENOW_API_KEY=' .env | cut -d= -f2- > ~/.herenow/credentials && chmod 600 ~/.herenow/credentialsnpm run build
~/.agents/skills/here-now/scripts/publish.sh dist/ --slug <slug>
每次发布后,slug 会保存在 .herenow/state.json 中——脚本会自动加载它以进行更新。
添加到 package.json:
{
"scripts": {
"deploy": "npm run build && ~/.agents/skills/here-now/scripts/publish.sh dist/"
}
}
对于更新现有 slug:
{
"scripts": {
"deploy": "npm run build && ~/.agents/skills/here-now/scripts/publish.sh dist/ --slug <slug>"
}
}
当您需要基于 git 的部署或已经设置了 GitHub 仓库时,请使用 GitHub Pages。
gh)npm run build && npx gh-pages -d dist
npm run build
vite.config.js 具有正确的基础路径(如果部署到子目录):export default defineConfig({
base: '/<repo-name>/',
// ... 其余配置
});
3. 使用 GitHub CLI 部署:
gh repo create <game-name> --public --source=. --push
npm install -D gh-pages
npx gh-pages -d dist
4. 在仓库设置中启用 GitHub Pages(应自动检测 gh-pages 分支)。
您的游戏将在此地址上线:https://<username>.github.io/<repo-name>/
添加到 package.json:
{
"scripts": {
"deploy": "npm run build && npx gh-pages -d dist"
}
}
部署后,在 Play.fun 上注册您的游戏以实现货币化。使用 /game-creator:playdotfun 技能获取集成详情。
部署后的 URL 在注册时将成为您的 gameUrl:
await client.games.register({
name: '您的游戏名称',
gameUrl: 'https://<slug>.here.now/', // 或 GitHub Pages URL
maxScorePerSession: 500,
maxSessionsPerDay: 20,
maxCumulativePointsPerDay: 5000
});
npx vercel --prod(自动检测 Vite)npm run build,发布目录设置为 distdist/ 文件夹作为 HTML5 游戏上传/game-deploy
结果:构建 dist/ → 通过 here.now 发布 → 游戏在几秒钟内上线,地址为 https://<slug>.here.now/。为未来的一键部署添加 npm run deploy 脚本。
/game-deploy github-pages
结果:使用正确的基础路径构建 → 推送到 gh-pages 分支 → 游戏在 1-2 分钟内上线,地址为 https://<user>.github.io/<game>/。
原因: 短时间内部署次数过多。here.now 对匿名部署有速率限制。解决方法: 等待几分钟后重试。对于频繁部署,请考虑改用 GitHub Pages 或 Vercel。
原因: 匿名 here.now 部署是临时的,在不活动一段时间后会过期。解决方法: 使用 npx here.now 重新部署。对于持久托管,请使用不会过期的 GitHub Pages(gh-pages 分支)或 Vercel。
原因: Vite 的基础路径与 GitHub Pages 的 URL 结构(/<repo-name>/)不匹配。解决方法: 在 vite.config.js 中设置 base: '/<repo-name>/'。确保在仓库的 Pages 设置中选择 gh-pages 分支作为源。等待 1-2 分钟让 GitHub 的 CDN 传播。
原因: 资源路径使用了绝对 URL(/assets/...),在部署主机上无法正确解析。解决方法: 使用相对路径(./assets/...)或将 Vite 的 base 选项配置为与部署 URL 匹配。在部署前,本地运行 npm run build 并使用本地服务器测试 dist/ 文件夹。
原因: 远程 gh-pages 分支已分叉,或者强制推送被分支保护规则阻止。解决方法: 如果您拥有仓库且没有分支保护,请使用 git push origin gh-pages --force。如果受保护,请先删除远程 gh-pages 分支:git push origin --delete gh-pages,然后重新部署。
npm run build 成功且无错误npm run preview 测试生产构建console.log 调试语句index.html 中设置适当的 <title> 和元标签每周安装量
88
仓库
GitHub 星标数
26
首次出现
2026年2月21日
安全审计
安装于
claude-code72
opencode45
cursor43
github-copilot43
amp43
codex43
Deploy your browser game for public access. here.now is the default — instant static hosting with zero configuration. GitHub Pages is available as an alternative when you need git-based deploys.
here-now skill installed (npx skills add heredotnow/skill --skill here-now -g)$HERENOW_API_KEY or ~/.herenow/credentials for permanent hostingnpm run build
~/.agents/skills/here-now/scripts/publish.sh dist/
The script outputs a live URL like https://<slug>.here.now/.
base path, no git repo, no GitHub CLI requiredbase: '/' or default)curl, file, and jqhere.now serves from the subdomain root, so use the default base path:
export default defineConfig({
base: '/',
// ... rest of config
});
Without an API key, publishes are anonymous and expire in 24 hours. The publish script returns a claim URL — the user MUST visit this URL and create a free here.now account to keep the site permanently. The claim token is only shown once and cannot be recovered. If they don't claim it, the site disappears.
You MUST always tell the user about the 24-hour window and the claim URL after every anonymous publish. This is not optional.
| Feature | Anonymous | Authenticated |
|---|---|---|
| Expiry | 24 hours (then deleted!) | Permanent |
| Max file size | 250 MB | 5 GB |
| Rate limit | 5/hour/IP | 60/hour/account |
To set up an API key for permanent hosting (skip the 24h window entirely):
First check if the key already exists: test -f .env && grep -q '^HERENOW_API_KEY=.' .env && echo "found" If found, export it with set -a; . .env; set +a and skip the prompt.
Otherwise:
curl -sS https://here.now/api/auth/login -H "content-type: application/json" -d '{"email": "user@example.com"}'HERENOW_API_KEY=their-key-here (saved to .env and redacted automatically)mkdir -p ~/.herenow && grep '^HERENOW_API_KEY=' .env | cut -d= -f2- > ~/.herenow/credentials && chmod 600 ~/.herenow/credentialsnpm run build
~/.agents/skills/here-now/scripts/publish.sh dist/ --slug <slug>
The slug is saved in .herenow/state.json after each publish — the script auto-loads it for updates.
Add to package.json:
{
"scripts": {
"deploy": "npm run build && ~/.agents/skills/here-now/scripts/publish.sh dist/"
}
}
For updates to an existing slug:
{
"scripts": {
"deploy": "npm run build && ~/.agents/skills/here-now/scripts/publish.sh dist/ --slug <slug>"
}
}
Use GitHub Pages when you need git-based deployment or already have a GitHub repo set up.
gh)npm run build && npx gh-pages -d dist
npm run build
vite.config.js has the correct base path if deploying to a subdirectory:export default defineConfig({
base: '/<repo-name>/',
// ... rest of config
});
3. Deploy with GitHub CLI :
gh repo create <game-name> --public --source=. --push
npm install -D gh-pages
npx gh-pages -d dist
4. Enable GitHub Pages in repo settings (should auto-detect the gh-pages branch).
Your game is live at: https://<username>.github.io/<repo-name>/
Add to package.json:
{
"scripts": {
"deploy": "npm run build && npx gh-pages -d dist"
}
}
After deploying, register your game on Play.fun for monetization. Use the /game-creator:playdotfun skill for integration details.
The deployed URL becomes your gameUrl when registering:
await client.games.register({
name: 'Your Game Name',
gameUrl: 'https://<slug>.here.now/', // or GitHub Pages URL
maxScorePerSession: 500,
maxSessionsPerDay: 20,
maxCumulativePointsPerDay: 5000
});
npx vercel --prod (auto-detects Vite)npm run build, publish dir to distdist/ folder as an HTML5 game/game-deploy
Result: Builds dist/ → publishes via here.now → game live at https://<slug>.here.now/ in seconds. Adds npm run deploy script for future one-command deploys.
/game-deploy github-pages
Result: Builds with correct base path → pushes to gh-pages branch → game live at https://<user>.github.io/<game>/ in 1-2 minutes.
Cause: Too many deployments in a short period. here.now has rate limiting on anonymous deployments. Fix: Wait a few minutes and retry. For frequent deployments, consider using GitHub Pages or Vercel instead.
Cause: Anonymous here.now deployments are temporary and expire after a period of inactivity. Fix: Redeploy with npx here.now. For persistent hosting, use GitHub Pages (gh-pages branch) or Vercel, which don't expire.
Cause: Vite's base path doesn't match the GitHub Pages URL structure (/<repo-name>/). Fix: Set base: '/<repo-name>/' in vite.config.js. Ensure the gh-pages branch is selected as the source in the repository's Pages settings. Wait 1-2 minutes for GitHub's CDN to propagate.
Cause: Asset paths use absolute URLs (/assets/...) that don't resolve correctly on the deployment host. Fix: Use relative paths (./assets/...) or configure Vite's base option to match the deployment URL. Run npm run build locally and test the dist/ folder with a local server before deploying.
Cause: The remote gh-pages branch has diverged or the force push was blocked by branch protection rules. Fix: Use git push origin gh-pages --force if you own the repo and there's no branch protection. If protected, delete the remote gh-pages branch first: git push origin --delete gh-pages, then redeploy.
npm run build succeeds with no errorsnpm run previewconsole.log debug statements<title> and meta tags in index.htmlWeekly Installs
88
Repository
GitHub Stars
26
First Seen
Feb 21, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykPass
Installed on
claude-code72
opencode45
cursor43
github-copilot43
amp43
codex43
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
104,900 周安装
化合物信息检索工具:跨数据库验证,获取全面化学数据与生物活性信息
184 周安装
AI代理管理工具 - 统一CLI创建、管理和编排多个AI代理,支持生命周期管理和插件扩展
188 周安装
AI智能错误诊断与调试指南:自动化根因分析、可观测性平台集成与生产环境安全调试
188 周安装
前端设计技能:创建独特、生产级UI界面,突破AI生成美学,实现创意前端开发
194 周安装
Attio CRM API 集成指南:Python脚本管理公司、联系人、笔记和交易
187 周安装
iOS无障碍功能开发指南:VoiceOver、动态字体、WCAG合规性检查与App Store审核
187 周安装