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