feishu-doc-cli 0.1.0 → 0.1.2

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 CHANGED
@@ -12,6 +12,14 @@ npm install -g feishu-doc-cli
12
12
 
13
13
  Requires Node.js >= 18.
14
14
 
15
+ ### As an AI agent skill
16
+
17
+ ```bash
18
+ npx skills add m1heng/feishu-doc-cli
19
+ ```
20
+
21
+ Once installed, agents like Claude Code will automatically use `feishu-doc` when you ask about Feishu/Lark APIs.
22
+
15
23
  ## Usage
16
24
 
17
25
  ### Read a document
@@ -95,7 +103,7 @@ feishu-doc read "/document/client-docs/intro"
95
103
  feishu-doc read "/home/intro"
96
104
  ```
97
105
 
98
- The CLI normalizes all formats internally. No need to manually convert.
106
+ The CLI normalizes all formats internally, including anchors (`#section`) and query strings. No need to manually convert.
99
107
 
100
108
  ## How it works
101
109
 
package/dist/api.js CHANGED
@@ -36,6 +36,13 @@ export function normalizePath(input) {
36
36
  if (p.startsWith("/document/")) {
37
37
  p = p.slice("/document".length);
38
38
  }
39
+ // Strip anchor and query string (e.g. /path#anchor or /path?foo=bar)
40
+ const hashIdx = p.indexOf("#");
41
+ if (hashIdx !== -1)
42
+ p = p.slice(0, hashIdx);
43
+ const qIdx = p.indexOf("?");
44
+ if (qIdx !== -1)
45
+ p = p.slice(0, qIdx);
39
46
  // Ensure leading slash
40
47
  if (!p.startsWith("/")) {
41
48
  p = "/" + p;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feishu-doc-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CLI tool to read Feishu Open Platform documentation as Markdown, designed for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",