coder-link 0.0.9

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.
Files changed (88) hide show
  1. package/README.md +200 -0
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +684 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +12 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +12 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/lib/amp-manager.d.ts +24 -0
  11. package/dist/lib/amp-manager.d.ts.map +1 -0
  12. package/dist/lib/amp-manager.js +46 -0
  13. package/dist/lib/amp-manager.js.map +1 -0
  14. package/dist/lib/claude-code-manager.d.ts +55 -0
  15. package/dist/lib/claude-code-manager.d.ts.map +1 -0
  16. package/dist/lib/claude-code-manager.js +408 -0
  17. package/dist/lib/claude-code-manager.js.map +1 -0
  18. package/dist/lib/crush-manager.d.ts +31 -0
  19. package/dist/lib/crush-manager.d.ts.map +1 -0
  20. package/dist/lib/crush-manager.js +262 -0
  21. package/dist/lib/crush-manager.js.map +1 -0
  22. package/dist/lib/factory-droid-manager.d.ts +36 -0
  23. package/dist/lib/factory-droid-manager.d.ts.map +1 -0
  24. package/dist/lib/factory-droid-manager.js +387 -0
  25. package/dist/lib/factory-droid-manager.js.map +1 -0
  26. package/dist/lib/kimi-manager.d.ts +34 -0
  27. package/dist/lib/kimi-manager.d.ts.map +1 -0
  28. package/dist/lib/kimi-manager.js +316 -0
  29. package/dist/lib/kimi-manager.js.map +1 -0
  30. package/dist/lib/opencode-manager.d.ts +31 -0
  31. package/dist/lib/opencode-manager.d.ts.map +1 -0
  32. package/dist/lib/opencode-manager.js +315 -0
  33. package/dist/lib/opencode-manager.js.map +1 -0
  34. package/dist/lib/pi-manager.d.ts +30 -0
  35. package/dist/lib/pi-manager.d.ts.map +1 -0
  36. package/dist/lib/pi-manager.js +196 -0
  37. package/dist/lib/pi-manager.js.map +1 -0
  38. package/dist/lib/tool-manager.d.ts +51 -0
  39. package/dist/lib/tool-manager.d.ts.map +1 -0
  40. package/dist/lib/tool-manager.js +113 -0
  41. package/dist/lib/tool-manager.js.map +1 -0
  42. package/dist/locales/en_US.json +49 -0
  43. package/dist/locales/zh_CN.json +49 -0
  44. package/dist/mcp-services.d.ts +3 -0
  45. package/dist/mcp-services.d.ts.map +1 -0
  46. package/dist/mcp-services.js +26 -0
  47. package/dist/mcp-services.js.map +1 -0
  48. package/dist/menu.d.ts +2 -0
  49. package/dist/menu.d.ts.map +1 -0
  50. package/dist/menu.js +1226 -0
  51. package/dist/menu.js.map +1 -0
  52. package/dist/utils/api-test.d.ts +32 -0
  53. package/dist/utils/api-test.d.ts.map +1 -0
  54. package/dist/utils/api-test.js +163 -0
  55. package/dist/utils/api-test.js.map +1 -0
  56. package/dist/utils/brand.d.ts +39 -0
  57. package/dist/utils/brand.d.ts.map +1 -0
  58. package/dist/utils/brand.js +195 -0
  59. package/dist/utils/brand.js.map +1 -0
  60. package/dist/utils/config.d.ts +100 -0
  61. package/dist/utils/config.d.ts.map +1 -0
  62. package/dist/utils/config.js +483 -0
  63. package/dist/utils/config.js.map +1 -0
  64. package/dist/utils/exec.d.ts +5 -0
  65. package/dist/utils/exec.d.ts.map +1 -0
  66. package/dist/utils/exec.js +145 -0
  67. package/dist/utils/exec.js.map +1 -0
  68. package/dist/utils/i18n.d.ts +56 -0
  69. package/dist/utils/i18n.d.ts.map +1 -0
  70. package/dist/utils/i18n.js +42 -0
  71. package/dist/utils/i18n.js.map +1 -0
  72. package/dist/utils/keyboard.d.ts +32 -0
  73. package/dist/utils/keyboard.d.ts.map +1 -0
  74. package/dist/utils/keyboard.js +109 -0
  75. package/dist/utils/keyboard.js.map +1 -0
  76. package/dist/utils/logger.d.ts +14 -0
  77. package/dist/utils/logger.d.ts.map +1 -0
  78. package/dist/utils/logger.js +55 -0
  79. package/dist/utils/logger.js.map +1 -0
  80. package/dist/utils/output.d.ts +58 -0
  81. package/dist/utils/output.d.ts.map +1 -0
  82. package/dist/utils/output.js +93 -0
  83. package/dist/utils/output.js.map +1 -0
  84. package/dist/wizard.d.ts +2 -0
  85. package/dist/wizard.d.ts.map +1 -0
  86. package/dist/wizard.js +114 -0
  87. package/dist/wizard.js.map +1 -0
  88. package/package.json +65 -0
