← 返回
开发者工具 Key

Edgeone Pages Deploy

This skill deploys frontend and full-stack projects to EdgeOne Pages (Tencent EdgeOne). It should be used when the user's primary intent is to deploy, publish, ship, host, launch, go live, or release a new version — e.g. "deploy my app", "publish this site", "push this live", "create a preview deployment", "deploy to EdgeOne", "ship to production", "go live", "release", "publish a new version", "redeploy", "上线", "发布", "发一版", "重新部署". Do NOT trigger when deployment is only mentioned as a secondary
>-
edgeone-pages
开发者工具 community v1.0.8 7 版本 100000 Key: 需要
★ 0
Stars
📥 487
下载
💾 75
安装
7
版本
#latest

概述

EdgeOne Pages Deployment Skill

Deploy any project to EdgeOne Pages.

⛔ Critical Rules (never skip)

  1. CLI version ≥ 1.2.30 — reinstall if lower. Never proceed with an outdated version.
  2. Never truncate the deploy URLEDGEONE_DEPLOY_URL includes query parameters required for access. Always output the complete URL.
  3. Ask the user to choose China or Global site before login. Never assume.
  4. Auto-detect the login method — browser login in desktop environments, token login in headless/remote/CI environments. Follow the decision table below.
  5. After token login, ask if the user wants to save the token locally for future use.
  6. Before triggering any browser popup (login / registration), explain the reason and the benefits to the user first — never silently launch a browser window.

Environment Setup

Before executing any edgeone CLI command (install, login, deploy, etc.), set the following environment variable in the current shell session:

export PAGES_SOURCE=skills

Or prefix each command inline:

PAGES_SOURCE=skills edgeone pages deploy

This tells the platform that the deployment is triggered from an AI skill context.


Deployment Flow

Run these checks first, then follow the decision table:

# Check 0: Set environment variable (required before any edgeone command)
export PAGES_SOURCE=skills

# Check 1: CLI installed and correct version?
edgeone -v

# Check 2: Already logged in?
edgeone whoami

# Check 3: Project already linked?
cat edgeone.json 2>/dev/null

# Check 4: Saved token exists?
cat .edgeone/.token 2>/dev/null

Decision Table

CLI versionLogin statusAction
----------------------------------
Not installed or < 1.2.30→ Go to Install CLI
≥ 1.2.30Logged in→ Go to Deploy
≥ 1.2.30Not logged in, has saved token→ Go to Deploy with Token (use saved token)
≥ 1.2.30Not logged in, no saved token→ Go to Login

Install CLI

npm install -g edgeone@latest

Verify: edgeone -v — confirm output is 1.2.30 or higher. Retry installation if not.


Login

0. Explain the registration/login step

Before triggering any login flow, explain to the user why this step is needed and what to expect. Do not silently launch a browser window.

Tell the user:

> You need to log in or register an EdgeOne Pages account. Here's what to expect:

> - Why login is required: Deployment uploads your build output to your own account, generating a unique access URL and project record.

> - What you get for free: EdgeOne Pages offers a free tier with global CDN acceleration, automatic HTTPS, and custom domain binding — typically more than enough for personal projects.

> - What happens next: I'll run edgeone login, and your default browser will open the Tencent Cloud login page. Please complete the login/registration and authorize access, then come back here.

> - If you get stuck: If the browser doesn't open, or the CLI keeps waiting after you've logged in, let me know — I'll switch to Token login instead.

If the user does not respond for an extended period (e.g., more than 1–2 minutes), proactively ask about their status (whether the browser opened, any errors, or if they want to switch to Token login). Do not wait indefinitely.

1. Ask the user to choose a site

Use the IDE's selection control (ask_followup_question) before running any login command:

> Choose your EdgeOne Pages site:

> - China — For users in mainland China (console.cloud.tencent.com)

> - Global — For users outside China (console.intl.cloud.tencent.com)

2. Detect environment and choose login method

ConditionMethod
-------------------
Local desktop IDE (VS Code, Cursor, etc.)Browser Login
Remote / SSH / container / CI / cloud IDE / headlessToken Login
User explicitly requests tokenToken Login

Browser Login

# China site
edgeone login --site china

# Global site
edgeone login --site global

Wait for the user to complete browser auth. The CLI prints a success message when done.

⚠️ Browser Session Reuse Trap: If the user previously logged into a different site (e.g., logged into Global site before, now trying China site, or vice versa), the browser may silently reuse the old Tencent Cloud session. The CLI will appear to succeed, but actually binds to the wrong account — subsequent deploy will fail with auth errors or whoami shows an unexpected account.

If this happens, guide the user to:

  1. Click "Sign in with a different account" on the login page; or
  2. Log out from all Tencent Cloud consoles (both console.cloud.tencent.com and console.intl.cloud.tencent.com) first, then re-run edgeone login.

