@yuiseki/gyazocli 0.6.0 → 0.7.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/README.md +25 -2
- package/dist/commands/search.js +6 -1
- package/dist/index.js +1 -1
- package/docs/ADR/003-cli-structure.md +3 -1
- package/package.json +3 -2
- package/skills/gyazo/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -203,14 +203,37 @@ commands are, what the search syntax actually accepts, and the judgement calls
|
|
|
203
203
|
that keep a capture from becoming a claim it does not support. It ships in the
|
|
204
204
|
npm package.
|
|
205
205
|
|
|
206
|
-
Install it
|
|
206
|
+
Install it with [skills](https://github.com/vercel-labs/skills), which reads
|
|
207
|
+
`skills/` straight from this repository:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npx skills add yuiseki/gyazocli
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
That writes the skill to `.agents/skills/gyazo/` in the current project, links
|
|
214
|
+
it for whichever agents are present, and records it in `skills-lock.json`.
|
|
215
|
+
`--list` shows what a repository offers without installing, `-g` installs for
|
|
216
|
+
every project, and `-a claude-code` picks an agent explicitly.
|
|
217
|
+
|
|
218
|
+
From an installed npm package instead:
|
|
207
219
|
|
|
208
220
|
```bash
|
|
209
221
|
mkdir -p ~/.claude/skills
|
|
210
222
|
cp -r "$(npm root -g)/@yuiseki/gyazocli/skills/gyazo" ~/.claude/skills/
|
|
211
223
|
```
|
|
212
224
|
|
|
213
|
-
|
|
225
|
+
From a checkout, `npm run skill:install` copies it into `.claude/skills/` here,
|
|
226
|
+
and takes a destination for anywhere else:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npm run skill:install # this repository
|
|
230
|
+
npm run skill:install ~/.claude/skills # every project
|
|
231
|
+
npm run skill:install ../other/.claude/skills
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
It copies rather than symlinks, so an installed skill survives this repository
|
|
235
|
+
moving or going away. The copy under `.claude/skills/` is committed, and a test
|
|
236
|
+
fails when it drifts from `skills/`.
|
|
214
237
|
|
|
215
238
|
## Development
|
|
216
239
|
|
package/dist/commands/search.js
CHANGED
|
@@ -4,12 +4,15 @@ exports.registerSearchCommand = registerSearchCommand;
|
|
|
4
4
|
const api_1 = require("../api");
|
|
5
5
|
const credentials_1 = require("../credentials");
|
|
6
6
|
const format_1 = require("../format");
|
|
7
|
+
const options_1 = require("../options");
|
|
7
8
|
const memory_1 = require("../services/memory");
|
|
8
9
|
const images_1 = require("../services/images");
|
|
9
10
|
function registerSearchCommand(program) {
|
|
10
11
|
program
|
|
11
12
|
.command('search [query]')
|
|
12
13
|
.description('Search images')
|
|
14
|
+
.option('-p, --page <number>', 'page number', '1')
|
|
15
|
+
.option('-l, --limit <number>', 'items per page', '20')
|
|
13
16
|
.option('-j, --json', 'output as JSON')
|
|
14
17
|
.option('--no-cache', 'force fetch from API')
|
|
15
18
|
.action(async (query, options) => {
|
|
@@ -20,7 +23,9 @@ function registerSearchCommand(program) {
|
|
|
20
23
|
console.error('Hint: Run `gyazo search -h` for usage.');
|
|
21
24
|
process.exit(1);
|
|
22
25
|
}
|
|
23
|
-
const
|
|
26
|
+
const page = (0, options_1.parsePositiveIntegerOption)(options.page, '--page');
|
|
27
|
+
const limit = (0, options_1.parsePositiveIntegerOption)(options.limit, '--limit');
|
|
28
|
+
const images = await (0, api_1.searchImages)(query, page, limit);
|
|
24
29
|
const useCache = options.cache !== false;
|
|
25
30
|
if (options.json) {
|
|
26
31
|
(0, memory_1.cacheSearchResultImages)(images);
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ program
|
|
|
26
26
|
.name('gyazo')
|
|
27
27
|
.description('Gyazo Memory CLI for AI Secretary')
|
|
28
28
|
.option('--mcp-server', 'run as a Model Context Protocol server over stdio')
|
|
29
|
-
.version('0.
|
|
29
|
+
.version('0.7.0');
|
|
30
30
|
(0, config_1.registerConfigCommand)(program);
|
|
31
31
|
(0, list_1.registerListCommand)(program);
|
|
32
32
|
(0, get_1.registerGetCommand)(program);
|
|
@@ -13,7 +13,7 @@ Adopt and document the existing top-level command structure.
|
|
|
13
13
|
|
|
14
14
|
### 1. Program Metadata
|
|
15
15
|
- Binary name: `gyazo`
|
|
16
|
-
- Version: `0.
|
|
16
|
+
- Version: `0.7.0`
|
|
17
17
|
- Description: `Gyazo Memory CLI for AI Secretary`
|
|
18
18
|
|
|
19
19
|
### 2. Commands
|
|
@@ -44,6 +44,8 @@ Adopt and document the existing top-level command structure.
|
|
|
44
44
|
- `--no-cache`
|
|
45
45
|
- `gyazo search [query]`
|
|
46
46
|
- Options:
|
|
47
|
+
- `-p, --page <number>` (default: `1`)
|
|
48
|
+
- `-l, --limit <number>` (default: `20`)
|
|
47
49
|
- `-j, --json`
|
|
48
50
|
- `--no-cache`
|
|
49
51
|
- `gyazo apps`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuiseki/gyazocli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Gyazo Memory CLI for AI Secretary",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"build": "npx tsc",
|
|
28
28
|
"prepack": "npm run build",
|
|
29
29
|
"test": "npm run build && vitest run",
|
|
30
|
-
"test:watch": "vitest"
|
|
30
|
+
"test:watch": "vitest",
|
|
31
|
+
"skill:install": "node scripts/install-skill.mjs"
|
|
31
32
|
},
|
|
32
33
|
"publishConfig": {
|
|
33
34
|
"access": "public"
|
package/skills/gyazo/SKILL.md
CHANGED
|
@@ -48,6 +48,7 @@ gyazo search 'app:"Gyazo Android"' # the application it came from
|
|
|
48
48
|
gyazo search "ocr:Wi-Fi has:exif" # terms are ANDed
|
|
49
49
|
gyazo search "address:広島 OR address:京都" # capital OR
|
|
50
50
|
gyazo search "has:location -app:Chrome" # leading - negates
|
|
51
|
+
gyazo search "has:exif" --page 2 --limit 50 # 20 per page by default
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
Three things worth knowing before composing a query:
|