10x-cli-guide
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese10x-cli Daily Usage Guide
10x-cli日常使用指南
This skill helps users work with after it is already installed and authenticated. If the user has not installed or authenticated yet, hand off to the 10x-cli-setup skill instead.
@przeprogramowani/10x-cli本技能帮助用户在已安装并完成认证后使用。如果用户尚未安装或完成认证,请转至10x-cli-setup技能。
@przeprogramowani/10x-cliStep 1: Detect the user's environment
步骤1:检测用户环境
Before giving any guidance, gather context silently — run these checks and remember the results. Do not print raw output to the user.
在提供任何指导之前,先静默收集上下文信息——运行以下检查并记录结果。不要向用户打印原始输出。
Operating system
操作系统
bash
echo "$OSTYPE" 2>/dev/null || echo "win32"Use the result to tailor path separators, shell syntax, and clipboard commands throughout your answers:
| OS | Shell | Home var | Clipboard | Temp dir |
|---|---|---|---|---|
macOS ( | zsh / bash | | | |
Linux ( | bash / zsh | | | |
Windows ( | PowerShell / cmd | | | |
bash
echo "$OSTYPE" 2>/dev/null || echo "win32"根据结果调整回答中的路径分隔符、Shell语法和剪贴板命令:
| 操作系统 | Shell环境 | 主目录变量 | 剪贴板命令 | 临时目录 |
|---|---|---|---|---|
macOS ( | zsh / bash | | | |
Linux ( | bash / zsh | | | |
Windows ( | PowerShell / cmd | | | |
Active AI tool
当前激活的AI工具
bash
10x doctor --json 2>/dev/null | head -1Also check which tool profile is configured:
bash
cat ~/.config/10x-cli/config.json 2>/dev/null || cat "$APPDATA/10x-cli/config.json" 2>/dev/null || echo "{}"If the config contains a key, that is the active profile. If not, the default is .
"tool"claude-codebash
10x doctor --json 2>/dev/null | head -1同时检查已配置的工具配置文件:
bash
cat ~/.config/10x-cli/config.json 2>/dev/null || cat "$APPDATA/10x-cli/config.json" 2>/dev/null || echo "{}"如果配置文件包含键,即为当前激活的配置文件。如果没有,默认是。
"tool"claude-codeCLI version
CLI版本
bash
10x --versionbash
10x --versionStep 2: Answer the user's question using the reference below
步骤2:参考以下内容回答用户问题
Use the environment context from Step 1 to personalize every answer. Always use the OS-appropriate shell syntax, paths, and commands. Never show macOS-specific commands to a Windows user or vice versa.
使用步骤1获取的环境上下文来个性化每个回答。始终使用适合对应操作系统的Shell语法、路径和命令。切勿向Windows用户展示macOS专属命令,反之亦然。
Command Reference
命令参考
10x get <ref>
— Fetch and apply lesson artifacts
10x get <ref>10x get <ref>
— 获取并应用课程工件
10x get <ref>The primary daily command. Fetches a lesson bundle from the API and writes skills, prompts, rules, and config templates to the project directory.
bash
10x get m1l1 # Fetch module 1, lesson 1
10x get m2l3 # Fetch module 2, lesson 3
10x get m1l1 --dry-run # Preview what would be written
10x get m1l1 --tool cursor # Use a different AI tool profile
10x get m1l1 --lang pl # Fetch Polish contentFiltering artifacts:
bash
10x get m1l1 --type skills # Only skills
10x get m1l1 --type skills --name code-review # One specific skill
10x get m1l1 --print --type skills --name code-review # Print to stdoutWhere artifacts land (depends on the active tool profile):
| Tool | Skills | Prompts | Rules file | Config templates |
|---|---|---|---|---|
| Claude Code | | | | |
| Cursor | | | | |
| GitHub Copilot | | | | |
| Codex CLI | | | | |
| Generic | | | | |
Re-applying a lesson overwrites skills and prompts if content changed, updates the rules sentinel block, but never overwrites config templates (they may contain user edits).
Switching lessons cleans up artifacts from the previous lesson that are not in the new one, keeps shared artifacts, and adds new ones.
日常使用的核心命令。从API获取课程包,并将技能、提示词、规则和配置模板写入项目目录。
bash
10x get m1l1 # 获取模块1,课程1
10x get m2l3 # 获取模块2,课程3
10x get m1l1 --dry-run # 预览将要写入的内容
10x get m1l1 --tool cursor # 使用其他AI工具配置文件
10x get m1l1 --lang pl # 获取波兰语内容过滤工件:
bash
10x get m1l1 --type skills # 仅获取技能
10x get m1l1 --type skills --name code-review # 获取指定的单个技能
10x get m1l1 --print --type skills --name code-review # 打印到标准输出工件存放位置(取决于当前激活的工具配置文件):
| 工具 | 技能 | 提示词 | 规则文件 | 配置模板 |
|---|---|---|---|---|
| Claude Code | | | | |
| Cursor | | | | |
| GitHub Copilot | | | | |
| Codex CLI | | | | |
| Generic | | | | |
重新应用课程会覆盖已更新的技能和提示词,更新规则标记块,但绝不会覆盖配置模板(它们可能包含用户编辑内容)。
切换课程会清理上一课程中不存在于新课程的工件,保留共享工件,并添加新工件。
10x list [module]
— Browse available content
10x list [module]10x list [module]
— 浏览可用内容
10x list [module]bash
10x list # Show all modules with lock state
10x list m1 # Show lessons in module 1Locked modules show their unlock date. Use this to see what is available before fetching.
bash
10x list # 显示所有模块及其锁定状态
10x list m1 # 显示模块1中的课程锁定的模块会显示解锁日期。在获取内容前可使用此命令查看可用内容。
10x doctor
— Diagnose problems
10x doctor10x doctor
— 诊断问题
10x doctorRuns 5 checks: Auth status, API connectivity, Config directory, CLI version, and tool directory presence.
bash
10x doctor # Human-readable output
10x doctor --json # Machine-readable for scriptingExit code 78 means at least one check failed.
运行5项检查:认证状态、API连通性、配置目录、CLI版本和工具目录是否存在。
bash
10x doctor # 人类可读格式输出
10x doctor --json # 机器可读格式,适用于脚本退出码78表示至少有一项检查未通过。
10x auth
— Session management
10x auth10x auth
— 会话管理
10x authbash
10x auth # Start magic-link login
10x auth --status # Check current session
10x auth --logout # Clear credentialsSessions refresh transparently — if a token is near expiry, the next command refreshes it automatically. You only need to re-auth manually if the session has fully expired.
bash
10x auth # 启动魔法链接登录
10x auth --status # 检查当前会话状态
10x auth --logout # 清除凭证会话会自动刷新——如果令牌即将过期,下一次命令会自动刷新它。仅当会话完全过期时才需要手动重新认证。
Switching Tools
切换工具
To change your AI tool (e.g., from Claude Code to Cursor):
bash
10x get m1l1 --tool cursorThe CLI will detect that artifacts from the old tool exist and offer two options:
- Migrate (default) — move all artifacts to the new tool's directories, remove the sentinel block from the old rules file.
- Delete — remove only 10x-managed artifacts from the old tool's directories. Your own files (e.g., ) are never touched.
.github/workflows/
The tool choice is saved in the config file ( on macOS/Linux, on Windows). Future commands will use the new tool without needing again.
~/.config/10x-cli/config.json%APPDATA%/10x-cli/config.jsonget--tool要更改AI工具(例如从Claude Code切换到Cursor):
bash
10x get m1l1 --tool cursorCLI会检测到旧工具的工件已存在,并提供两个选项:
- 迁移(默认)——将所有工件移动到新工具的目录,从旧规则文件中移除标记块。
- 删除——仅删除旧工具目录中由10x管理的工件。用户自己的文件(例如)绝不会被触碰。
.github/workflows/
工具选择会保存到配置文件中(macOS/Linux为,Windows为)。后续的命令会自动使用新工具,无需再添加参数。
~/.config/10x-cli/config.json%APPDATA%/10x-cli/config.jsonget--toolPlatform-Specific Tips
平台特定技巧
Windows
Windows
- Use PowerShell (not cmd.exe). The CLI outputs ANSI colors and Unicode symbols that render correctly in Windows Terminal + PowerShell but may garble in legacy cmd.
- npx works fine: — no global install needed. Node 20+ is the only prerequisite.
npx @przeprogramowani/10x-cli get m1l1 - Clipboard: Skills that copy to clipboard use on Windows. If a skill outputs a clipboard command, it will fall back silently if
clip.exeis unavailable.clip.exe - Config location: and
%APPDATA%\10x-cli\config.json. The CLI creates these automatically.%APPDATA%\10x-cli\auth.json - Path separators: The CLI uses Node's internally, so forward slashes in command output (like
path.join()) work fine on Windows — no need to convert them..claude/skills/code-review/SKILL.md
- 使用PowerShell(而非cmd.exe)。CLI输出的ANSI颜色和Unicode符号在Windows Terminal + PowerShell中能正确显示,但在旧版cmd中可能出现乱码。
- npx可以正常使用:——无需全局安装。仅需预先安装Node 20+版本。
npx @przeprogramowani/10x-cli get m1l1 - 剪贴板:涉及复制到剪贴板的技能在Windows上使用。如果某个技能输出剪贴板命令,若
clip.exe不可用会自动静默降级。clip.exe - 配置文件位置:和
%APPDATA%\10x-cli\config.json。CLI会自动创建这些文件。%APPDATA%\10x-cli\auth.json - 路径分隔符:CLI内部使用Node的,因此命令输出中的正斜杠(如
path.join())在Windows上可正常工作——无需转换。.claude/skills/code-review/SKILL.md
Linux
Linux
- Clipboard: Skills use or
xclip -selection clipboard. If neither is installed, clipboard operations fail silently. Install withxsel --clipboard(Debian/Ubuntu) orsudo apt install xclip(Fedora).sudo dnf install xclip - Config location: (respects
~/.config/10x-cli/if set).$XDG_CONFIG_HOME
- 剪贴板:技能使用或
xclip -selection clipboard。如果两者均未安装,剪贴板操作会静默失败。可通过xsel --clipboard(Debian/Ubuntu)或sudo apt install xclip(Fedora)安装。sudo dnf install xclip - 配置文件位置:(如果设置了
~/.config/10x-cli/则遵循该路径)。$XDG_CONFIG_HOME
macOS
macOS
- Clipboard: Skills use — works out of the box.
pbcopy - Config location: .
~/.config/10x-cli/
- 剪贴板:技能使用——开箱即用。
pbcopy - 配置文件位置:。
~/.config/10x-cli/
Troubleshooting
问题排查
When the user reports a problem, follow this sequence:
当用户报告问题时,请按照以下步骤操作:
1. Run doctor first
1. 先运行doctor命令
bash
10x doctorThis catches the most common issues. Read the output and address each failing check.
bash
10x doctor这可以排查大多数常见问题。读取输出并解决每一项未通过的检查。
2. Common problems and fixes
2. 常见问题及解决方法
| Symptom | Likely cause | Fix |
|---|---|---|
| "You're not signed in" | No auth or expired session | |
| "Session expired" | Token past expiry and auto-refresh failed | |
| API unreachable / timeout | Network issue or API outage | Check internet; retry in a few minutes |
| "Module is locked" | Content not yet released | |
| Running from wrong directory or wrong tool profile | |
"403 Forbidden" on | Module locked or no membership | Check |
Orphaned artifact prompt on | Switching tools mid-lesson | Choose "migrate" to move files, or "delete" to clean up |
| Permission denied writing files | Directory not writable | Check directory permissions; on POSIX: |
| 症状 | 可能原因 | 解决方法 |
|---|---|---|
| "您尚未登录" | 未认证或会话过期 | |
| "会话已过期" | 令牌过期且自动刷新失败 | |
| API无法访问/超时 | 网络问题或API故障 | 检查网络连接;几分钟后重试 |
| "模块已锁定" | 内容尚未发布 | |
找不到 | 在错误的目录运行命令或工具配置文件错误 | |
| 模块已锁定或无会员权限 | 查看 |
| 在课程中途切换工具 | 选择“迁移”移动文件,或“删除”清理旧工件 |
| 写入文件时权限被拒绝 | 目录不可写 | 检查目录权限;在POSIX系统上: |
3. Verbose mode for deeper debugging
3. 详细调试的 verbose 模式
bash
10x get m1l1 --verbose
10x doctor --verboseThis prints request/response diagnostics to stderr, useful for diagnosing API or network issues.
bash
10x get m1l1 --verbose
10x doctor --verbose这会将请求/响应诊断信息打印到标准错误输出,有助于排查API或网络问题。
4. Nuclear reset
4. 彻底重置
If config is corrupted:
On macOS/Linux:
bash
rm -rf ~/.config/10x-cli
10x authOn Windows (PowerShell):
powershell
Remove-Item -Recurse -Force "$env:APPDATA\10x-cli"
10x authThis clears auth and tool preference. The next recreates everything.
10x auth如果配置文件损坏:
在macOS/Linux上:
bash
rm -rf ~/.config/10x-cli
10x auth在Windows(PowerShell)上:
powershell
Remove-Item -Recurse -Force "$env:APPDATA\10x-cli"
10x auth这会清除认证信息和工具偏好。下一次运行会重新创建所有配置。
10x authImportant Principles
重要原则
- Answer with the user's OS and tool in mind. Never show to a Windows user. Never show
pbcopyto a macOS user.%APPDATA% - Run before speculating. It catches 80% of issues.
10x doctor - Don't guess command syntax from memory. If unsure about a flag or behavior, fetch the latest README:
https://raw.githubusercontent.com/przeprogramowani/10x-cli/refs/heads/master/README.md - Distinguish tool profile issues from CLI issues. If artifacts land in the wrong directory, it is a tool profile question. If the command itself fails, it is a CLI/auth/network question.
- 结合用户的操作系统和工具提供回答。切勿向Windows用户展示,也不要向macOS用户展示
pbcopy。%APPDATA% - 在猜测问题前先运行。它能排查80%的问题。
10x doctor - 不要凭记忆猜测命令语法。如果不确定某个参数或行为,请获取最新的README:
https://raw.githubusercontent.com/przeprogramowani/10x-cli/refs/heads/master/README.md - 区分工具配置文件问题和CLI问题。如果工件存放在错误目录,属于工具配置文件问题。如果命令本身执行失败,属于CLI/认证/网络问题。