package/README.md ADDED
@@ -0,0 +1,200 @@
1
+ # Coder Link (coder-link)
2
+
3
+ A CLI that links coding tools to models from multiple providers.
4
+
5
+ ## Features
6
+
7
+ - **Multi-Provider Support**: GLM Coding Plan (Global/China), Kimi 2.5, OpenRouter, and NVIDIA
8
+ - **Interactive Wizard**: Friendly onboarding guidance on first launch
9
+ - **Tool Management**: Automatically configures CLI tools with your API credentials
10
+ - **MCP Configuration**: Easily manage Model Context Protocol services
11
+ - **Local Storage**: All settings stored securely on your machine
12
+ - **Internationalization**: Chinese and English bilingual interface
13
+ - **Status & Health Check**: View current configuration and diagnose issues quickly
14
+
15
+ ## Supported Coding Tools
16
+
17
+ - Claude Code
18
+ - OpenCode
19
+ - Crush
20
+ - Factory Droid
21
+ - Kimi (native)
22
+ - AMP Code
23
+ - Pi CLI
24
+
25
+ ## Quick Start
26
+
27
+ **Prerequisite**: Node.js 18 or later
28
+
29
+ ### Install and Launch
30
+
31
+ #### Option 1: Run directly with npx
32
+
33
+ ```bash
34
+ npx coder-link
35
+ ```
36
+
37
+ #### Option 2: Install globally
38
+
39
+ ```bash
40
+ npm install -g coder-link
41
+ coder-link
42
+ ```
43
+
44
+ ### Complete the Wizard
45
+
46
+ Once you enter the wizard UI, use Up/Down arrow keys to navigate and press Enter to confirm each action, following the guided initialization flow.
47
+
48
+ The wizard will help you complete:
49
+
50
+ 1. **Select UI language** (English or Chinese)
51
+ 2. **Choose a provider** (GLM Coding Plan Global/China, Kimi 2.5, OpenRouter, or NVIDIA)
52
+ 3. **Enter your API key**
53
+ 4. **Select tools to manage**
54
+ 5. **Automatically configure selected tools**
55
+ 6. **Manage MCP services** (optional)
56
+
57
+ ## Command List
58
+
59
+ ### Show help
60
+ ```bash
61
+ coder-link -h
62
+ coder-link --help
63
+ ```
64
+
65
+ ### Show version
66
+ ```bash
67
+ coder-link -v
68
+ coder-link --version
69
+ ```
70
+
71
+ ### Run the initialization wizard
72
+ ```bash
73
+ coder-link init
74
+ ```
75
+
76
+ ### Language management
77
+ ```bash
78
+ coder-link lang show # Display the current language
79
+ coder-link lang set zh_CN # Switch to Chinese
80
+ coder-link lang set en_US # Switch to English
81
+ coder-link lang --help # Show help for language commands
82
+ ```
83
+
84
+ ### API key management
85
+ ```bash
86
+ coder-link auth # Interactively set key
87
+ ncoder-link auth glm_coding_plan_global <token> # Choose Global plan and set key
88
+ ncoder-link auth glm_coding_plan_china <token> # Choose China plan and set key
89
+ ncoder-link auth kimi <token> # Set Kimi API key
90
+ ncoder-link auth openrouter <token> # Set OpenRouter API key
91
+ ncoder-link auth nvidia <token> # Set NVIDIA API key
92
+ ncoder-link auth revoke # Delete the saved key
93
+ ncoder-link auth reload <tool> # Reload config into a tool
94
+ ncoder-link auth --help # Show help for auth commands
95
+ ```
96
+
97
+ ### Tool management
98
+ ```bash
99
+ coder-link tools list # List all supported tools and their status
100
+ coder-link tools install <tool> # Install a coding tool
101
+ coder-link tools uninstall <tool> # Uninstall a coding tool
102
+ ```
103
+
104
+ ### MCP management
105
+ ```bash
106
+ coder-link mcp list # List available MCP services
107
+ coder-link mcp installed # List installed MCP services
108
+ coder-link mcp install <service> # Install an MCP service
109
+ coder-link mcp uninstall <service> # Uninstall an MCP service
110
+ ```
111
+
112
+ ### Health check
113
+ ```bash
114
+ coder-link doctor # Inspect system configuration and tool status
115
+ ```
116
+
117
+ ## Configuration File
118
+
119
+ The configuration file is stored at `~/.coder-link/config.yaml`:
120
+
121
+ ```yaml
122
+ lang: zh_CN # UI language
123
+ plan: glm_coding_plan_global # Plan type: glm_coding_plan_global, glm_coding_plan_china, or kimi
124
+ api_key: your-api-key-here # API key
125
+ ```
126
+
127
+ ## Provider Details
128
+
129
+ ### GLM Coding Plan (Global)
130
+ - **Base URL**: `https://api.z.ai/api/anthropic` (Claude Code) or `https://api.z.ai/api/coding/paas/v4` (others)
131
+ - **Models**: GLM-4.7, GLM-4.6, GLM-4.5-air
132
+ - Get your API key from [Z.AI Open Platform](https://z.ai/model-api)
133
+
134
+ ### GLM Coding Plan (China)
135
+ - **Base URL**: `https://open.bigmodel.cn/api/anthropic` (Claude Code) or `https://open.bigmodel.cn/api/coding/paas/v4` (others)
136
+ - **Models**: GLM-4.7, GLM-4.6, GLM-4.5-air
137
+ - Get your API key from [Z.AI Open Platform](https://z.ai/model-api)
138
+
139
+ ### OpenRouter
140
+ - **Base URL**: `https://openrouter.ai/api/v1`
141
+ - **Models**: Various LLMs including Claude, GPT, and more
142
+ - Get your API key from [OpenRouter.ai](https://openrouter.ai/keys)
143
+
144
+ ### NVIDIA
145
+ - **Base URL**: Via NVIDIA's API gateway
146
+ - **Models**: Various NVIDIA-hosted models
147
+ - Sign up for access at [NVIDIA's developer portal](https://developer.nvidia.com/)
148
+
149
+ ## How It Works
150
+
151
+ The tool uses a manager pattern where each coding tool has its own manager class that knows how to:
152
+
153
+ 1. Read and write the tool's configuration file
154
+ 2. Inject the appropriate API credentials and endpoints
155
+ 3. Detect existing configurations
156
+ 4. Manage MCP (Model Context Protocol) services
157
+
158
+ When you run `coder-link auth <plan> <token>` or use the wizard, the tool:
159
+
160
+ 1. Saves your API key and plan type to `~/.coder-link/config.yaml`
161
+ 2. For each selected tool, calls its manager's `loadConfig()` method
162
+ 3. The manager writes the appropriate configuration to the tool's config file
163
+ 4. MCP services can be installed to extend tool capabilities
164
+
165
+ ## MCP Services
166
+
167
+ MCP (Model Context Protocol) allows coding tools to access external services. Built-in MCP services include:
168
+
169
+ - **filesystem**: File system operations
170
+ - **github**: GitHub integration
171
+
172
+ You can also install custom MCP services through the tool's own marketplace (Claude Code) or manually configure them.
173
+
174
+ ## Development
175
+
176
+ ```bash
177
+ # Clone the repository
178
+ git clone https://github.com/HenkDz/coder-link.git
179
+ cd coder-link
180
+
181
+ # Install dependencies
182
+ bun install
183
+
184
+ # Build
185
+ bun run build
186
+
187
+ # Run in development mode
188
+ bun run dev
189
+
190
+ # Lint
191
+ bun run lint
192
+ ```
193
+
194
+ ## Contributing
195
+
196
+ We welcome contributions! Please feel free to submit issues or pull requests.
197
+
198
+ ## License
199
+
200
+ Apache License 2.0
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}