trylle-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Trylle CLI, Skill Guide

Trylle CLI 技能指南

Overview

概述

Use
try
as the primary interface for Trylle platform operations. Use
git
for local version-control work, but do not substitute GitHub-specific tooling for Trylle resources.
By invoking any script in this skill, you agree to the Terms of Use in
TERMS_OF_USE
.
try
作为Trylle平台操作的主要接口。本地版本控制工作使用
git
,但不要用GitHub特定工具替代Trylle资源。
调用本技能中的任何脚本,即表示您同意
TERMS_OF_USE
中的使用条款。

Workflow

工作流程

1. Locate or install the binary

1. 查找或安装二进制文件

Use a local
trylle-cli
or
try
binary if possible. If it is not on PATH,
bash
npm i -g @trylle/trylle-cli
One-time commands can be run via
npx trylle-cli
, example:
npx trylle-cli version
. The rest of documentation will use
try
as a reference.
Other ways to get the binary:
undefined
尽可能使用本地的
trylle-cli
try
二进制文件。如果它不在PATH中,执行:
bash
npm i -g @trylle/trylle-cli
一次性命令可通过
npx trylle-cli
运行,例如:
npx trylle-cli version
。 后续文档将以
try
作为参考。
获取二进制文件的其他方式:
undefined

Python Way

Python 方式

uv tool install trylle-cli
uv tool install trylle-cli

Rust Way (slow and will build from source)

Rust 方式(速度慢,将从源码构建)

cargo install trylle-cli
undefined
cargo install trylle-cli
undefined

2. Core usage

2. 核心用法

Important: CLI is tailored for humans to use, so you should add
--json
flag for agentic usage of commands.
  1. Check authentication with
    try auth status --json
    . Never run
    try auth token --show
    or print bot tokens unless the user explicitly requests the secret material and the environment can handle it safely.
  2. Resolve context with
    try repo context --json
    inside a checkout. Outside a checkout, pass
    -R OWNER/NAME
    to commands that support it or pass
    OWNER/NAME
    positionally to
    try repo view
    ,
    clone
    , and similar repository commands.
  3. Before a write, run
    try <group> <command> --help
    , validate identifiers and the intended scope, then execute only the requested mutation.
  4. Re-read the affected resource. Return a web URL with
    try browse repo|pr|issue
    when it helps the user continue.
重要提示:CLI是为人类使用设计的,因此在Agent调用命令时应添加
--json
参数。
  1. 使用
    try auth status --json
    检查认证状态。除非用户明确要求查看机密内容且环境安全,否则切勿运行
    try auth token --show
    或打印机器人令牌。
  2. 在代码检出目录内,使用
    try repo context --json
    解析上下文。在检出目录外,对支持该参数的命令传递
    -R OWNER/NAME
    ,或在
    try repo view
    clone
    等仓库命令中按位置传递
    OWNER/NAME
  3. 在执行写入操作前,运行
    try <group> <command> --help
    ,验证标识符和预期范围,然后仅执行请求的变更操作。
  4. 重新读取受影响的资源。当有助于用户继续操作时,使用
    try browse repo|pr|issue
    返回网页URL。

Route the task

任务路由

  • Repositories and daily context: use
    try status
    for current user's summary and
    try repo
    .
  • Pull requests and reviews: use
    try pr
    .
  • Issue triage: use
    try issue
    .
  • Dependent branches and pull requests: use
    try stack
    .
  • CI status and logs: use
    try ci
    .
  • Repository or organization configuration: use
    try actions
    or
    try org
    .
  • Accounts and operations: use
    try profile
    ,
    try ssh-key
    ,
    try automation
    , or
    try bot
    .
  • Resource links and uncovered public endpoints: use
    try browse
    or
    try api
    .
  • Local AI and review helpers: use
    try ai
    ,
    try explain
    ,
    try draft
    , or
    try diff
    .
Read references/command-catalog.md for the complete command map and exact argument patterns. Read references/workflows.md when creating or publishing a repository, opening or reviewing a pull request, triaging issues, handling stacks, diagnosing CI, or changing secrets and settings.
  • 仓库和日常上下文:使用
    try status
    查看当前用户摘要,使用
    try repo
    操作仓库。
  • 拉取请求和评审:使用
    try pr
  • 问题分类:使用
    try issue
  • 依赖分支和拉取请求:使用
    try stack
  • CI状态和日志:使用
    try ci
  • 仓库或组织配置:使用
    try actions
    try org
  • 账户和操作:使用
    try profile
    try ssh-key
    try automation
    try bot
  • 资源链接和未覆盖的公开端点:使用
    try browse
    try api
  • 本地AI和评审助手:使用
    try ai
    try explain
    try draft
    try diff
