NextCloud
The robomotion nextcloud CLI connects to NextCloud (self-hosted cloud storage) for file management, sharing, and administration. It uploads, downloads, lists, and deletes files; creates and manages shares with permissions; and administers users.
When to use
- Upload or download files between local filesystem and NextCloud
- List files, create folders, and manage file operations
- Create, list, and manage file/folder shares with permissions
- Administer NextCloud users
Prerequisites
robomotionCLI installed- Package installed:
robomotion install nextcloud - NextCloud instance URL and credentials configured via Robomotion vault
IMPORTANT: Session Mode Required for Multi-Step Operations
Each CLI command runs as a separate process — connection IDs from connect do NOT persist across calls.
You MUST use --session on connect and pass --session-id to all subsequent commands.
Workflow
- Install (once):
robomotion install nextcloud - Connect with session:
robomotion nextcloud nextcloud_connect --session --output json # → {"outClientId":"<client-id>","session_id":"<session-id>"} - Use the returned
client-idandsession-idin all subsequent commands:robomotion nextcloud nextcloud_upload --client-id "<client-id>" --local-path <file> --remote-path <dest> --session-id "<session-id>" --output json - Disconnect when done:
robomotion nextcloud nextcloud_disconnect --client-id "<client-id>" --session-id "<session-id>" --output json
Always append --output json to get structured JSON results.
Commands Reference
robomotion nextcloud upload_file --client-id --local-file-path --remote-path [--120] --session-id "<session-id>" --output jsonUploads a local file to NextCloudrobomotion nextcloud download_file --client-id --remote-path --save-to-path [--120] --session-id "<session-id>" --output jsonDownloads a file from NextCloud to local diskrobomotion nextcloud delete_file --client-id --remote-path --session-id "<session-id>" --output jsonDeletes a file or folder from NextCloudrobomotion nextcloud copy_file --client-id --from-path --to-path [--overwrite] --session-id "<session-id>" --output jsonCopies a file or folder to a new location on NextCloudrobomotion nextcloud move_file --client-id --from-path --to-path [--overwrite] --session-id "<session-id>" --output jsonMoves or renames a file or folder on NextCloudrobomotion nextcloud list_files --client-id --folder-path --session-id "<session-id>" --output jsonLists files and folders in a NextCloud directoryrobomotion nextcloud create_folder --client-id --folder-path --session-id "<session-id>" --output jsonCreates a new folder on NextCloudrobomotion nextcloud create_share --client-id --path --share-with [--share-type] [--permissions] [--password] --session-id "<session-id>" --output jsonCreates a share link for a file or folder on NextCloudrobomotion nextcloud list_shares --client-id --path --session-id "<session-id>" --output jsonLists shares for a path or all shares on NextCloudrobomotion nextcloud delete_share --client-id --share-id --session-id "<session-id>" --output jsonDeletes a share by its ID on NextCloudrobomotion nextcloud create_user --client-id --user-id --password --email [--display-name] --session-id "<session-id>" --output jsonCreates a new user on NextCloudrobomotion nextcloud get_user --client-id --user-id --session-id "<session-id>" --output jsonGets user details from NextCloudrobomotion nextcloud list_users --client-id [--search] [--50] [--0] --session-id "<session-id>" --output jsonLists users on NextCloud
Environment
- ROBOMOTION_API_TOKEN (if vault credentials are needed)