fnos-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesefnOS
fnOS
使用 管理设备。安装与升级都是显式操作;执行前检查实际版本和命令帮助。
<!-- standalone:start -->fnos-cliUse to manage devices. Installation and upgrades are explicit operations; check the actual version and command help before executing anything.
<!-- standalone:start -->fnos-cli独立 Skill 启动器
Standalone Skill Launcher
从当前加载的 Skill 目录定位 (macOS/Linux)或 (Windows),使用绝对路径。将本 Skill 示例中的 替换为该路径,保留每个参数及其引号。先执行 和相关 。
scripts/fnos-cliscripts/fnos-cli.cmdfnos-cli--version--help首次执行自动下载本机所需的一份固定版本 CLI;提示写入 stderr,成功后复用当前用户缓存。独立执行无需 Node/npm 或全局 CLI。macOS/Linux 需要系统的 curl、gzip、SHA-256 工具(sha256sum 或 shasum)及常用 shell 工具。下载失败、缓存损坏或镜像配置请读首次运行指南,按其中步骤恢复后重试原命令。更新 Skill 是显式操作,已有入口不自动升级。
Windows 可在 PowerShell 5.1 或 7 中调用 ; 入口使用系统 Windows PowerShell。按当前 shell 规则传递参数,PowerShell 的 JSON 参数建议用单引号。Windows 使用系统 .NET 下载和解压,不需要 Unix 工具;缺少 PowerShell 或执行策略阻止启动时先处理本机环境,再重试原入口。
<!-- standalone:end -->scripts/fnos-cli.ps1.cmdLocate (macOS/Linux) or (Windows) from the currently loaded Skill directory, using an absolute path. Replace in this Skill's examples with that path, preserving every argument and its quoting. First run and the relevant .
scripts/fnos-cliscripts/fnos-cli.cmdfnos-cli--version--helpOn first execution, the required fixed-version CLI for the local machine is downloaded automatically; the prompt is written to stderr, and the current user's cache is reused after a successful download. Standalone execution does not require Node/npm or a global CLI. macOS/Linux require system curl, gzip, SHA-256 utilities (sha256sum or shasum), and common shell utilities. If the download fails, the cache is corrupted, or the mirror configuration needs adjustment, read the First-Run Guide, follow the recovery steps, and retry the original command. Updating the Skill is an explicit operation; existing entry points are not upgraded automatically.
Windows can invoke in PowerShell 5.1 or 7; the entry point uses system Windows PowerShell. Pass arguments according to the current shell rules; single quotes are recommended for JSON parameters in PowerShell. Windows uses system .NET for downloading and extraction and does not require Unix utilities. If PowerShell is missing or the execution policy prevents startup, resolve the local environment first, then retry the original entry point.
<!-- standalone:end -->scripts/fnos-cli.ps1.cmd授权与连接
Authorization and Connection
登录、profile、连接失败及授权恢复先读连接入口和 OAuth 指南。字段约定见公共约定,模块使用方式见索引。
- Agent 在用户指定的目标和 profile 执行 (Codex 用
login --authorize-only --agent-name '<agent 名>'),CLI 自动生成codex;把返回链接交给用户。{本机名}-{agent 名} - 用户自行在浏览器登录并授权,把一次性 code 主动发回。用户无需运行终端。
- Agent 在同一执行主机、系统用户、配置环境、profile 和连接参数下执行 。确认令牌已保存并执行只读验证后才报告连接成功。
login --code
bash
fnos-cli --profile home --host <host> --port <port> login --authorize-only --agent-name '<agent>'
fnos-cli --profile home --host <host> --port <port> login --code '<code>'
fnos-cli --profile home system info用户密码、2FA 和浏览器确认由用户处理。只接收用户主动发来的 code,不复述、额外落盘或转发。code 可能留在聊天、工具调用和进程参数中;不能承诺无留存。token 与 PKCE verifier 留在 CLI 受控存储,不输出到聊天。
For login, profiles, connection failures, and authorization recovery, first read the Connection Entry and OAuth Guide. See Common Conventions for field conventions and the Index for module usage.
- The Agent executes on the target and profile specified by the user (Codex uses
login --authorize-only --agent-name '<agent name>'); the CLI automatically generatescodex. Provide the returned link to the user.{local-machine-name}-{agent-name} - The user signs in and authorizes access in the browser and proactively sends the one-time code back. The user does not need to run a terminal.
- The Agent executes using the same execution host, system user, configuration environment, profile, and connection parameters. Only report a successful connection after confirming that the token has been saved and performing a read-only verification.
login --code
bash
fnos-cli --profile home --host <host> --port <port> login --authorize-only --agent-name '<agent>'
fnos-cli --profile home --host <port> login --code '<code>'
fnos-cli --profile home system infoThe user handles their password, 2FA, and browser confirmation. Only accept a code that the user proactively sends; do not repeat, separately persist, or forward it. The code may remain in chat, tool calls, and process arguments, so no guarantee can be made that it will not be retained. The token and PKCE verifier remain in CLI-controlled storage and are not output to chat.
使用规则
Usage Rules
- 两产品的命令、配置、profile 与登录状态独立。新版需重新授权,不读取或迁移旧登录数据,也不自动删除旧凭据。
- 只使用本产品的 配置变量。没有显式连接参数时,仅恢复当前产品、当前 profile 的目标;无记录时使用
FNOS_CLI_*。localhost:5666 - 文件写操作默认使用具体 路径。高风险操作须核实用户意图及命令的
/vol{n}/...要求;不把设备验收变成默认写操作。--yes - 仅对内置审计过的只读端点免除
raw;未知端点名称不能证明只读。--yes - CLI 和 Skill 来自同一版本的包。首次安装、升级或公开文档变化后检查实际 和相关
--version,不假定--help已完成传播。latest
- The two products have independent commands, configuration, profiles, and login states. The new version requires reauthorization; it neither reads nor migrates old login data and does not automatically delete old credentials.
- Use only the current product's configuration variables. Without explicit connection parameters, resolve only the target for the current product and profile. If no saved record exists, use
FNOS_CLI_*.localhost:5666 - File write operations default to explicit paths. For high-risk operations, verify the user's intent and the command's
/vol{n}/...requirement; do not make device acceptance testing perform write operations by default.--yes - is exempt from
rawonly for built-in, audited, read-only endpoints. An unknown endpoint name does not prove that it is read-only.--yes - The CLI and Skill come from the same package version. After the initial installation, an upgrade, or a change to public documentation, check the actual and relevant
--version; do not assume that the latest version has been rolled out.--help
命令与任务一览
Command and Task Overview
- 连接与授权: 登录、选择连接目标或 profile、排查登录状态和连接问题,以及应用通用安全规则时使用。
- 文件: 列出或搜索文件、上传本地文件、检查共享目录和 ACL,或判断当前用户目录与 NAS 路径语义时使用。
- 照片: 浏览相册扫描目录、搜索照片、查看详情,以及获取缩略图或原图预览地址时使用。
- 应用中心: 管理已安装应用、应用中心安装、FPK 软件包、更新、应用入口与生命周期操作。
- Docker: 查看和管理 Docker 镜像、容器、Compose 项目及长时间运行的生命周期操作。
- 下载: 列出、搜索、创建和控制下载任务,查看任务文件、统计和状态变化。
- 百度网盘: 检查百度网盘授权、容量、云端文件、分享保存、NAS 传输和定时同步。
- 日志: 浏览筛选日志、列举日志模块、清除或导出记录、配置归档,并复制或取消诊断日志。
- 监控: 查看 CPU、内存、网络、磁盘、进程、服务、电池、风扇、GPU/NPU 与蜂鸣器告警等运行时指标。
- 网络: 管理网络服务开关,包括开启或关闭 SSH,并确认写操作的授权要求。
- 存储: 查看存储池、磁盘与 SMART 数据,或执行挂载、扩容、磁盘替换、格式化等高风险存储写操作。
- 系统与电源: 查看静态系统标识、机型、版本、卷、硬件和电源计划,或重启、关闭设备。
- 用户与权限: 查看用户、组、登录设备和当前权限,管理用户,或选择正确的已授权 profile。
- Connection and Authorization: Use for login, selecting a connection target or profile, troubleshooting login state and connection issues, and applying general safety rules.
- Files: Use to list or search for files, upload local files, inspect shared directories and ACLs, or determine the semantics of the current user's directories and NAS paths.
- Photos: Use to browse album scan directories, search for photos, view details, and obtain thumbnail or full-resolution preview URLs.
- App Center: Use to manage installed apps, install from the App Center, handle FPK packages and updates, and manage app launch entries and lifecycle operations.
- Docker: Use to view and manage Docker images, containers, Compose projects, and long-running lifecycle operations.
- Downloads: Use to list, search for, create, and control download tasks, and inspect task files, statistics, and status changes.
- Baidu Netdisk: Use to check Baidu Netdisk authorization and capacity, manage cloud files and shared saves, and configure NAS transfers and scheduled synchronization.
- Logs: Use to browse and filter logs, list log modules, clear or export records, configure archiving, and copy or cancel diagnostic logs.
- Monitoring: Use to view runtime metrics such as CPU, memory, networking, disks, processes, services, battery, fans, GPU/NPU, and buzzer alerts.
- Networking: Use to manage network service toggles, including enabling or disabling SSH, and confirm authorization requirements for write operations.
- Storage: Use to view storage pools, disks, and SMART data, or perform high-risk storage write operations such as mounting, expansion, disk replacement, and formatting.
- System and Power: Use to view static system identifiers, model, version, volumes, hardware, and power plans, or to reboot or shut down the device.
- Users and Permissions: Use to view users, groups, signed-in devices, and current permissions, manage users, or select the correct authorized profile.