Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 2.17 KB

README.md

File metadata and controls

82 lines (59 loc) · 2.17 KB

nextcloud-remote-client

The (unofficial) Nextcloud Remote Client CLI is a client side CLI to interact with Nextcloud servers via a container or command line. It uses the Nextcloud Python API and does not require enabling anything special on the server side in order to use.

Example usage

Show help:

./nrc --help

usage: nrc [-h] {files,file,users,user,weather} ...

Remote CLI for Nextcloud Server

options:
  -h, --help            show this help message and exit

service:
  {files,file,users,user,weather}
                        service --help
    files (file)        Interact with files in Nextcloud
    users (user)        User management in Nextcloud
    weather             Weather forecast

List files:

./nrc files ls / -r

'Documents/'
'Documents/Example.md'
'Documents/Nextcloud flyer.pdf'
'Documents/Readme.md'
'Documents/Welcome to Nextcloud Hub.docx'
'Nextcloud Manual.pdf'
'Nextcloud intro.mp4'
'Nextcloud.png'

List users:

./nrc users list

User: admin
Status: None

Run this easily from a container:

You can run this with podman or docker without needing python installed locally:

podman run -it --rm -e'NEXTCLOUD_SERVER=https://your-nextcloud.com' -e'NEXTCLOUD_USER=admin' -e'NEXTCLOUD_PASS=password' quay.io/vwbusguy/nextcloud-remote-client files ls / -r

Setup

In order to use this, you must pass your Nextcloud credentials via environment variables:

export NEXTCLOUD_SERVER='https://your-nextcloud.com'
export NEXTCLOUD_USER='admin'
export NEXTCLOUD_PASS='password'

Run Locally

To run this locally, you will need python3:

python -m venv env
source env/bin/activate
./nrc files ls

Alternatively, build and run a container locally:

podman build -t localhost/nrc .
podman run -it --rm -e'NEXTCLOUD_SERVER=https://your-nextcloud.com' -e'NEXTCLOUD_USER=admin' -e'NEXTCLOUD_PASS=password' localhost/nrc files ls / -r

Contributing

There is plenty of low-hanging fruit. Please refer to the "Future Plans" section of the DESIGN docs. Most stuff currently there simply needs wired in with the upstream library.