@gunshi/docs 0.27.3 → 0.27.4

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/bin/init.js CHANGED
@@ -39,25 +39,18 @@ When creating command-line interfaces, use the \`${SKILL_NAME}\` skill.
39
39
 
40
40
  const cwd = process.cwd()
41
41
  const CLAUDE_SKILL_PATH = path.join(cwd, `.claude/skills/${SKILL_NAME}/SKILL.md`)
42
- const CURSOR_RULES_PATH = path.join(cwd, `.cursor/rules/${SKILL_NAME}.mdc`)
43
42
  const CLAUDE_MD_FILEPATH = path.join(cwd, 'CLAUDE.md')
44
43
 
45
- const [hasClaudeCode, hasCursor, hasCursorCli] = await Promise.all(
46
- ['claude', 'cursor', 'cursor-agent'].map(cmd =>
47
- x('which', [cmd], { throwOnError: false })
48
- .then(({ stdout }) => stdout.trim().length > 0)
49
- .catch(() => false)
50
- )
51
- )
52
-
53
- const hasCursorEditors = hasCursor || hasCursorCli
44
+ const hasClaudeCode = await x('which', ['claude'], { throwOnError: false })
45
+ .then(({ stdout }) => stdout.trim().length > 0)
46
+ .catch(() => false)
54
47
 
55
48
  // Helper function to check if CLAUDE.md already contains Gunshi instructions
56
49
  async function hasGunshiInstruction(filePath) {
57
50
  try {
58
51
  const content = await fs.readFile(filePath, 'utf8')
59
52
  // Check for various patterns that indicate Gunshi is already mentioned
60
- const gunshiPatterns = [/\bgunshi\b/i, /\@gunshi\//i, /@kazupon\/gunshi/i]
53
+ const gunshiPatterns = [/\bgunshi\b/i, /@gunshi\//i, /@kazupon\/gunshi/i]
61
54
  return gunshiPatterns.some(pattern => pattern.test(content))
62
55
  } catch {
63
56
  return false
@@ -74,9 +67,7 @@ async function fileExists(filePath) {
74
67
  }
75
68
  }
76
69
 
77
- const isWindows = process.platform === 'win32'
78
-
79
- // Claude Code setup (always create as the master file):
70
+ // Claude Code setup:
80
71
  // - Create skill file at .claude/skills/use-gunshi-cli/SKILL.md
81
72
  // - Update or create CLAUDE.md with instruction to use the skill
82
73
  // (skip if Gunshi is already mentioned to avoid duplication)
@@ -105,26 +96,6 @@ if (hasClaudeCode) {
105
96
  }
106
97
  }
107
98
 
108
- // Cursor setup:
109
- // - On Linux/macOS: create symlink to Claude skill file
110
- // - On Windows: copy the file (symlinks require admin privileges)
111
- if (hasCursorEditors) {
112
- await x('mkdir', ['-p', path.dirname(CURSOR_RULES_PATH)])
113
-
114
- if (isWindows) {
115
- // On Windows, just copy the file (symlinks require admin privileges)
116
- await fs.writeFile(CURSOR_RULES_PATH, SKILL_CONTENT, 'utf8')
117
- console.log(`Created Cursor rule at ${CURSOR_RULES_PATH}`)
118
- } else {
119
- // Create relative symlink from Cursor rules to Claude skill
120
- const relativeTarget = path.relative(path.dirname(CURSOR_RULES_PATH), CLAUDE_SKILL_PATH)
121
- // Remove existing file/symlink if it exists
122
- await fs.rm(CURSOR_RULES_PATH, { force: true })
123
- await fs.symlink(relativeTarget, CURSOR_RULES_PATH)
124
- console.log(`Created Cursor rule symlink at ${CURSOR_RULES_PATH} -> ${relativeTarget}`)
125
- }
126
- }
127
-
128
99
  // Ask user if they want to install gunshi and @gunshi/docs
129
100
  const rl = readline.createInterface({
130
101
  input: process.stdin,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gunshi/docs",
3
3
  "description": "Documentation for gunshi",
4
- "version": "0.27.3",
4
+ "version": "0.27.4",
5
5
  "author": {
6
6
  "name": "kazuya kawaguchi",
7
7
  "email": "kawakazu80@gmail.com"
@@ -23,13 +23,13 @@ Index signature to allow additional properties
23
23
 
24
24
  | Property | Type | Description |
25
25
  | ------ | ------ | ------ |
26
- | <a id="args"></a> `args?` | [`Args`](Args.md) \| `Record`\<`string`, `any`\> | Command arguments - accepts any args structure |
27
- | <a id="commandname"></a> `commandName?` | `string` | Command name for lazy commands |
28
- | <a id="description"></a> `description?` | `string` | Command description |
29
- | <a id="entry"></a> `entry?` | `boolean` | Whether this is an entry command |
30
- | <a id="examples"></a> `examples?` | `string` \| (...`args`) => `any` | Command examples |
31
- | <a id="internal"></a> `internal?` | `boolean` | Whether this is an internal command |
32
- | <a id="name"></a> `name?` | `string` | Command name |
33
- | <a id="rendering"></a> `rendering?` | `any` | Rendering options |
34
- | <a id="run"></a> `run?` | (...`args`) => `any` | Command runner |
35
- | <a id="tokebab"></a> `toKebab?` | `boolean` | Whether to convert camelCase to kebab-case |
26
+ | <a id="args"></a> `args?` | [`Args`](Args.md) \| `Record`\<`string`, `any`\> | see [Command.args](Command.md#args) |
27
+ | <a id="commandname"></a> `commandName?` | `string` | see LazyCommand.commandName |
28
+ | <a id="description"></a> `description?` | `string` | see [Command.description](Command.md#description) |
29
+ | <a id="entry"></a> `entry?` | `boolean` | see [Command.entry](Command.md#entry) |
30
+ | <a id="examples"></a> `examples?` | `string` \| (...`args`) => `any` | see [Command.examples](Command.md#examples) |
31
+ | <a id="internal"></a> `internal?` | `boolean` | see [Command.internal](Command.md#internal) |
32
+ | <a id="name"></a> `name?` | `string` | see [Command.name](Command.md#name) |
33
+ | <a id="rendering"></a> `rendering?` | `any` | see [Command.rendering](Command.md#rendering) |
34
+ | <a id="run"></a> `run?` | (...`args`) => `any` | see [Command.run](Command.md#run) |
35
+ | <a id="tokebab"></a> `toKebab?` | `boolean` | see [Command.toKebab](Command.md#tokebab) |
@@ -33,7 +33,7 @@ bun add gunshi
33
33
 
34
34
  ## LLM-Assisted Development
35
35
 
36
- Gunshi provides tooling to integrate with AI coding assistants such as [Claude Code](https://claude.ai/code) and [Cursor](https://cursor.com/).
36
+ Gunshi provides tooling to integrate with AI coding assistants such as [Claude Code](https://claude.ai/code).
37
37
 
38
38
  ### Automatic Setup (Recommended)
39
39
 
@@ -59,10 +59,7 @@ bun x @gunshi/docs
59
59
 
60
60
  :::
61
61
 
62
- This command automatically configures:
63
-
64
- - [Claude Code skills](https://docs.anthropic.com/en/docs/claude-code/skills) for Claude Code
65
- - [Cursor rules](https://docs.cursor.com/context/rules-for-ai) for Cursor
62
+ This command automatically configures [Claude Code skills](https://docs.anthropic.com/en/docs/claude-code/skills) for Claude Code.
66
63
 
67
64
  ### Manual Setup
68
65
 
@@ -90,7 +87,7 @@ bun add -D @gunshi/docs
90
87
 
91
88
  This package includes guide content and API references as markdown files in [llms.txt](https://llmstxt.org/) format.
92
89
 
93
- Then add the following to your AI agent's configuration file (e.g., `CLAUDE.md` and `.cursor/rules/use-gunshi-cli.md`):
90
+ Then add the following to your AI agent's configuration file (e.g., `CLAUDE.md`):
94
91
 
95
92
  ```md
96
93
  # CLI Development with Gunshi
@@ -182,7 +182,7 @@ Use cases:
182
182
 
183
183
  ### `@gunshi/docs` - LLM-Assisted Development (Experimental)
184
184
 
185
- New package for integrating with AI coding assistants such as [Claude Code](https://claude.ai/code) and [Cursor](https://cursor.com/):
185
+ New package for integrating with AI coding assistants such as [Claude Code](https://claude.ai/code):
186
186
 
187
187
  ```sh
188
188
  npx @gunshi/docs
@@ -191,7 +191,6 @@ npx @gunshi/docs
191
191
  This command automatically configures:
192
192
 
193
193
  - [Claude Code skills](https://docs.anthropic.com/en/docs/claude-code/skills) at `.claude/skills/use-gunshi-cli/SKILL.md`
194
- - [Cursor rules](https://docs.cursor.com/context/rules-for-ai) at `.cursor/rules/use-gunshi-cli.mdc`
195
194
  - Updates `CLAUDE.md` with instructions to use the Gunshi skill
196
195
 
197
196
  Optionally, it can also install `gunshi` and `@gunshi/docs` packages for you.