Skip to content
Syno Package Land
Language: English

ctl overview

synopkgland ctl runs task-level commands on Apps installed on a NAS, from a terminal, a script or an AI agent. It ships with @synopackageland/cli, runs on your computer, and talks to DSM over HTTPS.

  • A command exists only if the App’s developer declared it in ctl.commands. ctl cannot call other methods, URLs or scripts.
  • The identity is the DSM account you sign in with. ctl has no identity or privilege of its own.
  • Every call goes through the App’s own backend checks, the same path the App’s UI uses.
UseExample
An AI agent operates an AppDiscover commands and schemas with ctl list --json, then run ctl myapp notes add --text "Buy milk" --yes.
A script or CI checkctl myapp status --host nas after a deploy, branching on the exit code.
Several NAS machines--host a,b or --all-hosts; one result per host.
A long taskA job command starts once and waits; --no-wait returns the accepted job.
A bulk read or a file sendThe paginate, ndjson and upload flows, with fixed limits.

ctl does not install or upgrade packages (use deploy), cannot call UI-only methods, and never acts without a DSM sign-in.

  1. host add signs in to DSM and stores the session and SynoToken in the OS credential store.
  2. ctl list asks DSM for the installed packages with your session. You approve the batch; ctl then reads each App’s private description, validates it and pins its hash.
  3. A run validates your parameters against the command’s JSON Schema locally, requires --yes for writes, and sends {method, params} to the App’s fixed CGI.
  4. The App checks the DSM session, the App entry, the method permission and its own handler rules (owner, ACL, grants).
Terminal window
synopkgland host add nas --url https://nas.example:5001 --username alice
synopkgland ctl list --host nas --json
synopkgland ctl myapp greeting set --text Hello --host nas --yes
NeedDetail
CLIThe latest public CLI release.
AppBuilt with the latest public CLI and templates with their pinned SDK, with ctl.enabled: true and explicit commands. Automatic descriptions cover the native SDK backends (Go, Node.js, Python, Rust).
NASThe DSM HTTPS port reachable from your computer, and an account that may open the App.
ComputerA usable OS credential store (Keychain, Credential Manager, or Secret Service on Linux). There is no plaintext fallback.

To make an App controllable, see Expose App commands. To call commands, see Run ctl commands; what ctl checks, trusts and refuses is in ctl security. To write the API description by hand for a binary or Compose App, use API description v1.