scp-next 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +38 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -70,6 +70,9 @@ scp-next download /var/log/example.log ./logs/example.log \
70
70
  --password your-password
71
71
  ```
72
72
 
73
+ Password arguments are convenient, but they may be exposed through shell history and process listings.
74
+ Prefer `SCP_NEXT_PASSWORD`, SSH agents, or protected private-key files for shared or production environments.
75
+
73
76
  Use the library:
74
77
 
75
78
  ```ts
@@ -108,44 +111,66 @@ Destination paths follow familiar `cp`/`scp` behavior. If the destination exists
108
111
 
109
112
  ### Upload Examples
110
113
 
111
- Password authentication:
114
+ Preview a recursive deploy before connecting:
112
115
 
113
116
  ```bash
114
117
  scp-next upload ./dist /var/www/example \
115
118
  --host your-host \
116
119
  --username your-username \
117
120
  --password your-password \
118
- --recursive
121
+ --recursive \
122
+ --dry-run
123
+ ```
124
+
125
+ Deploy with overwrite and verbose diagnostics:
126
+
127
+ ```bash
128
+ scp-next upload ./dist /var/www/example \
129
+ --host your-host \
130
+ --username your-username \
131
+ --password your-password \
132
+ --recursive \
133
+ --overwrite \
134
+ --verbose
119
135
  ```
120
136
 
121
- Private-key authentication:
137
+ Use an encrypted private key:
122
138
 
123
139
  ```bash
124
140
  scp-next upload ./dist /var/www/example \
125
141
  --host your-host \
126
142
  --username your-username \
127
143
  --private-key-file ~/.ssh/id_ed25519 \
144
+ --passphrase your-passphrase \
128
145
  --recursive
129
146
  ```
130
147
 
131
148
  ### Download Examples
132
149
 
133
- Password authentication:
150
+ Download a remote directory recursively:
134
151
 
135
152
  ```bash
136
- scp-next download /var/log/example.log ./logs/example.log \
153
+ scp-next download /var/log/example ./logs/example \
137
154
  --host your-host \
138
155
  --username your-username \
139
- --password your-password
156
+ --password your-password \
157
+ --recursive
140
158
  ```
141
159
 
142
- Private-key authentication:
160
+ Download and overwrite an existing local file:
143
161
 
144
162
  ```bash
145
163
  scp-next download /var/log/example.log ./logs/example.log \
146
164
  --host your-host \
147
165
  --username your-username \
148
- --private-key-file ~/.ssh/id_ed25519
166
+ --password your-password \
167
+ --overwrite
168
+ ```
169
+
170
+ Run a configured download job:
171
+
172
+ ```bash
173
+ scp-next run download-logs --config ./scp-next.config.json
149
174
  ```
150
175
 
151
176
  ### CLI Options
@@ -257,12 +282,10 @@ await upload({
257
282
 
258
283
  ### Configuration Files
259
284
 
260
- `scp-next` searches for these files in the current directory:
285
+ Use `scp-next.config.json` in the current directory. `scp-next` also auto-detects these rc-style filenames: `.scp-nextrc`, `.scp-nextrc.json`.
261
286
 
262
287
  ```text
263
288
  scp-next.config.json
264
- .scp-nextrc
265
- .scp-nextrc.json
266
289
  ```
267
290
 
268
291
  Use `--config` for an explicit path:
@@ -298,6 +321,8 @@ Example:
298
321
  }
299
322
  ```
300
323
 
324
+ Do not commit configuration files containing real passwords. Prefer `SCP_NEXT_PASSWORD` or another protected secret source for shared repositories and deployment environments.
325
+
301
326
  Configuration file options:
302
327
 
303
328
  | Key | Description |
@@ -396,7 +421,7 @@ Bash:
396
421
  ```bash
397
422
  export SCP_NEXT_HOST="your-host"
398
423
  export SCP_NEXT_USERNAME="your-username"
399
- export SCP_NEXT_PRIVATE_KEY_FILE="$HOME/.ssh/id_ed25519"
424
+ export SCP_NEXT_PASSWORD="your-password"
400
425
  scp-next upload ./dist /var/www/example --recursive
401
426
  ```
402
427
 
@@ -405,7 +430,7 @@ PowerShell:
405
430
  ```powershell
406
431
  $env:SCP_NEXT_HOST = "your-host"
407
432
  $env:SCP_NEXT_USERNAME = "your-username"
408
- $env:SCP_NEXT_PRIVATE_KEY_FILE = "$HOME\.ssh\id_ed25519"
433
+ $env:SCP_NEXT_PASSWORD = "your-password"
409
434
  scp-next upload .\dist /var/www/example --recursive
410
435
  ```
411
436
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scp-next",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "A SCP CLI and library for secure SSH file transfers using SFTP.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",