-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpackage.json
More file actions
731 lines (731 loc) · 25.1 KB
/
package.json
File metadata and controls
731 lines (731 loc) · 25.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
{
"name": "uv-toolkit",
"displayName": "UV Toolkit",
"description": "Enhance your Python development experience with uv - the fast Python package manager. Provides syntax highlighting, package links, command integration, and more.",
"version": "0.1.10",
"engines": {
"vscode": "^1.70.0"
},
"icon": "logo.png",
"author": {
"name": "Eom, TaeHyun",
"email": "the0807.eom@gmail.com",
"url": "https://github.com/the0807"
},
"repository": {
"url": "https://github.com/the0807/UV-Toolkit",
"type": "github"
},
"publisher": "the0807",
"categories": [
"Programming Languages",
"Data Science",
"Snippets",
"Other"
],
"activationEvents": [
"onLanguage:pyproject-toml",
"onLanguage:python",
"onLanguage:uvlock",
"onCommand:uv.init",
"onCommand:uv.sync",
"onCommand:uv.upgrade",
"onCommand:uv.cache.clean",
"onCommand:uv.removePackage",
"onCommand:uv.searchPackage",
"onCommand:uv.generateLock",
"onCommand:uv.upgradeDependencies",
"onCommand:uv.manageVirtualEnv",
"onCommand:uv.activateVirtualEnv",
"onCommand:uv.runScript",
"onCommand:uv.addScriptDependency",
"onCommand:uv.installPython",
"onCommand:uv.pinPython",
"onCommand:uv.installTool",
"onCommand:uv.runTool",
"onCommand:uv.add",
"onCommand:uv.addDev",
"onCommand:uv.setPep723Interpreter",
"onCommand:uv.installUv"
],
"main": "./out/extension.js",
"contributes": {
"languages": [
{
"id": "uvlock",
"extensions": [
".lock"
],
"filenames": [
"uv.lock"
],
"aliases": [
"UV Lock",
"uv.lock"
]
},
{
"id": "pyproject-toml",
"extensions": [
".toml"
],
"filenames": [
"pyproject.toml"
],
"aliases": [
"PyProject TOML",
"pyproject.toml"
]
}
],
"grammars": [
{
"language": "pyproject-toml",
"scopeName": "source.toml.enhanced",
"path": "./syntaxes/toml.tmLanguage.json"
},
{
"language": "uvlock",
"scopeName": "source.uvlock",
"path": "./syntaxes/uvlock.tmLanguage.json"
}
],
"commands": [
{
"command": "uv.init",
"title": "UV: Initialize Project"
},
{
"command": "uv.sync",
"title": "UV: Sync Dependencies"
},
{
"command": "uv.upgrade",
"title": "UV: Upgrade Packages"
},
{
"command": "uv.cache.clean",
"title": "UV: Clean Cache"
},
{
"command": "uv.removePackage",
"title": "UV: Remove Package from pyproject.toml"
},
{
"command": "uv.searchPackage",
"title": "UV: Search Package on PyPI"
},
{
"command": "uv.generateLock",
"title": "UV: Generate Lock File"
},
{
"command": "uv.upgradeDependencies",
"title": "UV: Upgrade Dependencies"
},
{
"command": "uv.manageVirtualEnv",
"title": "UV: Create Virtual Environment"
},
{
"command": "uv.activateVirtualEnv",
"title": "UV: Activate Virtual Environment"
},
{
"command": "uv.runScript",
"title": "UV: Run Python Script"
},
{
"command": "uv.addScriptDependency",
"title": "UV: Add Script Dependency"
},
{
"command": "uv.installPython",
"title": "UV: Install Python Version"
},
{
"command": "uv.pinPython",
"title": "UV: Pin Python Version"
},
{
"command": "uv.installTool",
"title": "UV: Install Tool"
},
{
"command": "uv.runTool",
"title": "UV: Run Tool with UVX"
},
{
"command": "uv.add",
"title": "UV: Add Package to Project"
},
{
"command": "uv.addDev",
"title": "UV: Add Dev Package to Project"
},
{
"command": "uv.setPep723Interpreter",
"title": "UV: Set Interpreter for PEP 723 Script"
},
{
"command": "uv.installUv",
"title": "UV: Install uv"
}
],
"menus": {
"explorer/context": [
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.add",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.addDev",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.removePackage",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.searchPackage",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.generateLock",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.upgradeDependencies",
"group": "uv"
}
],
"editor/context": [
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.add",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.addDev",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.removePackage",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.searchPackage",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.generateLock",
"group": "uv"
},
{
"when": "resourceFilename == pyproject.toml",
"command": "uv.upgradeDependencies",
"group": "uv"
}
],
"explorer/context/resource/group": [
{
"when": "resourceExtname == .py",
"command": "uv.runScript",
"group": "uv"
},
{
"when": "resourceExtname == .py",
"command": "uv.addScriptDependency",
"group": "uv"
}
],
"editor/context/resource": [
{
"when": "resourceExtname == .py",
"command": "uv.runScript",
"group": "uv"
},
{
"when": "resourceExtname == .py",
"command": "uv.addScriptDependency",
"group": "uv"
}
],
"commandPalette": [
{
"command": "uv.init",
"group": "uv"
},
{
"command": "uv.installPython",
"group": "uv"
},
{
"command": "uv.pinPython",
"group": "uv"
},
{
"command": "uv.installTool",
"group": "uv"
},
{
"command": "uv.runTool",
"group": "uv"
}
]
},
"configuration": {
"title": "UV Toolkit"
},
"languageModelTools": [
{
"name": "init_project",
"displayName": "Initialize UV Project",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-init",
"icon": "$(new-folder)",
"userDescription": "Initialize a new Python project with UV package manager",
"modelDescription": "Initialize a new Python project using UV package manager. This tool creates a new pyproject.toml file and sets up the project structure. Use when the user wants to start a new Python project or when they mention initializing/creating a new UV project. The tool will prompt for a project name if not provided.",
"inputSchema": {
"type": "object",
"properties": {
"projectName": {
"type": "string",
"description": "Name of the project to initialize. If not provided, will use the workspace folder name."
}
}
}
},
{
"name": "sync_dependencies",
"displayName": "Sync Dependencies",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-sync",
"icon": "$(sync)",
"userDescription": "Sync project dependencies using UV",
"modelDescription": "Synchronize project dependencies based on pyproject.toml or requirements files. Use when the user wants to install or update dependencies, mentions syncing packages, or needs to ensure their environment matches the project requirements. Supports syncing specific groups or from specific files.",
"inputSchema": {
"type": "object",
"properties": {
"syncType": {
"type": "string",
"enum": [
"basic",
"from-file",
"groups"
],
"description": "Type of sync operation to perform",
"default": "basic"
},
"requirementsFile": {
"type": "string",
"description": "Path to requirements file (when syncType is 'from-file')"
},
"groups": {
"type": "string",
"description": "Comma-separated list of dependency groups to sync (when syncType is 'groups')"
}
}
}
},
{
"name": "add_package",
"displayName": "Add Package",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-add",
"icon": "$(add)",
"userDescription": "Add a Python package to the project",
"modelDescription": "Add a Python package to the project's dependencies in pyproject.toml. Use when the user wants to install a new package, mentions adding a dependency, or needs to include a specific library in their project. Supports version constraints and extras.",
"inputSchema": {
"type": "object",
"properties": {
"packageName": {
"type": "string",
"description": "Name of the package to add (required)"
},
"version": {
"type": "string",
"description": "Version constraint for the package (optional, e.g., '>=1.0.0', '==2.1.0')"
},
"extras": {
"type": "string",
"description": "Comma-separated list of extras to include (optional, e.g., 'dev,test')"
}
},
"required": [
"packageName"
]
}
},
{
"name": "add_dev_package",
"displayName": "Add Dev Package",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-add-dev",
"icon": "$(add)",
"userDescription": "Add a Python package to the project as a development dependency",
"modelDescription": "Add a Python package to the project's development dependencies in pyproject.toml. Use when the user wants to install a development package, mentions adding a dev dependency, or needs to include a library for development/testing purposes. Supports version constraints and extras.",
"inputSchema": {
"type": "object",
"properties": {
"packageName": {
"type": "string",
"description": "Name of the package to add as a development dependency (required)"
},
"version": {
"type": "string",
"description": "Version constraint for the package (optional, e.g., '>=1.0.0', '==2.1.0')"
},
"extras": {
"type": "string",
"description": "Comma-separated list of extras to include (optional, e.g., 'dev,test')"
}
},
"required": [
"packageName"
]
}
},
{
"name": "upgrade_packages",
"displayName": "Upgrade Packages",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-upgrade",
"icon": "$(arrow-up)",
"userDescription": "Upgrade Python packages to their latest versions",
"modelDescription": "Upgrade project dependencies to their latest compatible versions. Use when the user wants to update packages, mentions upgrading dependencies, or needs to get the latest versions of their libraries. Can upgrade all packages or specific ones.",
"inputSchema": {
"type": "object",
"properties": {
"upgradeType": {
"type": "string",
"enum": [
"all",
"specific"
],
"description": "Whether to upgrade all packages or a specific package",
"default": "all"
},
"packageName": {
"type": "string",
"description": "Name of specific package to upgrade (when upgradeType is 'specific')"
}
}
}
},
{
"name": "clean_cache",
"displayName": "Clean Cache",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-clean",
"icon": "$(trash)",
"userDescription": "Clean UV package cache",
"modelDescription": "Clean the UV package cache to free up disk space and resolve caching issues. Use when the user mentions cache problems, wants to clear storage, or needs to resolve package installation issues that might be cache-related.",
"inputSchema": {
"type": "object",
"properties": {}
}
},
{
"name": "generate_lock",
"displayName": "Generate Lock File",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-lock",
"icon": "$(lock)",
"userDescription": "Generate uv.lock file from pyproject.toml",
"modelDescription": "Generate a lock file (uv.lock) from pyproject.toml to pin exact dependency versions. Use when the user wants to create reproducible builds, mentions lock files, or needs to freeze dependency versions. Supports including extras and specific groups.",
"inputSchema": {
"type": "object",
"properties": {
"includeExtras": {
"type": "string",
"enum": [
"none",
"all",
"specific"
],
"description": "Which extras to include in the lock file",
"default": "none"
},
"extras": {
"type": "string",
"description": "Comma-separated list of specific extras to include (when includeExtras is 'specific')"
},
"groups": {
"type": "string",
"description": "Comma-separated list of dependency groups to include"
}
}
}
},
{
"name": "create_venv",
"displayName": "Create Virtual Environment",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-venv",
"icon": "$(vm)",
"userDescription": "Create a virtual environment with UV",
"modelDescription": "Create a Python virtual environment using UV. Use when the user wants to set up an isolated Python environment, mentions virtual environments, or needs to create a clean development environment. Supports specifying Python version.",
"inputSchema": {
"type": "object",
"properties": {
"pythonVersion": {
"type": "string",
"description": "Specific Python version to use (optional, e.g., '3.11', '3.12')"
}
}
}
},
{
"name": "run_script",
"displayName": "Run Python Script",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-run",
"icon": "$(play)",
"userDescription": "Run a Python script with UV",
"modelDescription": "Execute a Python script using UV's managed environment. Use when the user wants to run a Python file, mentions executing scripts, or needs to run code with project dependencies. Supports specifying Python version.",
"inputSchema": {
"type": "object",
"properties": {
"scriptPath": {
"type": "string",
"description": "Path to the Python script to run (required)"
},
"pythonVersion": {
"type": "string",
"description": "Specific Python version to use (optional, e.g., '3.11', '3.12')"
}
},
"required": [
"scriptPath"
]
}
},
{
"name": "add_script_dependency",
"displayName": "Add Script Dependency",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-script-dep",
"icon": "$(link)",
"userDescription": "Add inline dependency to a Python script",
"modelDescription": "Add inline dependencies to a Python script file. Use when the user wants to add dependencies directly to a script file, mentions script-specific dependencies, or needs to create self-contained scripts with their own requirements.",
"inputSchema": {
"type": "object",
"properties": {
"scriptPath": {
"type": "string",
"description": "Path to the Python script file (required)"
},
"packageName": {
"type": "string",
"description": "Name of the package to add as dependency (required)"
}
},
"required": [
"scriptPath",
"packageName"
]
}
},
{
"name": "install_python",
"displayName": "Install Python Version",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-python-install",
"icon": "$(desktop-download)",
"userDescription": "Install a specific Python version with UV",
"modelDescription": "Install a specific Python version using UV's Python management. Use when the user needs a different Python version, mentions installing Python, or requires a specific Python version for their project.",
"inputSchema": {
"type": "object",
"properties": {
"pythonVersion": {
"type": "string",
"description": "Python version to install (required, e.g., '3.11', '3.12', '3.13')"
}
},
"required": [
"pythonVersion"
]
}
},
{
"name": "pin_python",
"displayName": "Pin Python Version",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-python-pin",
"icon": "$(pin)",
"userDescription": "Pin Python version for the current project",
"modelDescription": "Pin a specific Python version for the current project. Use when the user wants to lock the Python version, mentions pinning Python, or needs to ensure consistent Python version across environments.",
"inputSchema": {
"type": "object",
"properties": {
"pythonVersion": {
"type": "string",
"description": "Python version to pin (required, e.g., '3.11', '3.12', '3.13')"
}
},
"required": [
"pythonVersion"
]
}
},
{
"name": "install_tool",
"displayName": "Install Tool",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-tool-install",
"icon": "$(tools)",
"userDescription": "Install a Python tool globally with UV",
"modelDescription": "Install a Python tool globally using UV's tool management. Use when the user wants to install command-line tools like ruff, black, pytest, etc., mentions installing tools, or needs global Python utilities.",
"inputSchema": {
"type": "object",
"properties": {
"toolName": {
"type": "string",
"description": "Name of the tool to install (required, e.g., 'ruff', 'black', 'pytest')"
}
},
"required": [
"toolName"
]
}
},
{
"name": "run_tool",
"displayName": "Run Tool with UVX",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uvx-run",
"icon": "$(terminal)",
"userDescription": "Run a Python tool with UVX",
"modelDescription": "Execute a Python tool using UVX (UV's tool runner). Use when the user wants to run Python tools without installing them globally, mentions running tools temporarily, or needs to execute command-line utilities.",
"inputSchema": {
"type": "object",
"properties": {
"toolName": {
"type": "string",
"description": "Name of the tool to run (required, e.g., 'ruff', 'black', 'pytest')"
},
"arguments": {
"type": "string",
"description": "Arguments to pass to the tool (optional)"
}
},
"required": [
"toolName"
]
}
},
{
"name": "activate_venv",
"displayName": "Activate Virtual Environment",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-activate-venv",
"icon": "$(vm-active)",
"userDescription": "Activate a virtual environment in a new terminal",
"modelDescription": "Activate an existing virtual environment in a new terminal. Use when the user wants to activate a virtual environment, mentions activating venv, or needs to work within an isolated Python environment. The tool will automatically detect existing virtual environments in common locations (.venv, venv, .env, env) and activate the appropriate one.",
"inputSchema": {
"type": "object",
"properties": {}
}
},
{
"name": "set_pep723_interpreter",
"displayName": "Set PEP 723 Interpreter",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-pep723",
"icon": "$(python)",
"userDescription": "Automatically set the Python interpreter based on PEP 723 script metadata",
"modelDescription": "Reads a Python script's PEP 723 inline metadata (# /// script block) to find the required Python version, then sets the VS Code Python interpreter accordingly. Use when the user wants to configure the interpreter for a PEP 723 script, or mentions inline script dependencies.",
"inputSchema": {
"type": "object",
"properties": {
"scriptPath": {
"type": "string",
"description": "Relative path to the Python script file (required)"
}
},
"required": ["scriptPath"]
}
},
{
"name": "install_uv",
"displayName": "Install uv",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-install",
"icon": "$(cloud-download)",
"userDescription": "Install the uv Python package manager",
"modelDescription": "Checks whether uv is installed and, if not, installs it using the official platform-specific script. Use when the user mentions uv is missing, wants to install uv, or when other uv commands fail because uv is not found.",
"inputSchema": {
"type": "object",
"properties": {}
}
},
{
"name": "remove_package",
"displayName": "Remove Package",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-remove",
"icon": "$(trash)",
"userDescription": "Remove a Python package from the project",
"modelDescription": "Remove a Python package from the project's dependencies in pyproject.toml using 'uv remove'. Use when the user wants to uninstall a package, mentions removing a dependency, or needs to delete a library from their project.",
"inputSchema": {
"type": "object",
"properties": {
"packageName": {
"type": "string",
"description": "Name of the package to remove (required)"
}
},
"required": [
"packageName"
]
}
},
{
"name": "search_package",
"displayName": "Search Package",
"canBeReferencedInPrompt": true,
"toolReferenceName": "uv-search",
"icon": "$(search)",
"userDescription": "Search for a Python package on PyPI",
"modelDescription": "Search for a Python package on PyPI and return its information including latest version and description. Use when the user wants to find a package, check if a package exists, or get package details before adding it.",
"inputSchema": {
"type": "object",
"properties": {
"packageName": {
"type": "string",
"description": "Name of the package to search for on PyPI (required)"
}
},
"required": [
"packageName"
]
}
}
]
},
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^18.0.0",
"@types/vscode": "^1.70.0",
"@vscode/test-electron": "^2.3.0",
"typescript": "^4.7.4"
}
}