youmind

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

YouMind CLI Skill

YouMind CLI Skill

Interact with the YouMind API to manage boards, crafts, notes, picks, and other content through the
youmind
CLI.
通过
youmind
CLI与YouMind API交互,管理看板、创意作品、笔记、精选内容及其他内容。

Installation

安装

bash
npm install -g @youmind-ai/cli
To verify installation:
youmind
(should print usage info).
If the command is not found, install it first before proceeding.
bash
npm install -g @youmind-ai/cli
验证安装:执行
youmind
命令(应打印使用信息)。
如果未找到该命令,请先完成安装再继续操作。

Authentication

身份认证

Set the API key as environment variable:
bash
export YOUMIND_API_KEY=sk-ym-xxx
Or pass per-command with
--api-key sk-ym-xxx
.
将API密钥设置为环境变量:
bash
export YOUMIND_API_KEY=sk-ym-xxx
或者在每个命令中通过
--api-key sk-ym-xxx
参数传递。

Commands

命令

Three commands following a discover → inspect → execute workflow:
遵循“发现→查看→执行”流程的三个命令:

1. Search — Discover Available APIs

1. 搜索 — 发现可用API

bash
youmind search [query]
  • Without query: list all available API endpoints
  • With query: filter APIs by name or description (e.g.,
    search board
    ,
    search craft
    )
  • Output: JSON array of
    { name, summary }
    objects
bash
youmind search [query]
  • 不带查询词:列出所有可用API接口
  • 带查询词:按名称或描述筛选API(例如:
    search board
    search craft
  • 输出:包含
    { name, summary }
    对象的JSON数组

2. Info — Inspect API Schema

2. 信息 — 查看API Schema

bash
youmind info <name>
  • Returns the full schema including request body and response schema
  • All
    $ref
    references are resolved inline
  • Use this to understand required parameters before calling an API
bash
youmind info <name>
  • 返回完整的Schema,包括请求体和响应Schema
  • 所有
    $ref
    引用将被内联解析
  • 在调用API前,使用此命令了解所需参数

3. Call — Execute an API

3. 调用 — 执行API

bash
youmind call <name> [params]
Requires authentication. Three ways to pass parameters:
bash
undefined
bash
youmind call <name> [params]
需要身份认证。有三种传递参数的方式:
bash
undefined

Key-value pairs

键值对形式

youmind call createBoard --name "My Board"
youmind call createBoard --name "My Board"

JSON string

JSON字符串形式

youmind call createBoard '{"name":"My Board"}'
youmind call createBoard '{"name":"My Board"}'

Stdin pipe

标准输入管道形式

echo '{"name":"My Board"}' | youmind call createBoard
undefined
echo '{"name":"My Board"}' | youmind call createBoard
undefined

Workflow

工作流程

To accomplish a task with the YouMind API:
  1. Search for relevant APIs:
    youmind search <keyword>
  2. Inspect the API schema:
    youmind info <apiName>
  3. Call the API with correct parameters:
    youmind call <apiName> [params]
使用YouMind API完成任务的步骤:
  1. 搜索相关API:
    youmind search <keyword>
  2. 查看API Schema:
    youmind info <apiName>
  3. 调用API并传入正确参数:
    youmind call <apiName> [params]

Example: Create a board and add a note

示例:创建看板并添加笔记

bash
undefined
bash
undefined

Find board-related APIs

查找看板相关API

youmind search board
youmind search board

Check createBoard schema

查看createBoard的Schema

youmind info createBoard
youmind info createBoard

Create the board

创建看板

youmind call createBoard --name "Research Notes"
youmind call createBoard --name "Research Notes"

Find note APIs and create a note

查找笔记API并创建笔记

youmind search note youmind info createNote youmind call createNote '{"title":"First Note","boardId":"..."}'
undefined
youmind search note youmind info createNote youmind call createNote '{"title":"First Note","boardId":"..."}'
undefined

Global Options

全局选项

OptionDescription
--api-key <key>
API key (overrides
YOUMIND_API_KEY
env var)
--endpoint <url>
API endpoint (default:
https://youmind.com
)
选项描述
--api-key <key>
API密钥(覆盖
YOUMIND_API_KEY
环境变量)
--endpoint <url>
API端点(默认值:
https://youmind.com