c456-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

C456 CLI(c456-cli)

C456 CLI (c456-cli)

在终端通过
c456
调用 C456 的 HTTP API v1,供 Agent 将内容写入/查询 C456,而无需在对话中手写原始 REST 细节。
Call C456's HTTP API v1 via
c456
in the terminal, allowing Agents to write/query content in C456 without manually writing raw REST details in conversations.

安装 CLI

Install the CLI

未安装时可用
npx c456-cli …
bunx c456-cli …
;已全局安装则直接
c456
Use
npx c456-cli …
or
bunx c456-cli …
if not installed; use
c456
directly if installed globally.

安装本技能(给其他仓库)

Install This Skill (for Other Repositories)

在目标项目根目录执行(按需加
-g
装到用户目录、
--agent cursor
指定客户端):
bash
npx skills add xiaohui-zhangxh/c456-cli --skill c456-cli -y
若已克隆 c456-cli 仓库,可在该仓库根目录:
bash
npx skills add . --skill c456-cli -y
列出远程包内可用技能而不安装:
npx skills add xiaohui-zhangxh/c456-cli -l
Run the following in the root directory of the target project (add
-g
to install to the user directory, or
--agent cursor
to specify the client as needed):
bash
npx skills add xiaohui-zhangxh/c456-cli --skill c456-cli -y
If you have cloned the c456-cli repository, run the following in the root directory of that repository:
bash
npx skills add . --skill c456-cli -y
List available skills in the remote package without installing:
npx skills add xiaohui-zhangxh/c456-cli -l

鉴权与站点

Authentication and Site

方式说明
API Key
c456 config set-key <token>
或环境变量
C456_API_KEY
站点根 URL默认
https://c456.com
;自托管用
c456 config set-url <url>
C456_URL
,或单次命令
c456 -B <url> …
短选项冲突:子命令里的
-k
表示收录类型(kind)
不要
-k
传 API Key。Key 仅通过
config
/
C456_API_KEY
-B
-u
:根级
-B
/
--base-url
表示 C456 站点根地址
intake
等子命令里的
-u
常表示「目标资源 URL」
(如 tool/channel 的链接),不要混用。
MethodDescription
API Key
c456 config set-key <token>
or the environment variable
C456_API_KEY
Site Root URLDefaults to
https://c456.com
; for self-hosted instances, use
c456 config set-url <url>
,
C456_URL
, or the one-time command
c456 -B <url> …
Short Option Conflict: In subcommands,
-k
stands for intake type (kind)
. Do not use
-k
to pass the API Key. The Key can only be set via
config
/
C456_API_KEY
.
-B
vs
-u
: The root-level
-B
/
--base-url
refers to the C456 site root address; in subcommands like
intake
,
-u
usually means "target resource URL"
(e.g., links to tools/channels), do not confuse them.

Agent 执行方式

Agent Execution Method

  1. 需要真实读写 C456 时,在沙箱/终端中运行
    c456
    子命令,并解析其标准输出(含部分命令附带的
    --- JSON ---
    段)。
  2. 非交互场景为
    intake delete
    等加
    -f
    /
    --force
    ,避免等待终端确认(删除前仍应确认用户意图)。
  3. 勿在日志或回复中回显完整 API Key。
  4. 严禁编造参数:只能使用
    c456 <command> --help
    (或本仓库源码/文档)明确存在的选项;不确定时先运行
    --help
    再行动。
  1. When real read/write operations on C456 are required, run
    c456
    subcommands in the sandbox/terminal and parse their standard output (including the
    --- JSON ---
    section attached to some commands).
  2. Add
    -f
    /
    --force
    to commands like
    intake delete
    in non-interactive scenarios to avoid waiting for terminal confirmation (still confirm the user's intent before deletion).
  3. Do not echo the full API Key in logs or responses.
  4. Never fabricate parameters: Only use options explicitly documented in
    c456 <command> --help
    (or the source code/docs of this repository); run
    --help
    first if unsure.

命令速查

Command Quick Reference

配置
  • c456 config set-key <token>
    /
    c456 config set-url <url>
    /
    c456 config show
    /
    c456 config reset
收录
intake
  • 新建:
    c456 intake new [-k signal|tool|channel] [-u <url>] [-t 标题] [-b 正文]
  • 查看 / 更新 / 删除 / 列表:
    c456 intake show <id>
    ·
    c456 intake update <id> …
    ·
    c456 intake delete <id> [-f]
    ·
    c456 intake list [-k] [-q] [-p 页] [-n 每页]
搜索
search
  • c456 search signals -q "…" [-k kind] [-l n]
  • c456 search playbooks -q "…" [-l n]
打法
playbook
  • 新建:
    c456 playbook new -t "标题" [-b 'Markdown'] [--ref-intake id …] [--ref-playbook id …]
  • 另有
    show
    /
    list
    /
    update
    /
    delete
    (与
    c456 playbook --help
    一致)
资料
fetch
  • c456 fetch profile -u <url> -p <profile_id>
    profile_id
    必填;否则 API 返回「不支持的资料类型」)
  • c456 fetch detect -u <url>
