@kud/pcloud-cli
v0.1.0
Published
CLI tool for pCloud file operations — list, restore from trash and rewind
Downloads
50
Readme
pCloud CLI
A TypeScript CLI tool for managing pCloud files, with focus on restoring files from trash and rewind.
Installation
npm installFirst Time Setup
Before using the CLI, you need to connect it to your pCloud account. This is a one-time setup!
Run:
npm start loginThis will:
- Open your browser to pCloud's login page
- You log in with your pCloud credentials (in the browser)
- pCloud redirects you back to the CLI automatically
- Your access token is saved securely
That's it! Your browser session handles the login, and the CLI never sees your password.
Build
npm run buildUsage
List files in trash
npm start list-trashRestore a file from trash
npm start restore-trash <fileid>Example:
npm start restore-trash 12345List rewind events for a file
npm start list-rewind <path>Example:
npm start list-rewind /mydocument.txtRestore a file from rewind
npm start restore-rewind <fileid> <destination-path>Example:
npm start restore-rewind 12345 /restored-document.txtDevelopment
Run without building:
npm run dev list-trashAPI Methods Used
userinfo- Authenticationlisttrash- List files in trashtrash_clear- Restore file from trashlistrewindevents- List rewind events for a filefile_restore- Restore file from rewind
License
ISC