阅读references/command-catalog.md获取完整命令映射和精确参数模式。在创建或发布仓库、开启或评审拉取请求、分类问题、处理堆叠分支、诊断CI或修改密钥和设置时,阅读references/workflows.md

Safety and output rules

安全与输出规则

  • Treat repository deletion, PR merging or closing, issue closing, label replacement, key deletion, automation toggles, token minting, and secret changes as consequential operations. Show the exact target and inspect current state first.
  • Keep credentials out of command literals, logs, files, commit messages, and chat. Use pre-existing environment variables for secret values and unset temporary variables afterward.
  • Prefer
    --body-file
    to complex inline PR, review, issue, or comment bodies.
  • Use
    --json
    whenever available. Human output is intended for terminal reading and may change formatting.
  • Do not guess unsupported flags. The installed CLI's
    --help
    output is the source of truth.
  • Do not use
    try api
    when a first-class command exists. For raw calls, use only the public
    /v1
    API path needed for the task.
  • 将仓库删除、PR合并或关闭、问题关闭、标签替换、密钥删除、自动化开关切换、令牌生成和密钥修改视为重大操作。先显示确切目标并检查当前状态。
  • 避免在命令字面量、日志、文件、提交消息和聊天中泄露凭据。使用预先存在的环境变量存储机密值,使用后清除临时变量。
  • 对于复杂的PR、评审、问题或评论内容,优先使用
    --body-file
    参数。
  • 尽可能使用
    --json
    参数。面向人类的输出专为终端阅读设计,格式可能会变化。
  • 不要猜测不支持的参数。已安装CLI的
    --help
    输出是权威来源。
  • 当有原生命令可用时,不要使用
    try api
    。对于原始调用,仅使用任务所需的公开
    /v1
    API路径。

Installing or update the skill

安装或更新技能

If some of the skill files are missing or CLI reference map is outdated, use commands to update the skill:
undefined
如果部分技能文件缺失或CLI参考映射过时,使用以下命令更新技能:
undefined

add

添加

npx skills add trylle-labs/skills
npx skills add trylle-labs/skills

update

更新

npx skills update trylle-labs/skills --skill trylle-cli

Or even using `uv`:
uvx upd-skill -g trylle-labs/trylle-cli
undefined
npx skills update trylle-labs/skills --skill trylle-cli

或者使用`uv`:
uvx upd-skill -g trylle-labs/trylle-cli
undefined

Current CLI gotchas

当前CLI注意事项

  • Repository inference depends on a recognizable git remote. Pass
    -R OWNER/NAME
    explicitly when inference is ambiguous.
  • try pr current --json
    exits nonzero when the current branch has no open PR instead of returning JSON
    null
    . Use
    try repo context --json
    when absence is an expected state.
  • try pr review
    requires exactly one of
    --approve
    ,
    --request-changes
    , or
    --comment
    .
  • try issue label --set
    replaces the complete label set;
    --add
    and
    --remove
    preserve unrelated labels.
  • try stack submit
    pushes the current branch to
    origin
    before creating the pull request.
  • On CLI version 1.0.0,
    try ci logs --follow
    and
    try ci watch
    return the current log payload rather than continuously polling. Re-run a read command when fresh state is required.
  • List filters such as PR author and issue labels may be applied to the returned page. Increase the page size or paginate before concluding that no matching item exists.
  • 仓库识别依赖可识别的git远程仓库。当识别结果不明确时,显式传递
    -R OWNER/NAME
  • 当当前分支没有开启的PR时,
    try pr current --json
    会以非零状态退出,而非返回JSON
    null
    。当预期可能不存在PR时,使用
    try repo context --json
  • try pr review
    必须指定
    --approve
    --request-changes
    --comment
    中的一个。
  • try issue label --set
    会替换完整的标签集;
    --add
    --remove
    会保留无关标签。
  • try stack submit
    在创建拉取请求前会将当前分支推送到
    origin
  • 在CLI 1.0.0版本中,
    try ci logs --follow
    try ci watch
    会返回当前日志内容,而非持续轮询。需要最新状态时重新运行读取命令。
  • 列表过滤器(如PR作者和问题标签)可能仅应用于返回的分页内容。在得出无匹配项的结论前,增加分页大小或进行分页查询。