dkdc-md-cli 0.1.0__tar.gz
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.
- dkdc_md_cli-0.1.0/LICENSE +21 -0
- dkdc_md_cli-0.1.0/PKG-INFO +11 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/Cargo.lock +580 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/Cargo.toml +31 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/README.md +62 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/src/auth.rs +187 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/src/cli.rs +666 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/src/client.rs +273 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/src/lib.rs +7 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli/src/main.rs +9 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli-py/Cargo.lock +699 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli-py/Cargo.toml +16 -0
- dkdc_md_cli-0.1.0/dkdc-md-cli-py/src/lib.rs +13 -0
- dkdc_md_cli-0.1.0/pyproject.toml +37 -0
- dkdc_md_cli-0.1.0/src/dkdc_md/__init__.py +20 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Cody
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dkdc-md-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
License-File: LICENSE
|
|
5
|
+
Summary: CLI for the MotherDuck REST API
|
|
6
|
+
Author-email: Cody <cody@dkdc.dev>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Project-URL: Homepage, https://github.com/lostmygithubaccount/dkdc-md-cli
|
|
10
|
+
Project-URL: Issues, https://github.com/lostmygithubaccount/dkdc-md-cli/issues
|
|
11
|
+
Project-URL: Repository, https://github.com/lostmygithubaccount/dkdc-md-cli
|
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "adler2"
|
|
7
|
+
version = "2.0.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "anstream"
|
|
13
|
+
version = "0.6.21"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"anstyle",
|
|
18
|
+
"anstyle-parse",
|
|
19
|
+
"anstyle-query",
|
|
20
|
+
"anstyle-wincon",
|
|
21
|
+
"colorchoice",
|
|
22
|
+
"is_terminal_polyfill",
|
|
23
|
+
"utf8parse",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "anstyle"
|
|
28
|
+
version = "1.0.13"
|
|
29
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
30
|
+
checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
|
|
31
|
+
|
|
32
|
+
[[package]]
|
|
33
|
+
name = "anstyle-parse"
|
|
34
|
+
version = "0.2.7"
|
|
35
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
36
|
+
checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
|
|
37
|
+
dependencies = [
|
|
38
|
+
"utf8parse",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "anstyle-query"
|
|
43
|
+
version = "1.1.5"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
46
|
+
dependencies = [
|
|
47
|
+
"windows-sys 0.61.2",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[[package]]
|
|
51
|
+
name = "anstyle-wincon"
|
|
52
|
+
version = "3.0.11"
|
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
55
|
+
dependencies = [
|
|
56
|
+
"anstyle",
|
|
57
|
+
"once_cell_polyfill",
|
|
58
|
+
"windows-sys 0.61.2",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "anyhow"
|
|
63
|
+
version = "1.0.101"
|
|
64
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
65
|
+
checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
|
|
66
|
+
|
|
67
|
+
[[package]]
|
|
68
|
+
name = "base64"
|
|
69
|
+
version = "0.22.1"
|
|
70
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
71
|
+
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
72
|
+
|
|
73
|
+
[[package]]
|
|
74
|
+
name = "bytes"
|
|
75
|
+
version = "1.11.1"
|
|
76
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
77
|
+
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
|
78
|
+
|
|
79
|
+
[[package]]
|
|
80
|
+
name = "cc"
|
|
81
|
+
version = "1.2.55"
|
|
82
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
83
|
+
checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
|
|
84
|
+
dependencies = [
|
|
85
|
+
"find-msvc-tools",
|
|
86
|
+
"shlex",
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
[[package]]
|
|
90
|
+
name = "cfg-if"
|
|
91
|
+
version = "1.0.4"
|
|
92
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
93
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "clap"
|
|
97
|
+
version = "4.5.58"
|
|
98
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
+
checksum = "63be97961acde393029492ce0be7a1af7e323e6bae9511ebfac33751be5e6806"
|
|
100
|
+
dependencies = [
|
|
101
|
+
"clap_builder",
|
|
102
|
+
"clap_derive",
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
[[package]]
|
|
106
|
+
name = "clap_builder"
|
|
107
|
+
version = "4.5.58"
|
|
108
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
|
+
checksum = "7f13174bda5dfd69d7e947827e5af4b0f2f94a4a3ee92912fba07a66150f21e2"
|
|
110
|
+
dependencies = [
|
|
111
|
+
"anstream",
|
|
112
|
+
"anstyle",
|
|
113
|
+
"clap_lex",
|
|
114
|
+
"strsim",
|
|
115
|
+
]
|
|
116
|
+
|
|
117
|
+
[[package]]
|
|
118
|
+
name = "clap_derive"
|
|
119
|
+
version = "4.5.55"
|
|
120
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
121
|
+
checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
|
|
122
|
+
dependencies = [
|
|
123
|
+
"heck",
|
|
124
|
+
"proc-macro2",
|
|
125
|
+
"quote",
|
|
126
|
+
"syn",
|
|
127
|
+
]
|
|
128
|
+
|
|
129
|
+
[[package]]
|
|
130
|
+
name = "clap_lex"
|
|
131
|
+
version = "1.0.0"
|
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
+
checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
|
|
134
|
+
|
|
135
|
+
[[package]]
|
|
136
|
+
name = "colorchoice"
|
|
137
|
+
version = "1.0.4"
|
|
138
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
+
checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "crc32fast"
|
|
143
|
+
version = "1.5.0"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
|
|
146
|
+
dependencies = [
|
|
147
|
+
"cfg-if",
|
|
148
|
+
]
|
|
149
|
+
|
|
150
|
+
[[package]]
|
|
151
|
+
name = "dkdc-md-cli"
|
|
152
|
+
version = "0.1.0"
|
|
153
|
+
dependencies = [
|
|
154
|
+
"anyhow",
|
|
155
|
+
"clap",
|
|
156
|
+
"percent-encoding",
|
|
157
|
+
"serde",
|
|
158
|
+
"serde_json",
|
|
159
|
+
"ureq",
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
[[package]]
|
|
163
|
+
name = "find-msvc-tools"
|
|
164
|
+
version = "0.1.9"
|
|
165
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
166
|
+
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
|
167
|
+
|
|
168
|
+
[[package]]
|
|
169
|
+
name = "flate2"
|
|
170
|
+
version = "1.1.9"
|
|
171
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
172
|
+
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
|
|
173
|
+
dependencies = [
|
|
174
|
+
"crc32fast",
|
|
175
|
+
"miniz_oxide",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "getrandom"
|
|
180
|
+
version = "0.2.17"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
|
|
183
|
+
dependencies = [
|
|
184
|
+
"cfg-if",
|
|
185
|
+
"libc",
|
|
186
|
+
"wasi",
|
|
187
|
+
]
|
|
188
|
+
|
|
189
|
+
[[package]]
|
|
190
|
+
name = "heck"
|
|
191
|
+
version = "0.5.0"
|
|
192
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
193
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
194
|
+
|
|
195
|
+
[[package]]
|
|
196
|
+
name = "http"
|
|
197
|
+
version = "1.4.0"
|
|
198
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
199
|
+
checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
|
|
200
|
+
dependencies = [
|
|
201
|
+
"bytes",
|
|
202
|
+
"itoa",
|
|
203
|
+
]
|
|
204
|
+
|
|
205
|
+
[[package]]
|
|
206
|
+
name = "httparse"
|
|
207
|
+
version = "1.10.1"
|
|
208
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
209
|
+
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
210
|
+
|
|
211
|
+
[[package]]
|
|
212
|
+
name = "is_terminal_polyfill"
|
|
213
|
+
version = "1.70.2"
|
|
214
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
215
|
+
checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
|
|
216
|
+
|
|
217
|
+
[[package]]
|
|
218
|
+
name = "itoa"
|
|
219
|
+
version = "1.0.17"
|
|
220
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
221
|
+
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|
222
|
+
|
|
223
|
+
[[package]]
|
|
224
|
+
name = "libc"
|
|
225
|
+
version = "0.2.181"
|
|
226
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
227
|
+
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"
|
|
228
|
+
|
|
229
|
+
[[package]]
|
|
230
|
+
name = "log"
|
|
231
|
+
version = "0.4.29"
|
|
232
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
233
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
234
|
+
|
|
235
|
+
[[package]]
|
|
236
|
+
name = "memchr"
|
|
237
|
+
version = "2.8.0"
|
|
238
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
239
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
240
|
+
|
|
241
|
+
[[package]]
|
|
242
|
+
name = "miniz_oxide"
|
|
243
|
+
version = "0.8.9"
|
|
244
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
245
|
+
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
|
|
246
|
+
dependencies = [
|
|
247
|
+
"adler2",
|
|
248
|
+
"simd-adler32",
|
|
249
|
+
]
|
|
250
|
+
|
|
251
|
+
[[package]]
|
|
252
|
+
name = "once_cell"
|
|
253
|
+
version = "1.21.3"
|
|
254
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
255
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "once_cell_polyfill"
|
|
259
|
+
version = "1.70.2"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
|
|
262
|
+
|
|
263
|
+
[[package]]
|
|
264
|
+
name = "percent-encoding"
|
|
265
|
+
version = "2.3.2"
|
|
266
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
267
|
+
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|
268
|
+
|
|
269
|
+
[[package]]
|
|
270
|
+
name = "proc-macro2"
|
|
271
|
+
version = "1.0.106"
|
|
272
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
273
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
274
|
+
dependencies = [
|
|
275
|
+
"unicode-ident",
|
|
276
|
+
]
|
|
277
|
+
|
|
278
|
+
[[package]]
|
|
279
|
+
name = "quote"
|
|
280
|
+
version = "1.0.44"
|
|
281
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
282
|
+
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
|
283
|
+
dependencies = [
|
|
284
|
+
"proc-macro2",
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
[[package]]
|
|
288
|
+
name = "ring"
|
|
289
|
+
version = "0.17.14"
|
|
290
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
291
|
+
checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
|
|
292
|
+
dependencies = [
|
|
293
|
+
"cc",
|
|
294
|
+
"cfg-if",
|
|
295
|
+
"getrandom",
|
|
296
|
+
"libc",
|
|
297
|
+
"untrusted",
|
|
298
|
+
"windows-sys 0.52.0",
|
|
299
|
+
]
|
|
300
|
+
|
|
301
|
+
[[package]]
|
|
302
|
+
name = "rustls"
|
|
303
|
+
version = "0.23.36"
|
|
304
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
305
|
+
checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b"
|
|
306
|
+
dependencies = [
|
|
307
|
+
"log",
|
|
308
|
+
"once_cell",
|
|
309
|
+
"ring",
|
|
310
|
+
"rustls-pki-types",
|
|
311
|
+
"rustls-webpki",
|
|
312
|
+
"subtle",
|
|
313
|
+
"zeroize",
|
|
314
|
+
]
|
|
315
|
+
|
|
316
|
+
[[package]]
|
|
317
|
+
name = "rustls-pki-types"
|
|
318
|
+
version = "1.14.0"
|
|
319
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
320
|
+
checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
|
|
321
|
+
dependencies = [
|
|
322
|
+
"zeroize",
|
|
323
|
+
]
|
|
324
|
+
|
|
325
|
+
[[package]]
|
|
326
|
+
name = "rustls-webpki"
|
|
327
|
+
version = "0.103.9"
|
|
328
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
329
|
+
checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
|
|
330
|
+
dependencies = [
|
|
331
|
+
"ring",
|
|
332
|
+
"rustls-pki-types",
|
|
333
|
+
"untrusted",
|
|
334
|
+
]
|
|
335
|
+
|
|
336
|
+
[[package]]
|
|
337
|
+
name = "serde"
|
|
338
|
+
version = "1.0.228"
|
|
339
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
340
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
341
|
+
dependencies = [
|
|
342
|
+
"serde_core",
|
|
343
|
+
"serde_derive",
|
|
344
|
+
]
|
|
345
|
+
|
|
346
|
+
[[package]]
|
|
347
|
+
name = "serde_core"
|
|
348
|
+
version = "1.0.228"
|
|
349
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
350
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
351
|
+
dependencies = [
|
|
352
|
+
"serde_derive",
|
|
353
|
+
]
|
|
354
|
+
|
|
355
|
+
[[package]]
|
|
356
|
+
name = "serde_derive"
|
|
357
|
+
version = "1.0.228"
|
|
358
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
359
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
360
|
+
dependencies = [
|
|
361
|
+
"proc-macro2",
|
|
362
|
+
"quote",
|
|
363
|
+
"syn",
|
|
364
|
+
]
|
|
365
|
+
|
|
366
|
+
[[package]]
|
|
367
|
+
name = "serde_json"
|
|
368
|
+
version = "1.0.149"
|
|
369
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
370
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
371
|
+
dependencies = [
|
|
372
|
+
"itoa",
|
|
373
|
+
"memchr",
|
|
374
|
+
"serde",
|
|
375
|
+
"serde_core",
|
|
376
|
+
"zmij",
|
|
377
|
+
]
|
|
378
|
+
|
|
379
|
+
[[package]]
|
|
380
|
+
name = "shlex"
|
|
381
|
+
version = "1.3.0"
|
|
382
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
383
|
+
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
384
|
+
|
|
385
|
+
[[package]]
|
|
386
|
+
name = "simd-adler32"
|
|
387
|
+
version = "0.3.8"
|
|
388
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
389
|
+
checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
|
|
390
|
+
|
|
391
|
+
[[package]]
|
|
392
|
+
name = "strsim"
|
|
393
|
+
version = "0.11.1"
|
|
394
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
395
|
+
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
396
|
+
|
|
397
|
+
[[package]]
|
|
398
|
+
name = "subtle"
|
|
399
|
+
version = "2.6.1"
|
|
400
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
401
|
+
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
402
|
+
|
|
403
|
+
[[package]]
|
|
404
|
+
name = "syn"
|
|
405
|
+
version = "2.0.114"
|
|
406
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
407
|
+
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
|
|
408
|
+
dependencies = [
|
|
409
|
+
"proc-macro2",
|
|
410
|
+
"quote",
|
|
411
|
+
"unicode-ident",
|
|
412
|
+
]
|
|
413
|
+
|
|
414
|
+
[[package]]
|
|
415
|
+
name = "unicode-ident"
|
|
416
|
+
version = "1.0.23"
|
|
417
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
418
|
+
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
|
419
|
+
|
|
420
|
+
[[package]]
|
|
421
|
+
name = "untrusted"
|
|
422
|
+
version = "0.9.0"
|
|
423
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
424
|
+
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
425
|
+
|
|
426
|
+
[[package]]
|
|
427
|
+
name = "ureq"
|
|
428
|
+
version = "3.2.0"
|
|
429
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
430
|
+
checksum = "fdc97a28575b85cfedf2a7e7d3cc64b3e11bd8ac766666318003abbacc7a21fc"
|
|
431
|
+
dependencies = [
|
|
432
|
+
"base64",
|
|
433
|
+
"flate2",
|
|
434
|
+
"log",
|
|
435
|
+
"percent-encoding",
|
|
436
|
+
"rustls",
|
|
437
|
+
"rustls-pki-types",
|
|
438
|
+
"ureq-proto",
|
|
439
|
+
"utf-8",
|
|
440
|
+
"webpki-roots",
|
|
441
|
+
]
|
|
442
|
+
|
|
443
|
+
[[package]]
|
|
444
|
+
name = "ureq-proto"
|
|
445
|
+
version = "0.5.3"
|
|
446
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
447
|
+
checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f"
|
|
448
|
+
dependencies = [
|
|
449
|
+
"base64",
|
|
450
|
+
"http",
|
|
451
|
+
"httparse",
|
|
452
|
+
"log",
|
|
453
|
+
]
|
|
454
|
+
|
|
455
|
+
[[package]]
|
|
456
|
+
name = "utf-8"
|
|
457
|
+
version = "0.7.6"
|
|
458
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
459
|
+
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
|
460
|
+
|
|
461
|
+
[[package]]
|
|
462
|
+
name = "utf8parse"
|
|
463
|
+
version = "0.2.2"
|
|
464
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
465
|
+
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
|
466
|
+
|
|
467
|
+
[[package]]
|
|
468
|
+
name = "wasi"
|
|
469
|
+
version = "0.11.1+wasi-snapshot-preview1"
|
|
470
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
471
|
+
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
472
|
+
|
|
473
|
+
[[package]]
|
|
474
|
+
name = "webpki-roots"
|
|
475
|
+
version = "1.0.6"
|
|
476
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
477
|
+
checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed"
|
|
478
|
+
dependencies = [
|
|
479
|
+
"rustls-pki-types",
|
|
480
|
+
]
|
|
481
|
+
|
|
482
|
+
[[package]]
|
|
483
|
+
name = "windows-link"
|
|
484
|
+
version = "0.2.1"
|
|
485
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
486
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
487
|
+
|
|
488
|
+
[[package]]
|
|
489
|
+
name = "windows-sys"
|
|
490
|
+
version = "0.52.0"
|
|
491
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
492
|
+
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
|
493
|
+
dependencies = [
|
|
494
|
+
"windows-targets",
|
|
495
|
+
]
|
|
496
|
+
|
|
497
|
+
[[package]]
|
|
498
|
+
name = "windows-sys"
|
|
499
|
+
version = "0.61.2"
|
|
500
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
501
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
502
|
+
dependencies = [
|
|
503
|
+
"windows-link",
|
|
504
|
+
]
|
|
505
|
+
|
|
506
|
+
[[package]]
|
|
507
|
+
name = "windows-targets"
|
|
508
|
+
version = "0.52.6"
|
|
509
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
510
|
+
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
|
|
511
|
+
dependencies = [
|
|
512
|
+
"windows_aarch64_gnullvm",
|
|
513
|
+
"windows_aarch64_msvc",
|
|
514
|
+
"windows_i686_gnu",
|
|
515
|
+
"windows_i686_gnullvm",
|
|
516
|
+
"windows_i686_msvc",
|
|
517
|
+
"windows_x86_64_gnu",
|
|
518
|
+
"windows_x86_64_gnullvm",
|
|
519
|
+
"windows_x86_64_msvc",
|
|
520
|
+
]
|
|
521
|
+
|
|
522
|
+
[[package]]
|
|
523
|
+
name = "windows_aarch64_gnullvm"
|
|
524
|
+
version = "0.52.6"
|
|
525
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
526
|
+
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
|
527
|
+
|
|
528
|
+
[[package]]
|
|
529
|
+
name = "windows_aarch64_msvc"
|
|
530
|
+
version = "0.52.6"
|
|
531
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
532
|
+
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
|
533
|
+
|
|
534
|
+
[[package]]
|
|
535
|
+
name = "windows_i686_gnu"
|
|
536
|
+
version = "0.52.6"
|
|
537
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
538
|
+
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
|
539
|
+
|
|
540
|
+
[[package]]
|
|
541
|
+
name = "windows_i686_gnullvm"
|
|
542
|
+
version = "0.52.6"
|
|
543
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
544
|
+
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
|
545
|
+
|
|
546
|
+
[[package]]
|
|
547
|
+
name = "windows_i686_msvc"
|
|
548
|
+
version = "0.52.6"
|
|
549
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
550
|
+
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
|
551
|
+
|
|
552
|
+
[[package]]
|
|
553
|
+
name = "windows_x86_64_gnu"
|
|
554
|
+
version = "0.52.6"
|
|
555
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
556
|
+
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
|
557
|
+
|
|
558
|
+
[[package]]
|
|
559
|
+
name = "windows_x86_64_gnullvm"
|
|
560
|
+
version = "0.52.6"
|
|
561
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
562
|
+
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
|
563
|
+
|
|
564
|
+
[[package]]
|
|
565
|
+
name = "windows_x86_64_msvc"
|
|
566
|
+
version = "0.52.6"
|
|
567
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
568
|
+
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
|
569
|
+
|
|
570
|
+
[[package]]
|
|
571
|
+
name = "zeroize"
|
|
572
|
+
version = "1.8.2"
|
|
573
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
574
|
+
checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
|
|
575
|
+
|
|
576
|
+
[[package]]
|
|
577
|
+
name = "zmij"
|
|
578
|
+
version = "1.0.20"
|
|
579
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
580
|
+
checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
|
|
3
|
+
[package]
|
|
4
|
+
name = "dkdc-md-cli"
|
|
5
|
+
version = "0.1.0"
|
|
6
|
+
edition = "2024"
|
|
7
|
+
rust-version = "1.93"
|
|
8
|
+
authors = ["Cody <cody@dkdc.dev>"]
|
|
9
|
+
license = "MIT"
|
|
10
|
+
description = "CLI for the MotherDuck REST API"
|
|
11
|
+
repository = "https://github.com/lostmygithubaccount/dkdc-md-cli"
|
|
12
|
+
homepage = "https://github.com/lostmygithubaccount/dkdc-md-cli"
|
|
13
|
+
keywords = ["motherduck", "cli", "duckdb", "api"]
|
|
14
|
+
categories = ["command-line-utilities"]
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
|
|
17
|
+
[lib]
|
|
18
|
+
name = "dkdc_md_cli"
|
|
19
|
+
path = "src/lib.rs"
|
|
20
|
+
|
|
21
|
+
[[bin]]
|
|
22
|
+
name = "md"
|
|
23
|
+
path = "src/main.rs"
|
|
24
|
+
|
|
25
|
+
[dependencies]
|
|
26
|
+
clap = { version = "4.5", features = ["derive"] }
|
|
27
|
+
ureq = "3"
|
|
28
|
+
serde = { version = "1", features = ["derive"] }
|
|
29
|
+
serde_json = "1"
|
|
30
|
+
anyhow = "1"
|
|
31
|
+
percent-encoding = "2"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# dkdc-md-cli
|
|
2
|
+
|
|
3
|
+
CLI for the [MotherDuck](https://motherduck.com) REST API.
|
|
4
|
+
|
|
5
|
+
## install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# from source (Rust binary)
|
|
9
|
+
cargo install --path dkdc-md-cli
|
|
10
|
+
|
|
11
|
+
# from source (Python)
|
|
12
|
+
uv tool install .
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## authentication
|
|
16
|
+
|
|
17
|
+
Set one of the following environment variables:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
export MOTHERDUCK_TOKEN="your-token-here"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Also accepted: `motherduck_token`, `MOTHERDUCK_API_KEY`, `motherduck_api_key`.
|
|
24
|
+
|
|
25
|
+
## usage
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# service accounts
|
|
29
|
+
md service-account create myaccount
|
|
30
|
+
md service-account delete myaccount
|
|
31
|
+
|
|
32
|
+
# duckling configuration
|
|
33
|
+
md duckling get myaccount
|
|
34
|
+
md duckling set myaccount --rw-size pulse --rs-size pulse --flock-size 1
|
|
35
|
+
|
|
36
|
+
# access tokens
|
|
37
|
+
md token list myaccount
|
|
38
|
+
md token create myaccount --name my-token --ttl 3600
|
|
39
|
+
md token delete myaccount <token-id>
|
|
40
|
+
|
|
41
|
+
# active accounts
|
|
42
|
+
md account list-active
|
|
43
|
+
|
|
44
|
+
# JSON output (for piping to jq, etc.)
|
|
45
|
+
md token list myaccount -o json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## development
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bin/setup # install rustup + uv
|
|
52
|
+
bin/build # build Rust + Python
|
|
53
|
+
bin/check # lint + test
|
|
54
|
+
bin/format # auto-format
|
|
55
|
+
bin/install # install locally
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Integration tests (requires `MOTHERDUCK_TOKEN`):
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
tests/integration-test
|
|
62
|
+
```
|