d-drive-cli 2.2.1 → 2.2.2

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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # D-Drive CLI v2.2.1
1
+ # D-Drive CLI v2.2.2
2
2
 
3
3
  Command-line tool for D-Drive cloud storage.
4
4
 
5
5
  ```
6
6
  ╔═══════════════════════════════════════╗
7
- ║ D-Drive CLI v2.2.1
7
+ ║ D-Drive CLI v2.2.2
8
8
  ║ Discord-based cloud storage ║
9
9
  ╚═══════════════════════════════════════╝
10
10
  ```
@@ -19,28 +19,30 @@ npm install -g d-drive-cli
19
19
  npx d-drive-cli
20
20
  ```
21
21
 
22
- After installation, use the `d-drive` command:
22
+ After installation, you can use either command:
23
+ - `d-drive` - Full command name
24
+ - `drive` - Short alias
23
25
 
24
26
  ## Quick Start
25
27
 
26
28
  ```bash
27
29
  # Interactive configuration (recommended)
28
- d-drive config
30
+ drive config
29
31
 
30
32
  # Or set API key directly
31
- d-drive config --key YOUR_API_KEY --url https://your-server/api
33
+ drive config --key YOUR_API_KEY --url https://your-server/api
32
34
 
33
35
  # Check connection
34
- d-drive info
36
+ drive info
35
37
 
36
38
  # Upload a file
37
- d-drive upload ./backup.zip
39
+ drive upload ./backup.zip
38
40
 
39
41
  # List files
40
- d-drive ls
42
+ drive ls
41
43
 
42
44
  # Download a file
43
- d-drive download /backup.zip ./local-backup.zip
45
+ drive download /backup.zip ./local-backup.zip
44
46
  ```
45
47
 
46
48
  ## Commands
@@ -49,18 +51,18 @@ d-drive download /backup.zip ./local-backup.zip
49
51
 
50
52
  ```bash
51
53
  # Interactive setup
52
- d-drive config
54
+ drive config
53
55
 
54
56
  # Set API key
55
- d-drive config --key dd_your_api_key
57
+ drive config --key dd_your_api_key
56
58
 
57
59
  # Set API URL
58
- d-drive config --url https://your-server/api
60
+ drive config --url https://your-server/api
59
61
 
60
62
  # View current config
61
- d-drive config --list
63
+ drive config --list
62
64
  # or
63
- d-drive config -l
65
+ drive config -l
64
66
  ```
65
67
 
66
68
  ### File Operations
@@ -69,60 +71,60 @@ d-drive config -l
69
71
 
70
72
  ```bash
71
73
  # Upload single file
72
- d-drive upload ./file.txt
74
+ drive upload ./file.txt
73
75
 
74
76
  # Upload to specific folder
75
- d-drive upload ./file.txt /backups/
77
+ drive upload ./file.txt /backups/
76
78
 
77
79
  # Upload directory recursively
78
- d-drive upload ./myproject /backups/ -r
80
+ drive upload ./myproject /backups/ -r
79
81
 
80
82
  # Upload with encryption
81
- d-drive upload ./sensitive.txt -e
83
+ drive upload ./sensitive.txt -e
82
84
  ```
83
85
 
84
86
  #### Download
85
87
 
86
88
  ```bash
87
89
  # Download file
88
- d-drive download /backups/file.txt
90
+ drive download /backups/file.txt
89
91
 
90
92
  # Download to specific location
91
- d-drive download /backups/file.txt ./local-file.txt
93
+ drive download /backups/file.txt ./local-file.txt
92
94
  ```
93
95
 
94
96
  #### List
95
97
 
96
98
  ```bash
97
99
  # List root directory
98
- d-drive ls
100
+ drive ls
99
101
 
100
102
  # List specific directory
101
- d-drive ls /backups
103
+ drive ls /backups
102
104
 
103
105
  # Long format with details
104
- d-drive ls -l
105
- d-drive ls /backups -l
106
+ drive ls -l
107
+ drive ls /backups -l
106
108
  ```
107
109
 
108
110
  #### Delete
109
111
 
110
112
  ```bash
111
113
  # Delete file (with confirmation)
112
- d-drive rm /old-file.txt
114
+ drive rm /old-file.txt
113
115
 
114
116
  # Force delete without confirmation
115
- d-drive rm /old-file.txt -f
117
+ drive rm /old-file.txt -f
116
118
 
117
119
  # Delete directory recursively
118
- d-drive rm /old-folder -r
120
+ drive rm /old-folder -r
119
121
  ```
120
122
 
121
123
  #### Copy
122
124
 
123
125
  ```bash
124
126
  # Create a copy of a file
125
- d-drive cp /backups/file.txt
127
+ drive cp /backups/file.txt
126
128
  # Creates: /backups/file (1).txt
127
129
  ```
128
130
 
@@ -132,28 +134,28 @@ D-Drive supports SFTP backup tasks that can be managed via CLI.
132
134
 
133
135
  ```bash
134
136
  # List all tasks
135
- d-drive tasks ls
137
+ drive tasks ls
136
138
 
137
139
  # Run a task immediately
138
- d-drive tasks run <task-id>
140
+ drive tasks run <task-id>
139
141
 
