SuperAPI AI Directory

fnos-cli

Deployment & operations

View repository

Updated 10-25 16:15

About this skill

fnOS

Use fnos-cli to manage devices. Installation and upgrades are explicit operations; check the actual version and command help before executing.

Standalone Skill launcher

Locate scripts/fnos-cli(macOS/Linux) or scripts/fnos-cli.cmd(Windows) from the currently loaded Skill directory, using absolute paths. Replace fnos-cli in this Skill's examples with that path, preserving each argument and its quoting. First run --version and the relevant --help。

On first execution, automatically download a fixed version of the CLI required by this machine; prompts are written to stderr, and on success the current user cache is reused. Standalone execution requires no Node/npm or global CLI. macOS/Linux requires the system curl, gzip, SHA-256 tools (sha256sum or shasum), and common shell tools. If the download fails, the cache is corrupted, or mirror configuration is needed, readFirst-Run Guide, follow its recovery steps, then retry the original command. Updating the Skill is an explicit operation; existing entry points do not auto-upgrade.

On Windows, you can invoke scripts/fnos-cli.ps1;.cmd in PowerShell 5.1 or 7; the entry point uses the system Windows PowerShell. Pass arguments according to current shell rules; for PowerShell JSON arguments, single quotes are recommended. Windows uses system .NET for downloading and extraction and does not require Unix tools; if PowerShell is missing or the execution policy blocks startup, fix the local environment first, then retry the original entry point.

Authorization and Connection

For login, profile, connection failures, and authorization recovery, first readConnection Entryand OAuth Guide. For field conventions, seeCommon Conventions, and for module usage, seeIndex。

  1. The Agent executes login --authorize-onlyon the target and profile specified by the user, and gives the returned link to the user.
  2. The user logs in and authorizes in the browser themselves, and proactively sends the one-time code back. The user does not need to run a terminal.
  3. The Agent executes login --codeunder the same execution host, system user, configuration environment, profile, and connection parameters. Report a successful connection only after confirming the token has been saved and performing a read-only verification.
fnos-cli --profile home --host <host> --port <port> login --authorize-only
fnos-cli --profile home --host <host> --port <port> login --code '<code>'
fnos-cli --profile home system info

The user handles their password, 2FA, and browser confirmation. Only accept codes proactively sent by the user; do not restate, additionally persist, or forward them. Codes may remain in chats, tool calls, and process arguments; no-retention cannot be promised. Tokens and PKCE verifiers remain in CLI-controlled storage and are not output to the chat.

Usage Rules

  • The two products' commands, configuration, profiles, and login states are independent. The new version requires re-authorization; it does not read or migrate old login data, nor automatically delete old credentials.
  • Use only this product's FNOS_CLI_* configuration variables. When there are no explicit connection parameters, restore only the current product's and current profile's target; if there is no record, use localhost:5666。
  • File write operations default to using a specific /vol{n}/... path. High-risk operations must verify the user's intent and the command's --yes requirements; do not turn device acceptance into default write operations.
  • raw Only built-in audited read-only endpoints are exempt from --yes; an unknown endpoint name cannot prove read-only.
  • The CLI and Skill come from the same versioned package. After first installation, upgrade, or public documentation changes, check the actual --version and the relevant --help, do not assume latest has completed propagation.

Commands and Tasks Overview

  • Connections and Authorization: Use when logging in, selecting a connection target or profile, troubleshooting login status and connection issues, and applying general security rules.
  • Files: Use when listing or searching files, uploading local files, checking shared directories and ACLs, or determining the current user directory and NAS path semantics.
  • Photos: Use when browsing album scan directories, searching photos, viewing details, and obtaining thumbnail or original image preview URLs.
  • App Center: Manage installed applications, App Center installations, FPK packages, updates, app entries, and lifecycle operations.
  • Docker: View and manage Docker images, containers, Compose projects, and long-running lifecycle operations.
  • Downloads: List, search, create, and control download tasks, and view task files, statistics, and status changes.
  • Baidu Netdisk: Check Baidu Netdisk authorization, capacity, cloud files, share saving, NAS transfers, and scheduled sync.
  • Logs: Browse and filter logs, list log modules, clear or export records, configure archiving, and copy or cancel diagnostic logs.
  • Monitoring: View runtime metrics such as CPU, memory, network, disks, processes, services, battery, fans, GPU/NPU, and buzzer alerts.
  • Network: Manage network service switches, including enabling or disabling SSH, and confirm authorization requirements for write operations.
  • Storage: View storage pools, disks, and SMART data, or perform high-risk storage write operations such as mounting, expanding, disk replacement, and formatting.
  • System and Power: View static system identifiers, model, version, volumes, hardware, and power plans, or restart or shut down the device.
  • Users and Permissions: View users, groups, login devices, and current permissions, manage users, or select the correct authorized profile.