Token Login

Token login does NOT use edgeone login. Pass the token directly in the deploy command via -t.

Guide the user to obtain a token:

  1. Go to the console:
    • China: https://console.cloud.tencent.com/edgeone/pages?tab=settings
    • Global: https://console.intl.cloud.tencent.com/edgeone/pages?tab=settings
  2. Find API TokenCreate Token → Copy it

⚠️ Remind the user: the token has account-level permissions. Never commit it to a repository.

3. Offer to save the token locally

After the user provides a token, ask:

> Save this token locally for future deployments?

> - Yes — Save to .edgeone/.token (auto-used next time)

> - No — Use for this deployment only

If Yes:

mkdir -p .edgeone
echo "<token>" > .edgeone/.token
grep -q '.edgeone/.token' .gitignore 2>/dev/null || echo '.edgeone/.token' >> .gitignore

Confirm to the user: "✅ Token saved to .edgeone/.token and added to .gitignore."


Deploy

Browser-authenticated deploy

# Project already linked (edgeone.json exists)
edgeone pages deploy

# New project (no edgeone.json)
edgeone pages deploy -n <project-name>

: auto-generate from the project directory name. The first deploy creates edgeone.json automatically.

Token-based deploy

First check for a saved token:

cat .edgeone/.token 2>/dev/null
  • Saved token found → use it, tell the user: "Using saved token from .edgeone/.token"
  • No saved token → ask the user to provide one (see Token Login above)
# Project already linked
edgeone pages deploy -t <token>

# New project
edgeone pages deploy -n <project-name> -t <token>

The token already contains site info — no --site flag needed.

After a successful deploy with a manually-entered token, ask if the user wants to save it (see "Offer to save the token locally" above).

Deploy to preview environment

edgeone pages deploy -e preview

Build behavior

The CLI auto-detects the framework, runs the build, and uploads the output directory. No manual config needed.


⚠️ Parse Deploy Output (Critical)

After edgeone pages deploy succeeds, the CLI outputs:

[cli][✔] Deploy Success
EDGEONE_DEPLOY_URL=https://my-project-abc123.edgeone.cool?<auth_query_params>
EDGEONE_DEPLOY_TYPE=preset
EDGEONE_PROJECT_ID=pages-xxxxxxxx
[cli][✔] You can view your deployment in the EdgeOne Pages Console at:
https://console.cloud.tencent.com/edgeone/pages/project/pages-xxxxxxxx/deployment/xxxxxxx

Extraction rules:

FieldHow to extract⛔ Warning
---------------------------------
Access URLFull value after EDGEONE_DEPLOY_URL=Include the full query string (? and everything after) — without these params the page will not load
Project IDValue after EDGEONE_PROJECT_ID=
Console URLLine after "You can view your deployment..."

Show the user:

> ✅ Deployment complete!

> - Access URL: https://my-project-abc123.edgeone.cool?

> - Console URL: https://console.cloud.tencent.com/edgeone/pages/project/...

>

> ℹ️ Note: This preview URL is for quick deployment verification. When accessed from mainland China, the link may become restricted (e.g., 401) after some time or when shared, due to domain ICP filing status or CDN acceleration policies. For long-term stable public access, bind a custom domain with proper ICP filing.


Error Handling

ErrorSolution
-----------------
command not found: edgeoneRun npm install -g edgeone@latest
Browser does not open during loginSwitch to token login
"not logged in" errorRun edgeone whoami to check, then re-login or use token
Auth error with tokenToken may be expired — regenerate at the console
Login appears successful but deploy reports auth errorBrowser reused a session from the wrong site, binding the wrong account. Click "Sign in with a different account" on the login page, or log out from all Tencent Cloud consoles first
edgeone whoami shows an unexpected accountSame issue: browser session reuse. Click "Sign in with a different account" or log out from all consoles and re-login
Project name conflictUse a different name with -n
Build failureCheck logs — usually missing deps or bad build script

For CLI command reference, environment variables, local dev setup, and token management details, see references/command-reference.md.

版本历史

共 7 个版本

  • v1.0.8 Initial release 当前
    2026-05-22 15:14 安全 安全
  • v1.0.7 更新图标和描述
    2026-05-22 15:03 安全 安全
  • v1.0.6 Initial release
    2026-05-22 14:52 安全 安全
  • v1.0.5 新增设置环境变量
    2026-05-08 11:40 安全 安全
  • v1.0.3 Initial release
    2026-04-24 14:40 安全
  • v1.0.1 Initial release
    2026-04-24 14:39 安全
  • v1.0.0
    2026-03-19 16:21 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 920 📥 185,727
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 65 📥 179,847

Edgeone Pages Dev

user_cdc69ff0
>-
★ 0 📥 133