taubyte-project-and-application

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Project and application

项目与应用

Default (important)

默认规则(重要)

Do not create an application “just because” you created or selected a project.
  • After
    tau select project
    , stop unless
    taubyte-scope-routing
    (and the user’s request) show that an application is actually needed.
  • Never run
    tau new application
    unless one of the “Create or select an application” triggers below is true.
Log the decision (including “no application; project-level only”) in
taubyte-context-log
.

切勿因创建或选择了项目就“随意”创建应用程序。
  • 在执行**
    tau select project
    后,除非
    taubyte-scope-routing
    (以及用户的需求)表明确实需要应用程序**,否则请停止操作
  • 除非满足以下任一“创建或选择应用程序”触发条件,否则绝不执行**
    tau new application
    **。
请在**
taubyte-context-log
**中记录决策内容(包括“无需应用程序;仅在项目层级操作”)。

When not to create or select an application

无需创建或选择应用程序的场景

Stay at project context (no
tau new application
, no
tau select application
) when the work is any of:
  • Website only (create/import/push/configure site).
  • Library only.
  • Domain (or other global resources) only.
  • A single function or small function-only task without the user asking for separate apps, “multiple contexts,” or an explicit application boundary.
  • The user did not name an application and did not describe multiple applications or multi-context layouts.
In those cases, complete the task under project scope unless the CLI returns an error that clearly requires
tau select application
—then reassess with the user rather than inventing a new app.

当工作内容属于以下任一情况时,请保持在项目上下文(不执行**
tau new application
,也不执行
tau select application
**):
  • 仅涉及网站(创建/导入/推送/配置站点)。
  • 仅涉及
  • 仅涉及域名(或其他全局资源)。
  • 仅涉及单个功能或小型纯功能任务,且用户未要求使用独立应用、“多上下文”或明确的应用边界。
  • 用户未指定应用名称,也未描述多应用多上下文架构。
在这些情况下,请在项目范围内完成任务,除非CLI返回明确要求执行**
tau select application
**的错误——此时请与用户重新评估,而非自行创建新应用。

When to create or select an application

需要创建或选择应用程序的场景

Do
tau new application
/
tau select application
only when at least one of:
  1. The user explicitly wants one or more named applications or a multi-app / multi-context project.
  2. taubyte-scope-routing
    marks the task as application-scoped (e.g. work that assumes an application context: service, database, storage, messaging, smartops, or a function explicitly tied to a chosen/named application).
  3. You are about to run commands that require a selected application per
    tau --help
    / error output for that command.
If an application already exists and the user named it, use
tau select application --name <app>
only—do not create a duplicate with
new application
.

仅当满足以下至少一个条件时,才执行**
tau new application
** /
tau select application
  1. 用户明确需要一个或多个已命名的应用程序,或需要一个多应用/多上下文项目。
  2. taubyte-scope-routing
    将任务标记为应用程序范围
    (例如,需基于应用上下文的工作:服务数据库存储消息传递smartops,或明确绑定到某个已选/已命名应用的功能)。
  3. 即将执行的命令根据**
    tau --help
    ** / 该命令的错误输出显示必须选择应用程序
如果应用程序已存在且用户指定了名称,请仅使用**
tau select application --name <app>
——切勿使用
new application
**创建重复应用。

Steps

步骤

1. Verify context

1. 验证上下文

bash
tau --json current
bash
tau --json current

2. Create or select project only

2. 仅创建或选择项目

bash
tau --defaults --yes new project --name <project> --description "<desc>" --private --no-embed-token
tau select project --name <project>
(Use
tau select project
alone if the project already exists.)
bash
tau --defaults --yes new project --name <project> --description "<desc>" --private --no-embed-token
tau select project --name <project>
(如果项目已存在,只需单独执行**
tau select project
**即可。)

3. Application — only if triggers above match

3. 应用程序 — 仅当满足上述触发条件时执行

bash
tau --defaults --yes new application --name <app> --description "<desc>"
tau select application --name <app>
Skip this block entirely when “When not to create” applies.
bash
tau --defaults --yes new application --name <app> --description "<desc>"
tau select application --name <app>
当“无需创建应用程序”的场景适用时,请完全跳过此步骤块。

4. Verify

4. 验证

bash
tau --json current
Record project and, if applicable, application (or none / global-only) in the context log.
bash
tau --json current
请在上下文日志中记录项目信息,若涉及应用程序也请记录(或记录“无应用程序 / 仅全局操作”)。