140
142
  # Stop a running task
141
- d-drive tasks stop <task-id>
143
+ drive tasks stop <task-id>
142
144
 
143
145
  # Enable/disable a task
144
- d-drive tasks enable <task-id>
145
- d-drive tasks disable <task-id>
146
+ drive tasks enable <task-id>
147
+ drive tasks disable <task-id>
146
148
 
147
149
  # Delete a task
148
- d-drive tasks rm <task-id>
149
- d-drive tasks rm <task-id> -f # Force delete
150
+ drive tasks rm <task-id>
151
+ drive tasks rm <task-id> -f # Force delete
150
152
  ```
151
153
 
152
154
  ### Info & Status
153
155
 
154
156
  ```bash
155
157
  # Show connection status and user info
156
- d-drive info
158
+ drive info
157
159
  ```
158
160
 
159
161
  Output:
@@ -171,9 +173,9 @@ User: YourUsername
171
173
 
172
174
  ```bash
173
175
  # Start interactive mode
174
- d-drive interactive
176
+ drive interactive
175
177
  # or
176
- d-drive i
178
+ drive i
177
179
  ```
178
180
 
179
181
  Interactive mode provides a menu-driven interface for all operations.
@@ -185,7 +187,7 @@ Interactive mode provides a menu-driven interface for all operations.
185
187
  3. Scroll to **API Keys** section
186
188
  4. Click **Create API Key**
187
189
  5. Copy the key (starts with `dd_`)
188
- 6. Use in CLI: `d-drive config --key dd_your_key`
190
+ 6. Use in CLI: `drive config --key dd_your_key`
189
191
 
190
192
  ## Examples
191
193
 
@@ -193,10 +195,10 @@ Interactive mode provides a menu-driven interface for all operations.
193
195
 
194
196
  ```bash
195
197
  # Create a backup of your project
196
- d-drive upload ./my-project /backups/my-project/ -r
198
+ drive upload ./my-project /backups/my-project/ -r
197
199
 
198
200
  # List backups
199
- d-drive ls /backups/my-project -l
201
+ drive ls /backups/my-project -l
200
202
  ```
201
203
 
202
204
  ### Automated Backup Script
@@ -206,7 +208,7 @@ d-drive ls /backups/my-project -l
206
208
  # backup.sh
207
209
 
208
210
  DATE=$(date +%Y-%m-%d)
209
- d-drive upload ./data "/backups/$DATE/"
211
+ drive upload ./data "/backups/$DATE/"
210
212
  echo "Backup completed: $DATE"
211
213
  ```
212
214
 
@@ -214,7 +216,7 @@ echo "Backup completed: $DATE"
214
216
 
215
217
  ```bash
216
218
  # Download latest backup
217
- d-drive download /backups/2026-01-24/data.tar.gz ./restore/
219
+ drive download /backups/2026-01-24/data.tar.gz ./restore/
218
220
 
219
221
  # Extract
220
222
  tar -xzf ./restore/data.tar.gz
@@ -247,14 +249,18 @@ export DDRIVE_API_URL=https://your-server/api
247
249
 
248
250
  ## Changelog
249
251
 
250
- ### v2.2.1
251
- - Fixed double output issue by removing `drive` alias
252
- - Use `d-drive` as the single command name
253
- - Improved consistency across documentation
252
+ ### v2.2.2
253
+ - **ACTUALLY** fixed double output issue (previous v2.2.1 had wrong fix)
254
+ - Added `process.exit(0)` after help display to prevent Commander.js duplicate
255
+ - Both `d-drive` and `drive` aliases work correctly
256
+
257
+ ### v2.2.1 (deprecated)
258
+ - Incorrectly removed `drive` alias thinking it caused double output
254
259
 
255
260
  ### v2.2.0
261
+ - Added `drive` command alias for easier use
256
262
  - Interactive mode with menu-driven interface
257
- - `info` command for connection status
263
+ - `drive info` command for connection status
258
264
  - Interactive configuration wizard
259
265
  - Better error messages
260
266
  - Colorized output
package/dist/index.js CHANGED
@@ -292,5 +292,6 @@ async function interactiveConfig() {
292
292
  if (process.argv.length === 2 && !process.argv.includes('-v') && !process.argv.includes('--version') && !process.argv.includes('-h') && !process.argv.includes('--help')) {
293
293
  console.log(banner);
294
294
  program.outputHelp();
295
+ process.exit(0);
295
296
  }
296
297
  program.parse();
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "d-drive-cli",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "D-Drive CLI tool for developers - Discord cloud storage",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "d-drive": "./dist/index.js"
7
+ "d-drive": "./dist/index.js",
8
+ "drive": "./dist/index.js"
8
9
  },
9
10
  "scripts": {
10
11
  "build": "tsc",
package/src/index.ts CHANGED
@@ -314,6 +314,7 @@ async function interactiveConfig() {
314
314
  if (process.argv.length === 2 && !process.argv.includes('-v') && !process.argv.includes('--version') && !process.argv.includes('-h') && !process.argv.includes('--help')) {
315
315
  console.log(banner);
316
316
  program.outputHelp();
317
+ process.exit(0);
317
318
  }
318
319
 
319
320
  program.parse();