@wirecat/yandex-disk-cli 0.0.0-stage → 0.1.0
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/CHANGELOG.md +25 -0
- package/LICENSE +204 -0
- package/README.md +243 -2
- package/contracts/wirecat.json +1554 -0
- package/dist/bin/ydisk.d.ts +3 -0
- package/dist/bin/ydisk.d.ts.map +1 -0
- package/dist/bin/ydisk.js +40 -0
- package/dist/bin/ydisk.js.map +1 -0
- package/dist/bundle/all-profiles-4OLZF3RT.js +279 -0
- package/dist/bundle/anthropic-DKB4OJXZ.js +91 -0
- package/dist/bundle/app-server-G4545SSV.js +247 -0
- package/dist/bundle/bun-RXEQKFED.js +169 -0
- package/dist/bundle/bun-sqlite-VHT5LN7U.js +76 -0
- package/dist/bundle/chunk-2BITUXGC.js +12289 -0
- package/dist/bundle/chunk-2CLWDQKA.js +39330 -0
- package/dist/bundle/chunk-2JFDOPKA.js +9575 -0
- package/dist/bundle/chunk-3GVI2MAO.js +106 -0
- package/dist/bundle/chunk-3SZBWBMI.js +131 -0
- package/dist/bundle/chunk-44VSEXW6.js +4054 -0
- package/dist/bundle/chunk-4YPRRQBE.js +95 -0
- package/dist/bundle/chunk-5COYRL5B.js +379 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5DM7DIZL.js +1402 -0
- package/dist/bundle/chunk-6R2DVTVZ.js +24 -0
- package/dist/bundle/chunk-762BS35H.js +2787 -0
- package/dist/bundle/chunk-AG64V7AB.js +1233 -0
- package/dist/bundle/chunk-BC5HGIXB.js +334 -0
- package/dist/bundle/chunk-BH7LFEX7.js +36 -0
- package/dist/bundle/chunk-BLNPGY7N.js +53 -0
- package/dist/bundle/chunk-CNIA2LJF.js +372 -0
- package/dist/bundle/chunk-COSXMDC7.js +230 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-D7FO33KU.js +785 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DJH26PQ3.js +1396 -0
- package/dist/bundle/chunk-DJPT7IUC.js +64567 -0
- package/dist/bundle/chunk-DTMSCZDW.js +209 -0
- package/dist/bundle/chunk-E6LGZ5LX.js +16 -0
- package/dist/bundle/chunk-E6YRIHS5.js +92 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-F3DDSZTF.js +78 -0
- package/dist/bundle/chunk-F4WWTQNL.js +188 -0
- package/dist/bundle/chunk-FDDAUASC.js +1028 -0
- package/dist/bundle/chunk-FMNPG6N2.js +170 -0
- package/dist/bundle/chunk-FOKJ4POB.js +274 -0
- package/dist/bundle/chunk-G22C7JG6.js +731 -0
- package/dist/bundle/chunk-GA442SYZ.js +161 -0
- package/dist/bundle/chunk-GEBSW7UK.js +6848 -0
- package/dist/bundle/chunk-GGRKWAOK.js +594 -0
- package/dist/bundle/chunk-HHINRNZA.js +788 -0
- package/dist/bundle/chunk-HUZCL33L.js +128 -0
- package/dist/bundle/chunk-IALSIQVT.js +142 -0
- package/dist/bundle/chunk-IOXR2QBX.js +398 -0
- package/dist/bundle/chunk-J5CXR6VX.js +63 -0
- package/dist/bundle/chunk-J5PWSTOX.js +82 -0
- package/dist/bundle/chunk-J7BVAEHR.js +364 -0
- package/dist/bundle/chunk-JH46HMZW.js +1334 -0
- package/dist/bundle/chunk-JOBO7F6W.js +52 -0
- package/dist/bundle/chunk-JXZ5B3L5.js +2333 -0
- package/dist/bundle/chunk-KBIAMDZN.js +66 -0
- package/dist/bundle/chunk-KFVDL2QS.js +146 -0
- package/dist/bundle/chunk-LNHTLSR5.js +288 -0
- package/dist/bundle/chunk-M24RAKMJ.js +58 -0
- package/dist/bundle/chunk-MDQ57Q3H.js +1197 -0
- package/dist/bundle/chunk-MGUEZYFA.js +5546 -0
- package/dist/bundle/chunk-MLXQ4X5L.js +206 -0
- package/dist/bundle/chunk-NQAKARHE.js +54 -0
- package/dist/bundle/chunk-OF7VVUDQ.js +23 -0
- package/dist/bundle/chunk-OQVPE3XK.js +324 -0
- package/dist/bundle/chunk-OR3QG7UR.js +259 -0
- package/dist/bundle/chunk-OUUYVROP.js +76 -0
- package/dist/bundle/chunk-PQBAM64O.js +168 -0
- package/dist/bundle/chunk-PYVIA7WF.js +88 -0
- package/dist/bundle/chunk-Q6HK3PHE.js +72 -0
- package/dist/bundle/chunk-QB3KECV2.js +218 -0
- package/dist/bundle/chunk-QGWXSFYN.js +73 -0
- package/dist/bundle/chunk-RC5QAAAE.js +29 -0
- package/dist/bundle/chunk-RMJ26HLB.js +18 -0
- package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
- package/dist/bundle/chunk-T7ZUDA4C.js +72 -0
- package/dist/bundle/chunk-TRCSMVV5.js +72 -0
- package/dist/bundle/chunk-UD2BQEKA.js +46 -0
- package/dist/bundle/chunk-V4TL55GS.js +1068 -0
- package/dist/bundle/chunk-VJNWN5VU.js +4072 -0
- package/dist/bundle/chunk-VRRNBLMA.js +1227 -0
- package/dist/bundle/chunk-WUCMMNFJ.js +771 -0
- package/dist/bundle/chunk-XDESE3NY.js +44 -0
- package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
- package/dist/bundle/chunk-XQUUANA2.js +24600 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-Z2QEON7B.js +2275 -0
- package/dist/bundle/chunk-ZMJ56GME.js +7 -0
- package/dist/bundle/chunk-ZTSB3D7Q.js +100 -0
- package/dist/bundle/chunk-ZVJWD3FK.js +38 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-YIOYGPJA.js +40 -0
- package/dist/bundle/command-server-entry-MHBQDXS4.js +169 -0
- package/dist/bundle/decode-NUGJIOUW.js +297 -0
- package/dist/bundle/definitions-AILHKEQT.js +2005 -0
- package/dist/bundle/dispatch-5LC4UEGY.js +411 -0
- package/dist/bundle/dist-4I2W6X2I.js +7577 -0
- package/dist/bundle/echarts-MHSH6PGC.js +42501 -0
- package/dist/bundle/embed-ZDXTHHYS.js +38 -0
- package/dist/bundle/embedder-XFEELFUL.js +111 -0
- package/dist/bundle/failure-5S7VPBYK.js +25 -0
- package/dist/bundle/first-run-JHCHT3RJ.js +29 -0
- package/dist/bundle/first-screen-FHGQ6QRV.js +40 -0
- package/dist/bundle/instructions-WKSMBUFX.js +11 -0
- package/dist/bundle/mcp-HS2ZDUVR.js +167 -0
- package/dist/bundle/mdast-util-from-markdown-R66F4HZA.js +1958 -0
- package/dist/bundle/mdast-util-gfm-LN2ELINH.js +2699 -0
- package/dist/bundle/meeting-combined-K4U4NYRZ.js +25 -0
- package/dist/bundle/meeting-model-KCEG6Y5O.js +26 -0
- package/dist/bundle/meeting-semantic-VYGSV3H6.js +22 -0
- package/dist/bundle/micromark-extension-gfm-5X7YT43T.js +1838 -0
- package/dist/bundle/node-CM6NC6UE.js +176 -0
- package/dist/bundle/node-KM3CUABH.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-5YDQ3LIJ.js +74 -0
- package/dist/bundle/notes-search-PGO7KM2U.js +62 -0
- package/dist/bundle/oauth-NY4C5UCK.js +20 -0
- package/dist/bundle/open-YNUTA6ZE.js +23 -0
- package/dist/bundle/openai-4CVT5PHH.js +241 -0
- package/dist/bundle/process-2XT3TL27.js +91 -0
- package/dist/bundle/program-FMIVF5T6.js +31904 -0
- package/dist/bundle/prompt-VNWY3H6S.js +17 -0
- package/dist/bundle/recognize-JS4PBPSZ.js +26 -0
- package/dist/bundle/remote-RCLFH4V2.js +32 -0
- package/dist/bundle/rerank-EG6VKYGO.js +52 -0
- package/dist/bundle/schemas-ED2LHKXK.js +645 -0
- package/dist/bundle/serve-AHG25QXB.js +199 -0
- package/dist/bundle/server-5FTB7WM3.js +78 -0
- package/dist/bundle/server-JNZVSAZE.js +209 -0
- package/dist/bundle/sqlite-runtime-XSZOAQPF.js +20 -0
- package/dist/bundle/state-XGVAJFF7.js +36 -0
- package/dist/bundle/store-OHSCWZEV.js +177 -0
- package/dist/bundle/store-PKSPKJXL.js +293 -0
- package/dist/bundle/store-maintenance-command-KAWGBSWK.js +69 -0
- package/dist/bundle/ydisk.js +183 -0
- package/dist/commands/api.d.ts +9 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +59 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/comments.d.ts +3 -0
- package/dist/commands/comments.d.ts.map +1 -0
- package/dist/commands/comments.js +114 -0
- package/dist/commands/comments.js.map +1 -0
- package/dist/commands/files.d.ts +3 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +272 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/library.d.ts +13 -0
- package/dist/commands/library.d.ts.map +1 -0
- package/dist/commands/library.js +118 -0
- package/dist/commands/library.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +99 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +18 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +62 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +80 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +77 -0
- package/dist/context.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +2001 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/manifest.d.ts +6 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +1473 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +127 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +545 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +829 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/identity.d.ts +10 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +33 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +65 -0
- package/dist/program.js.map +1 -0
- package/dist/sample/comments.d.ts +61 -0
- package/dist/sample/comments.d.ts.map +1 -0
- package/dist/sample/comments.js +39 -0
- package/dist/sample/comments.js.map +1 -0
- package/dist/sample/records.d.ts +16 -0
- package/dist/sample/records.d.ts.map +1 -0
- package/dist/sample/records.js +22 -0
- package/dist/sample/records.js.map +1 -0
- package/dist/sample/transport.d.ts +42 -0
- package/dist/sample/transport.d.ts.map +1 -0
- package/dist/sample/transport.js +153 -0
- package/dist/sample/transport.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/dist/yandex/source.d.ts +39 -0
- package/dist/yandex/source.d.ts.map +1 -0
- package/dist/yandex/source.js +189 -0
- package/dist/yandex/source.js.map +1 -0
- package/dist/yandex/transport.d.ts +41 -0
- package/dist/yandex/transport.d.ts.map +1 -0
- package/dist/yandex/transport.js +152 -0
- package/dist/yandex/transport.js.map +1 -0
- package/dist/yandex/writes.d.ts +27 -0
- package/dist/yandex/writes.d.ts.map +1 -0
- package/dist/yandex/writes.js +61 -0
- package/dist/yandex/writes.js.map +1 -0
- package/package.json +88 -4
- package/skills/yandex-disk-cli/SKILL.md +46 -0
- package/skills/yandex-disk-cli/references/api/api-disk-operations-operation-id.md +13 -0
- package/skills/yandex-disk-cli/references/api/api-disk-public-resources.md +50 -0
- package/skills/yandex-disk-cli/references/api/api-disk-resources.md +171 -0
- package/skills/yandex-disk-cli/references/api/api-disk-trash-resources.md +48 -0
- package/skills/yandex-disk-cli/references/api/api-disk.md +13 -0
- package/skills/yandex-disk-cli/references/api.md +17 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Notable changes to `@wirecat/yandex-disk-cli`. One section per version, newest first.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 — 17.11.2026
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Started from `@wirecat/cli-template` 0.25.0.
|
|
10
|
+
- **Sign in with a Yandex OAuth token** pasted once: `session start` reads it hidden or from stdin, checks it with
|
|
11
|
+
`GET /v1/disk` and keeps it in the system keyring; `session status --check` and `doctor --online` say whose it is.
|
|
12
|
+
- **Chosen Disk folders as searchable text**: `folders add <path>`, `sync`, `status`, `documents list|show|export`,
|
|
13
|
+
`search`, `catalog`, tags, notes and memories, cli-core's shared documents commands. Each sync walks the chosen
|
|
14
|
+
folders again (the Disk API has no change feed) and reads only files whose MD5 changed; a moved file keeps its id,
|
|
15
|
+
tags and notes. Text from PDF, docx, xlsx, CSV, TSV, text and Markdown. Times are kept and answered in UTC.
|
|
16
|
+
- **The files live**: `files list|show|download|upload|copy|move|create|delete|restore|publish|unpublish`, by Disk
|
|
17
|
+
path. `files delete` moves to the trash. `--replace` and `files delete` ask as `files.delete` does, `files publish`
|
|
18
|
+
as `files.share` does, and `--dry-run` shows each key the write checks. `files publish` answers the public link, or
|
|
19
|
+
leaves `public_url` out when it cannot read it back. Downloads and uploads go to the address Yandex gives, without
|
|
20
|
+
the token.
|
|
21
|
+
- **`api`**: one command per operation of Yandex's Swagger 1.2 description, 20 in all. The three that answer a
|
|
22
|
+
download or upload link are left out, and a resource's `file`, `preview` and `sizes` links are taken out of every
|
|
23
|
+
answer. `--all` pages where the API pages. A permanent delete, `overwrite=true` and a public link ask by
|
|
24
|
+
`files.delete` and `files.share`. An operation that does what a `files` command does also checks that command's
|
|
25
|
+
key: `files.move: deny` stops `api resources-move` too, in the run and in `--dry-run`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Copyright (c) 2026 Viacheslav Ptsarev
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Apache License
|
|
5
|
+
Version 2.0, January 2004
|
|
6
|
+
http://www.apache.org/licenses/
|
|
7
|
+
|
|
8
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
9
|
+
|
|
10
|
+
1. Definitions.
|
|
11
|
+
|
|
12
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
13
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
14
|
+
|
|
15
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
16
|
+
the copyright owner that is granting the License.
|
|
17
|
+
|
|
18
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
19
|
+
other entities that control, are controlled by, or are under common
|
|
20
|
+
control with that entity. For the purposes of this definition,
|
|
21
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
22
|
+
direction or management of such entity, whether by contract or
|
|
23
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
24
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
25
|
+
|
|
26
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
27
|
+
exercising permissions granted by this License.
|
|
28
|
+
|
|
29
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
30
|
+
including but not limited to software source code, documentation
|
|
31
|
+
source, and configuration files.
|
|
32
|
+
|
|
33
|
+
"Object" form shall mean any form resulting from mechanical
|
|
34
|
+
transformation or translation of a Source form, including but
|
|
35
|
+
not limited to compiled object code, generated documentation,
|
|
36
|
+
and conversions to other media types.
|
|
37
|
+
|
|
38
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
39
|
+
Object form, made available under the License, as indicated by a
|
|
40
|
+
copyright notice that is included in or attached to the work
|
|
41
|
+
(an example is provided in the Appendix below).
|
|
42
|
+
|
|
43
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
44
|
+
form, that is based on (or derived from) the Work and for which the
|
|
45
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
46
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
47
|
+
of this License, Derivative Works shall not include works that remain
|
|
48
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
49
|
+
the Work and Derivative Works thereof.
|
|
50
|
+
|
|
51
|
+
"Contribution" shall mean any work of authorship, including
|
|
52
|
+
the original version of the Work and any modifications or additions
|
|
53
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
54
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
55
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
56
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
57
|
+
means any form of electronic, verbal, or written communication sent
|
|
58
|
+
to the Licensor or its representatives, including but not limited to
|
|
59
|
+
communication on electronic mailing lists, source code control systems,
|
|
60
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
61
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
62
|
+
excluding communication that is conspicuously marked or otherwise
|
|
63
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
64
|
+
|
|
65
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
66
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
67
|
+
subsequently incorporated within the Work.
|
|
68
|
+
|
|
69
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
70
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
71
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
72
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
73
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
74
|
+
Work and such Derivative Works in Source or Object form.
|
|
75
|
+
|
|
76
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
(except as stated in this section) patent license to make, have made,
|
|
80
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
81
|
+
where such license applies only to those patent claims licensable
|
|
82
|
+
by such Contributor that are necessarily infringed by their
|
|
83
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
84
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
85
|
+
institute patent litigation against any entity (including a
|
|
86
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
87
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
88
|
+
or contributory patent infringement, then any patent licenses
|
|
89
|
+
granted to You under this License for that Work shall terminate
|
|
90
|
+
as of the date such litigation is filed.
|
|
91
|
+
|
|
92
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
93
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
94
|
+
modifications, and in Source or Object form, provided that You
|
|
95
|
+
meet the following conditions:
|
|
96
|
+
|
|
97
|
+
(a) You must give any other recipients of the Work or
|
|
98
|
+
Derivative Works a copy of this License; and
|
|
99
|
+
|
|
100
|
+
(b) You must cause any modified files to carry prominent notices
|
|
101
|
+
stating that You changed the files; and
|
|
102
|
+
|
|
103
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
104
|
+
that You distribute, all copyright, patent, trademark, and
|
|
105
|
+
attribution notices from the Source form of the Work,
|
|
106
|
+
excluding those notices that do not pertain to any part of
|
|
107
|
+
the Derivative Works; and
|
|
108
|
+
|
|
109
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
110
|
+
distribution, then any Derivative Works that You distribute must
|
|
111
|
+
include a readable copy of the attribution notices contained
|
|
112
|
+
within such NOTICE file, excluding those notices that do not
|
|
113
|
+
pertain to any part of the Derivative Works, in at least one
|
|
114
|
+
of the following places: within a NOTICE text file distributed
|
|
115
|
+
as part of the Derivative Works; within the Source form or
|
|
116
|
+
documentation, if provided along with the Derivative Works; or,
|
|
117
|
+
within a display generated by the Derivative Works, if and
|
|
118
|
+
wherever such third-party notices normally appear. The contents
|
|
119
|
+
of the NOTICE file are for informational purposes only and
|
|
120
|
+
do not modify the License. You may add Your own attribution
|
|
121
|
+
notices within Derivative Works that You distribute, alongside
|
|
122
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
123
|
+
that such additional attribution notices cannot be construed
|
|
124
|
+
as modifying the License.
|
|
125
|
+
|
|
126
|
+
You may add Your own copyright statement to Your modifications and
|
|
127
|
+
may provide additional or different license terms and conditions
|
|
128
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
129
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
130
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
131
|
+
the conditions stated in this License.
|
|
132
|
+
|
|
133
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
134
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
135
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
136
|
+
this License, without any additional terms or conditions.
|
|
137
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
138
|
+
the terms of any separate license agreement you may have executed
|
|
139
|
+
with Licensor regarding such Contributions.
|
|
140
|
+
|
|
141
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
142
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
143
|
+
except as required for reasonable and customary use in describing the
|
|
144
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
145
|
+
|
|
146
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
147
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
148
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
149
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
150
|
+
implied, including, without limitation, any warranties or conditions
|
|
151
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
152
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
153
|
+
appropriateness of using or redistributing the Work and assume any
|
|
154
|
+
risks associated with Your exercise of permissions under this License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor
|
|
166
|
+
has been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
170
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
171
|
+
or other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
182
|
+
|
|
183
|
+
To apply the Apache License to your work, attach the following
|
|
184
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
185
|
+
replaced with your own identifying information. (Don't include
|
|
186
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
187
|
+
comment syntax for the file format. We also recommend that a
|
|
188
|
+
file or class name and description of purpose be included on the
|
|
189
|
+
same "printed page" as the copyright notice for easier
|
|
190
|
+
identification within third-party archives.
|
|
191
|
+
|
|
192
|
+
Copyright [yyyy] [name of copyright owner]
|
|
193
|
+
|
|
194
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
you may not use this file except in compliance with the License.
|
|
196
|
+
You may obtain a copy of the License at
|
|
197
|
+
|
|
198
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
See the License for the specific language governing permissions and
|
|
204
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,244 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/WireCatLabs/ydisk-cli/main/docs/images/social-preview.png" alt="Yandex Disk for your AI agents: search the folders you choose, and work with the files live" width="100%">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# ydisk: Yandex Disk CLI for AI agents
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Your Yandex Disk from the terminal, for you and for Claude Code, Codex, Cursor or any AI agent. Search the text of
|
|
9
|
+
the folders you choose on your computer, and work with the files live.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/index.md">Docs</a> ·
|
|
14
|
+
<a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/installation.md">Install</a> ·
|
|
15
|
+
<a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/usage.md">Usage</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="https://www.npmjs.com/package/@wirecat/yandex-disk-cli"><img src="https://img.shields.io/npm/v/@wirecat/yandex-disk-cli" alt="npm"></a>
|
|
20
|
+
<a href="https://github.com/WireCatLabs/ydisk-cli/actions/workflows/main.yml"><img src="https://github.com/WireCatLabs/ydisk-cli/actions/workflows/main.yml/badge.svg" alt="CI"></a>
|
|
21
|
+
<a href="https://www.npmjs.com/package/@wirecat/yandex-disk-cli"><img src="https://img.shields.io/npm/dm/@wirecat/yandex-disk-cli" alt="npm downloads"></a>
|
|
22
|
+
<a href="https://github.com/WireCatLabs/ydisk-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License: Apache 2.0"></a>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
- **Your documents, searchable on your computer.** Choose the Disk folders that matter. Their text is copied into
|
|
26
|
+
WireCat's local store, and one search finds it by words and word forms, and by meaning once indexed.
|
|
27
|
+
- **The whole Disk, live.** List, read, download, upload, copy, move, delete to the trash, restore and share files
|
|
28
|
+
without opening a browser.
|
|
29
|
+
- **Safe to give to an agent.** Deleting and public links ask first at a terminal, and one setting turns either off
|
|
30
|
+
for an agent.
|
|
31
|
+
|
|
32
|
+
## What you get
|
|
33
|
+
|
|
34
|
+
- **Find a document by what is in it.** "Where is the lease for the flat?" finds the PDF by its text, not by its
|
|
35
|
+
file name.
|
|
36
|
+
- **Read a file without saving it.** An agent reads the text of a PDF, docx, xlsx, CSV or Markdown file on the Disk
|
|
37
|
+
and answers from it.
|
|
38
|
+
- **Keep the Disk tidy.** Move, copy, rename into a folder, and delete to the trash, where `files restore` brings a
|
|
39
|
+
file back.
|
|
40
|
+
- **Share on request.** A public link for a file or folder, and close it again when you are done.
|
|
41
|
+
- **See the whole picture.** The copies sit next to your messages, mail, notes and meetings from the other WireCat
|
|
42
|
+
tools, so one search covers all of them.
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
You: Find the lease for the flat and send Bob a link to it.
|
|
46
|
+
Agent: (runs ydisk personal search "lease flat")
|
|
47
|
+
/Documents/Flat/lease-2026.pdf, signed by Alice Example on 12.03.
|
|
48
|
+
A public link lets anyone who has it open the file. Make one?
|
|
49
|
+
You: Yes.
|
|
50
|
+
Agent: (runs ydisk personal files publish /Documents/Flat/lease-2026.pdf --yes)
|
|
51
|
+
Here is the link. Say "close it" when Bob has the file.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
*Invented people, illustrative output.*
|
|
55
|
+
|
|
56
|
+
## Why ydisk
|
|
57
|
+
|
|
58
|
+
- **No WireCat server.** `ydisk` talks to Yandex Disk's API from your computer. There is no account with us, and the
|
|
59
|
+
copies of your folders stay in a local store on your computer.
|
|
60
|
+
- **The official Disk API, with your own token.** `ydisk` uses Yandex's
|
|
61
|
+
[Disk REST API](https://yandex.ru/dev/disk-api/doc/en/) with an OAuth token from an app you register. The token
|
|
62
|
+
stays in your system keyring and only goes to Yandex's API.
|
|
63
|
+
- **Search that understands the text.** Text is read from PDF, docx, xlsx, CSV, TSV, plain text and Markdown files.
|
|
64
|
+
Search finds other forms of a word, and matches by meaning once the text is indexed.
|
|
65
|
+
- **Safe to give to an agent.** You decide what an agent may do: read only, or no deleting and no public links. The
|
|
66
|
+
agent's instructions say that text from files is data, never an instruction to follow.
|
|
67
|
+
- **Ready for any agent.** A skill for agents with a terminal, an MCP server for Claude Desktop and Cursor, and a
|
|
68
|
+
secure link for ChatGPT and Claude in the browser.
|
|
69
|
+
- **Free and open source.** Apache 2.0, on macOS, Linux and Windows.
|
|
70
|
+
|
|
71
|
+
## Quick start
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npm install -g @wirecat/yandex-disk-cli
|
|
75
|
+
ydisk doctor # what is set up, with no network
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
You need Node.js 22.16 or a later 22.x, or 24 or later. Try it without installing:
|
|
79
|
+
`npx @wirecat/yandex-disk-cli --help`.
|
|
80
|
+
|
|
81
|
+
Sign in once with a Yandex OAuth token. The token is kept in the system keyring, or in a private file only you can
|
|
82
|
+
read where no keyring works. It is never in an argument or the output.
|
|
83
|
+
|
|
84
|
+
1. Register an app at [oauth.yandex.com/client/new](https://oauth.yandex.com/client/new/), platform "Web services",
|
|
85
|
+
redirect URI `https://oauth.yandex.ru/verification_code`, with the access `cloud_api:disk.read`,
|
|
86
|
+
`cloud_api:disk.write` and `cloud_api:disk.info` (only `disk.read` and `disk.info` for a read-only token).
|
|
87
|
+
2. Open `https://oauth.yandex.ru/authorize?response_type=token&client_id=` with your app's ClientID added at the end,
|
|
88
|
+
and copy the token ([Yandex's guide](https://yandex.ru/dev/id/doc/en/tokens/debug-token)).
|
|
89
|
+
3. Sign in under a profile name you choose, then copy a folder and search it:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
ydisk personal session start # paste the token when asked, or pipe it on stdin
|
|
93
|
+
ydisk personal session status --check
|
|
94
|
+
ydisk personal folders add /Documents
|
|
95
|
+
ydisk personal sync
|
|
96
|
+
ydisk personal search "quarterly budget"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`personal` is a name you choose for this account. You can add `work` or any other later. No profile is ever assumed.
|
|
100
|
+
Yandex says a token lasts several months and is extended while it is used
|
|
101
|
+
([Yandex ID](https://yandex.ru/dev/id/doc/en/concepts/ya-oauth-intro)). When Yandex stops accepting it, sign in
|
|
102
|
+
again.
|
|
103
|
+
|
|
104
|
+
More: [installation](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/installation.md)
|
|
105
|
+
|
|
106
|
+
## Use it with your agent
|
|
107
|
+
|
|
108
|
+
Ask in plain words. The agent picks the commands.
|
|
109
|
+
|
|
110
|
+
> *"Use ydisk. Find the contract with the printing house and tell me the payment terms."*
|
|
111
|
+
> *"Use ydisk. What did I upload to /Photos/Trips this month?"*
|
|
112
|
+
> *"Use ydisk. Move last year's invoices to /Archive."*
|
|
113
|
+
|
|
114
|
+
- **Claude Code, Codex, Gemini CLI** and other agents with a terminal run `ydisk` themselves.
|
|
115
|
+
`ydisk skill install` teaches them how.
|
|
116
|
+
- **Claude Desktop, Cursor** and other MCP apps connect to `ydisk personal mcp serve`.
|
|
117
|
+
- **ChatGPT or Claude in the browser** reach it through your own tunnel, after a login with a one-time code.
|
|
118
|
+
|
|
119
|
+
```sh
|
|
120
|
+
ydisk skill install # Claude Code, Codex, Gemini CLI and OpenClaw
|
|
121
|
+
ydisk personal mcp add claude-code --allow-writes # or: codex
|
|
122
|
+
ydisk personal mcp config # the entry for Claude Desktop, Cursor and others
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
More: [agents and MCP](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/usage.md#agents)
|
|
126
|
+
|
|
127
|
+
## What it can do
|
|
128
|
+
|
|
129
|
+
### Search the folders you choose
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
ydisk personal folders browse # the Disk's folders, one level at a time
|
|
133
|
+
ydisk personal folders add /Documents
|
|
134
|
+
ydisk personal sync # read what changed since the last sync
|
|
135
|
+
ydisk personal search "quarterly budget" --json
|
|
136
|
+
ydisk personal documents list
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
To read one document in full, pass an id from `documents list` or `search` to `ydisk personal documents show`.
|
|
140
|
+
Tags, notes and memories stay attached to a document, and `documents export` writes it to a Markdown file.
|
|
141
|
+
|
|
142
|
+
Choose folders rather than the whole Disk: each sync lists every one of their subfolders.
|
|
143
|
+
|
|
144
|
+
### Work with the files live
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
ydisk personal files list --folder /Documents
|
|
148
|
+
ydisk personal files download /Documents/notes.md # its text
|
|
149
|
+
ydisk personal files download /Documents/plan.pdf --output ./plan.pdf
|
|
150
|
+
ydisk personal files upload ./notes.md --folder /Documents
|
|
151
|
+
ydisk personal files move /Documents/old.pdf --folder /Archive
|
|
152
|
+
ydisk personal files delete /Documents/old.pdf # to the Disk's trash, files restore brings it back
|
|
153
|
+
ydisk personal files publish /Documents/plan.pdf # a public link: anyone with it can open the file
|
|
154
|
+
ydisk personal files unpublish /Documents/plan.pdf
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`files show`, `files copy` and `files create` (a new folder) are commands too.
|
|
158
|
+
|
|
159
|
+
### The whole Disk API
|
|
160
|
+
|
|
161
|
+
`ydisk personal api list` lists the 20 operations of the Disk API, each as its own command, such as the trash, the
|
|
162
|
+
public links and the Disk's own operations that run in the background. `ydisk personal api show resources-list` shows
|
|
163
|
+
an operation's parameters without calling Yandex.
|
|
164
|
+
|
|
165
|
+
More: [commands](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/commands.md)
|
|
166
|
+
|
|
167
|
+
### With your other sources
|
|
168
|
+
|
|
169
|
+
`ydisk` keeps what it reads in the same local store as the other WireCat tools, such as Telegram, WhatsApp, mail,
|
|
170
|
+
Google Drive and Notion. `memo context` shows one person across all of them.
|
|
171
|
+
|
|
172
|
+
More: [WireCat](https://wirecat.dev)
|
|
173
|
+
|
|
174
|
+
## How it works
|
|
175
|
+
|
|
176
|
+
- **A local copy of the folders you choose.** Yandex Disk has no change feed, so each `sync` lists the chosen folders
|
|
177
|
+
again and reads only the files that changed since the last one (by MD5). A stop loses nothing: the next sync goes
|
|
178
|
+
on from where it stopped.
|
|
179
|
+
- **Stable ids.** A file moved inside the chosen folders keeps its id (Yandex's `resource_id`), its tags and its
|
|
180
|
+
notes. A file deleted on the Disk leaves the copy at the end of the pass.
|
|
181
|
+
- **Renamed folders.** A chosen folder renamed or moved on the Disk is unavailable, and its copies leave the store,
|
|
182
|
+
until you add it again under its new path.
|
|
183
|
+
- **Files go straight to Yandex.** Downloads and uploads go to the address Yandex gives, without the token.
|
|
184
|
+
- **Made for scripts.** `--json` gives the same shape for every command, and each kind of failure has its own exit
|
|
185
|
+
code.
|
|
186
|
+
|
|
187
|
+
## Settings and permissions
|
|
188
|
+
|
|
189
|
+
Each profile has its own settings. `files.delete` (a delete, and an upload, copy or move with `--replace`) and
|
|
190
|
+
`files.share` (a public link) ask first at a terminal. Over MCP there is no one to ask, so turn them off for an agent
|
|
191
|
+
that should not do them:
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
ydisk personal config set permissions.files.delete deny
|
|
195
|
+
ydisk personal mcp serve --permission files.share=deny # stricter for this server only
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
`YDISK_READ_ONLY=1` refuses every change.
|
|
199
|
+
|
|
200
|
+
More: [settings](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/configuration.md#permissions)
|
|
201
|
+
|
|
202
|
+
## Security
|
|
203
|
+
|
|
204
|
+
The token is in the system keyring, and no command takes it as an argument. It goes only to Yandex's API, never into
|
|
205
|
+
a link, the output or a log. Over MCP an agent reads a file's text but cannot save a file to a path, and an upload
|
|
206
|
+
refuses credential files and the WireCat folders unless you allow it.
|
|
207
|
+
|
|
208
|
+
More: [security](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/security.md) · Report a vulnerability:
|
|
209
|
+
[SECURITY.md](https://github.com/WireCatLabs/ydisk-cli/blob/main/SECURITY.md)
|
|
210
|
+
|
|
211
|
+
## When something goes wrong
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
ydisk doctor # what is set up, without connecting
|
|
215
|
+
ydisk personal doctor --online # check that the token works
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
More: [troubleshooting](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/troubleshooting.md) · Bugs go to
|
|
219
|
+
[this repository's issues](https://github.com/WireCatLabs/ydisk-cli/issues).
|
|
220
|
+
|
|
221
|
+
## Documentation
|
|
222
|
+
|
|
223
|
+
Every page is in [docs/](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/index.md).
|
|
224
|
+
|
|
225
|
+
## Development
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
pnpm install && pnpm test
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
More: [design](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/dev/DESIGN.md) ·
|
|
232
|
+
[testing](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/dev/TESTING.md) · `pnpm docs:images` renders the banner
|
|
233
|
+
from [docs/images/src/banner.html](https://github.com/WireCatLabs/ydisk-cli/blob/main/docs/images/src/banner.html).
|
|
234
|
+
|
|
235
|
+
Pull requests, bug reports and ideas go to [issues](https://github.com/WireCatLabs/ydisk-cli/issues).
|
|
236
|
+
|
|
237
|
+
## Part of WireCat
|
|
238
|
+
|
|
239
|
+
`ydisk` is one of the [WireCat](https://wirecat.dev) tools: open-source, local-first command-line tools that give AI
|
|
240
|
+
agents your context from messengers, mail, calendars and documents. Each one works on its own.
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
[Apache 2.0](https://github.com/WireCatLabs/ydisk-cli/blob/main/LICENSE)
|