apple-docs 1.0.2 → 1.0.5
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 +9 -0
- package/dist/cli.js +10 -1
- package/package.json +1 -1
- package/skills/apple-docs/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -108,10 +108,19 @@ apple-docs updates --technology SwiftUI --year 2025
|
|
|
108
108
|
apple-docs overviews --platform ios
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
+
### Version
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
apple-docs version
|
|
115
|
+
apple-docs --version
|
|
116
|
+
apple-docs -v
|
|
117
|
+
```
|
|
118
|
+
|
|
111
119
|
## Flags
|
|
112
120
|
|
|
113
121
|
| Flag | Description |
|
|
114
122
|
|------|-------------|
|
|
123
|
+
| `--version`, `-v` | Show current version |
|
|
115
124
|
| `--type <type>` | Symbol/search type filter (class, struct, enum, protocol) |
|
|
116
125
|
| `--limit <n>` | Max results |
|
|
117
126
|
| `--year <year>` | Year filter |
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
import { callTool } from './mcp.js';
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const { version } = require('../package.json');
|
|
3
6
|
const [, , command, ...rest] = process.argv;
|
|
7
|
+
if (command === '--version' || command === '-v' || command === 'version') {
|
|
8
|
+
console.log(version);
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
4
11
|
function parseArgs(argv) {
|
|
5
12
|
const positional = [];
|
|
6
13
|
const flags = {};
|
|
@@ -25,6 +32,7 @@ const num = (key) => flags[key] ? parseInt(flags[key], 10) : undefined;
|
|
|
25
32
|
const HELP = `Usage: apple-docs <command> [args] [--flags]
|
|
26
33
|
|
|
27
34
|
Commands:
|
|
35
|
+
version Show current version
|
|
28
36
|
search <query> Search Apple documentation
|
|
29
37
|
doc <url> Get documentation content
|
|
30
38
|
tech [category] List Apple technologies
|
|
@@ -53,7 +61,8 @@ Flags:
|
|
|
53
61
|
--query <q> Search query filter
|
|
54
62
|
--technology <t> Technology filter
|
|
55
63
|
--language <lang> Language filter (swift, occ)
|
|
56
|
-
--depth <d> Search depth (shallow, medium, deep)
|
|
64
|
+
--depth <d> Search depth (shallow, medium, deep)
|
|
65
|
+
--version, -v Show version`;
|
|
57
66
|
function need(val, usage) {
|
|
58
67
|
if (!val) {
|
|
59
68
|
console.error(usage);
|
package/package.json
CHANGED
|
@@ -39,6 +39,7 @@ Based on the user's question: $ARGUMENTS
|
|
|
39
39
|
## Commands
|
|
40
40
|
|
|
41
41
|
```
|
|
42
|
+
apple-docs version # Show current version
|
|
42
43
|
apple-docs search <query> # Search Apple documentation
|
|
43
44
|
apple-docs doc <url> # Get full doc page content
|
|
44
45
|
apple-docs tech [category] # List Apple technologies/frameworks
|