Command reference
Copy as MarkdownThe command line of NeoDesk: every action of the web console, on top of API tokens.
This reference is made from the command table of the release 3.6.0-rc.5: 536 commands in 59 groups. Each group has a page with its commands, their arguments and flags, the permission each needs and the console route it calls.
neodesk <group> <action> [arguments] [flags]
neodesk <group> --help
neodesk login --url https://desk.example.comThe command line is the server binary under the name neodesk: the installers put it on the PATH, and the Docker images have it. neodesk-server cli works too. On Linux hosts the installer's menu and options are neodesk-setup; sudo neodesk without arguments and the installer's options, such as neodesk --update, reach it too. Where the NeoDesk desktop client is installed too, its options, such as --join and --service, and a join or support link on its own go to it (/usr/bin/neodesk). Sign in once with an API token. Make one in the console: account menu, API tokens. A token can do only what its permissions and its account allow, and a read-only token only reads.
API tokens
Make a token in the console: account menu, API tokens. The console shows it once. A token:
- holds at most the permissions of the account that made it, now and later: when the account loses a permission or is disabled, the token loses it too
- can be read only, expires after at most a year, and can be limited to some addresses or networks
- never signs in, changes its own account or shows the console's API key
- passes checks by role, changes accounts and access, and keeps server.config only when it carries every permission of its account
- reaches the server's secrets (the full backup and restore, the server's files, the advanced settings files, where scheduled backups go) only when it carries every permission of its account and may write
The address list checks the address the console sees. Behind a reverse proxy, set TRUST_PROXY to the proxy's address rather than true, and keep the console's port closed to everyone else. Otherwise a client can name any address in X-Forwarded-For.
For an AI agent, neodesk mcp serves the commands as MCP tools: read only, without the commands that show secrets or run something, unless you allow them. Give the agent a token of its own with only the permissions it needs.
Groups
| Group | What it is for | Commands |
|---|---|---|
| account | You: the account and permissions the token acts with | 3 |
| activity | What people did on devices: the activity agents report | 3 |
| agents | NeoDesk agent releases, templates and installer files | 7 |
| api-tokens | API tokens for scripts, this command line and AI agents | 4 |
| attestation | The server's performance test and its badge | 6 |
| audit | The audit log and the security overview | 4 |
| automation | Alert rules, alerts, queued device commands and alert mail | 13 |
| backups | Full backups, the backup schedule and restores | 10 |
| billing | Billing: packages, contracts, sessions, reports and the clock | 27 |
| branding | The console's look: logo, colors, profiles and fonts | 17 |
| cdap | CDAP devices, their widgets and commands | 10 |
| cdap-studio | CDAP Studio flows | 10 |
| chat | Chat search and files | 2 |
| client-branding | Name, logo and links the desktop clients show | 2 |
| cross-platform | What each device platform supports | 3 |
| dashboard | The numbers on the dashboard and the server status | 6 |
| dataguard | Data guard policies and the events devices report | 7 |
| device-control | Screen, keyboard, mouse, clipboard and terminal of a NeoDesk agent | 7 |
| device-files | Files on a device with a NeoDesk agent | 6 |
| device-groups | Device groups (manual and by tag) | 3 |
| device-tokens | Tokens that let a new device join without approval | 6 |
| devices | Devices: list, details, notes, tags, bans, connection settings | 31 |
| enrollment | Who may join, and devices waiting for approval | 7 |
| fleet | Fleet tasks, workflows, compliance and resources | 23 |
| folders | Folders that sort devices | 6 |
| generator | The support client generator: bundles and builds | 18 |
| guest-links | Guest links that let someone without an account connect | 3 |
| help-requests | Help requests sent from devices | 3 |
| inventory | Hardware and software inventory of devices | 2 |
| invites | Invites that add a computer to this server | 6 |
| keys | The server's key, the client settings and the QR code | 6 |
| languages | The console's languages and translations | 9 |
| mesh | MeshCentral devices, groups and recordings | 16 |
| network | Network checks: targets, monitoring, ping and port tests | 15 |
| organizations | Organizations with their users, devices and settings | 26 |
| pairing | Pairing codes for agents | 5 |
| panel-access | Which console sections and client features each account may use | 5 |
| policies | Organization policies and device attestation | 10 |
| registrations | Devices that asked to register | 7 |
| remote | Remote sessions in progress | 1 |
| remote-targets | RDP, VNC and SSH targets | 11 |
| reports | Reports and trends | 8 |
| resource-control | USB, disks, monitors and quotas on devices | 10 |
| restart | Pending server restarts after a change | 6 |
| roles | Roles and their permissions | 5 |
| scaling | Relay servers and scaling rules | 12 |
| server | The server: health, versions, resources, services and logs | 15 |
| settings | Server settings: mail, sign-in, addresses, enrollment, sessions | 28 |
| setup-guide | The setup guide a new install shows its first admin on the overview | 3 |
| strategies | Strategies: settings pushed to desktop clients | 7 |
| support | Quick support sessions | 7 |
| tags | Device tags | 3 |
| tenants | Tenants with their devices and users | 12 |
| tickets | Tickets with comments and attachments | 11 |
| toolkit | Small network and text tools | 8 |
| transfers | File transfers between the console and devices | 5 |
| updates | Server updates and the backups taken before them | 16 |
| user-groups | User groups | 4 |
| users | Console accounts: create, change, disable, delete | 10 |
Commands of the command line itself
| Command | What it does |
|---|---|
neodesk api |
Send any request to the console's API: neodesk api GET /api/stats |
neodesk completion |
Print a shell completion script: bash, zsh, fish or powershell |
neodesk config |
Show where the settings come from (never the token) |
neodesk describe |
Print every command with its arguments and permissions, as JSON or Markdown |
neodesk help |
Show help for a group or command: neodesk help devices list |
neodesk local |
Run a command of the server binary on this machine (backup, migrate, ...) |
neodesk login |
Save the console's address and an API token for the next commands |
neodesk logout |
Forget the saved token (--revoke also revokes it on the console) |
neodesk mcp |
Serve the commands as tools to an AI agent over MCP (stdio); read only unless --allow-writes |
neodesk version |
Print this command line's version (the server's: neodesk server info) |
neodesk whoami |
Show the account and the token the commands use |
Flags for every command
| Flag | What it does |
|---|---|
--url URL |
the console's address (or NEODESK_URL) |
--token-file FILE |
read the API token from a file (or NEODESK_TOKEN) |
--token TOKEN |
the API token; it shows in the process list, so prefer NEODESK_TOKEN or the config file |
--config FILE |
the config file (or NEODESK_CONFIG); default neodesk/config.json in the user's config folder |
--json |
print the server's answer as JSON |
-o, --output FILE |
save the answer to a file (downloads) |
-q key=value |
add a query parameter; repeat for more |
-f key=value |
add a text field to the request body |
-F key=json |
add a JSON value to the request body: a number, true or false, a list |
--data JSON |
the whole request body, or @file.json |
--file PATH |
the file to upload, for commands that take one |
-y, --yes |
do not ask before deleting or ending something |
--insecure |
do not check the console's certificate |
--ca-cert FILE |
trust this CA certificate for the console (or NEODESK_CA_CERT) |
--allow-http |
allow plain HTTP to another machine (or NEODESK_ALLOW_HTTP=1); the token is not encrypted then |
--timeout 60s |
how long to wait for an answer |
-v, --verbose |
print each request's method, address and status to standard error |
-h, --help |
help for the command |
Environment
| Variable | What it is |
|---|---|
NEODESK_URL |
the console's address |
NEODESK_TOKEN |
the API token |
NEODESK_CONFIG |
the config file |
NEODESK_CA_CERT |
a CA certificate to trust for the console |
NEODESK_ALLOW_HTTP |
1 allows plain HTTP to another machine |
Exit codes
| Code | Meaning |
|---|---|
| 0 | done |
| 1 | the server said no for another reason, or something unexpected went wrong |
| 2 | wrong command, argument or flag |
| 3 | no token, or the token was refused (HTTP 401) |
| 4 | the account or the token may not do this (HTTP 403) |
| 5 | nothing has that ID or address (HTTP 404) |
| 6 | the server refused the input or it clashes with what is there (HTTP 400, 409, 413, 422) |
| 7 | too many requests, try again later (HTTP 429) |
| 8 | the server failed (HTTP 5xx) |
| 9 | the console could not be reached, or its certificate was refused |
| 10 | the config file cannot be used |
The routes the command line leaves out are in Routes without a command.