@samochreno/ws-shell
v0.1.0
Published
CLI for activating Websupport Shell and using SSH, SCP, and rsync from a local terminal.
Readme
ws-shell
CLI for activating Websupport Shell and using ssh, scp, and rsync from a local terminal.
Install
npm install -g @samochreno/ws-shellConfig
Create websupport.shell.json in the repo:
{
"sites": {
"demo-site": {
"url": "https://admin.websupport.sk/sk/assignment/123456/shell/select",
"remoteRoot": "~/example.com/apps/demo-site"
}
}
}The CLI reads only --config <path> or the nearest upward websupport.shell.json.
Credentials are never stored in config.
Login
ws-shell loginThe command prompts for Websupport credentials and saves only browser session state in ~/.config/ws-shell/storage-state.json.
SSH
ws-shell ssh demo-site
ws-shell demo-siteWhen remoteRoot is configured, interactive SSH starts there.
Run a command on the server:
ws-shell ssh demo-site -- php artisan migrate --force
ws-shell ssh demo-site -- php artisan config:clearCopy Files
Relative remote paths expand against remoteRoot:
ws-shell rsync -av --delete ./app/ demo-site:app/
ws-shell scp ./file.zip demo-site:releases/file.zipLiteral remote paths stay literal:
ws-shell rsync -av ./app/ demo-site:~/other/path/app/
ws-shell rsync -av ./app/ demo-site:/absolute/path/app/Use --print to inspect the generated command without running it:
ws-shell rsync --print -av --delete ./app/ demo-site:app/