fetch detect
说明:
  • 会调用
    POST /api/v1/intakes
    创建
    kind=tool
    的收录,并在服务端尝试自动解析资料段。
  • 它不是
    fetch profile
    profile_id
    自动推断替代品;抓取社交账号主页(如 YouTube)应直接用:
    c456 fetch profile -p social_account -u "<url>"
profile_id
类型含义:
  • link_product
    :产品/官网等普通链接页(解析 name/icon/description)
  • package_registry
    :软件包页(npm、RubyGems 等)
  • github_origin
    :代码仓库(GitHub/GitLab/Gitee)
  • social_account
    :社交账号主页/频道(YouTube/抖音/小红书等)
Configuration
  • c456 config set-key <token>
    /
    c456 config set-url <url>
    /
    c456 config show
    /
    c456 config reset
Intake
intake
  • Create:
    c456 intake new [-k signal|tool|channel] [-u <url>] [-t title] [-b content]
  • View / Update / Delete / List:
    c456 intake show <id>
    ·
    c456 intake update <id> …
    ·
    c456 intake delete <id> [-f]
    ·
    c456 intake list [-k] [-q] [-p page] [-n per-page]
Search
search
  • c456 search signals -q "…" [-k kind] [-l n]
  • c456 search playbooks -q "…" [-l n]
Playbook
playbook
  • Create:
    c456 playbook new -t "title" [-b 'Markdown'] [--ref-intake id …] [--ref-playbook id …]
  • Additional commands:
    show
    /
    list
    /
    update
    /
    delete
    (consistent with
    c456 playbook --help
    )
Fetch
fetch
  • c456 fetch profile -u <url> -p <profile_id>
    (
    profile_id
    is required; otherwise the API returns "unsupported profile type")
  • c456 fetch detect -u <url>
Notes on
fetch detect
:
  • It calls
    POST /api/v1/intakes
    to create an intake with
    kind=tool
    , and the server will attempt to automatically parse the data section.
  • It is not a substitute for automatically inferring the
    profile_id
    for
    fetch profile
    ; for social account homepages (e.g., YouTube), directly use:
    c456 fetch profile -p social_account -u "<url>"
    .
Meaning of
profile_id
types:
  • link_product
    : Product/official website and other ordinary link pages (parses name/icon/description)
  • package_registry
    : Software package pages (npm, RubyGems, etc.)
  • github_origin
    : Code repositories (GitHub/GitLab/Gitee)
  • social_account
    : Social account homepages/channels (YouTube/Douyin/Xiaohongshu, etc.)

更完整的说明

More Complete Documentation

见各命令的
--help
与本仓库
README.md
DEVELOPMENT.md
See the
--help
of each command and the
README.md
and
DEVELOPMENT.md
files in this repository.

分页参数(list 类命令)

Pagination Parameters (List Commands)

  • -p, --page
    : 1-10000
  • -n, --per-page
    : 1-100(默认 20;服务端会截断到最大值)
  • -p, --page
    : 1-10000
  • -n, --per-page
    : 1-100 (default 20; the server will truncate it to the maximum value)

内容语法(富文本)

Content Syntax (Rich Text)

CLI
--help
中会用
type: <type_name>
标注字段类型;Agent 在生成/写入内容时,必须按下表选择语法与约束:
  • markdown_kramdown
    references/content-syntax-kramdown.md
The CLI
--help
uses
type: <type_name>
to mark field types; when generating/writing content, Agents must select the syntax and constraints according to the following table:
  • markdown_kramdown
    references/content-syntax-kramdown.md