krx-cli 0.1.0 → 1.0.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 +82 -4
- package/package.json +87 -2
package/README.md
CHANGED
|
@@ -137,13 +137,91 @@ krx schema stock.stk_bydd_trd
|
|
|
137
137
|
|
|
138
138
|
## AI 에이전트 연동
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
krx-cli는 AI 에이전트가 Bash tool로 직접 호출하도록 설계되었습니다. 연동은 2단계입니다:
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
1. **CLI 설치** — 실제 실행 가능한 `krx` 바이너리
|
|
143
|
+
2. **스킬 설치** — 에이전트에게 사용법을 알려주는 SKILL.md
|
|
144
|
+
|
|
145
|
+
### Step 1: CLI 설치
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npm install -g krx-cli
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Step 2: 스킬 설치
|
|
152
|
+
|
|
153
|
+
[skills.sh](https://skills.sh)를 통해 SKILL.md를 에이전트에 등록합니다.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# 모든 에이전트에 글로벌 설치 (권장)
|
|
157
|
+
npx skills add kyo504/krx-cli -g
|
|
158
|
+
|
|
159
|
+
# 특정 에이전트만 지정
|
|
160
|
+
npx skills add kyo504/krx-cli -g -a claude-code
|
|
161
|
+
npx skills add kyo504/krx-cli -g -a cursor
|
|
162
|
+
|
|
163
|
+
# 프로젝트 단위 설치 (팀 공유 시)
|
|
164
|
+
npx skills add kyo504/krx-cli
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Step 3: API 키 설정
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
krx auth set <your-api-key>
|
|
171
|
+
# 또는
|
|
172
|
+
export KRX_API_KEY=<your-api-key>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 지원 에이전트
|
|
176
|
+
|
|
177
|
+
skills.sh는 40개 이상의 에이전트를 지원합니다:
|
|
178
|
+
|
|
179
|
+
| 에이전트 | 스킬 설치 경로 |
|
|
180
|
+
|---------|--------------|
|
|
181
|
+
| Claude Code | `~/.claude/skills/` |
|
|
182
|
+
| Cursor | `~/.cursor/skills/` |
|
|
183
|
+
| GitHub Copilot | `~/.github-copilot/skills/` |
|
|
184
|
+
| Cline | `~/.cline/skills/` |
|
|
185
|
+
| Windsurf | `~/.windsurf/skills/` |
|
|
186
|
+
| 기타 | `~/.agents/skills/` |
|
|
187
|
+
|
|
188
|
+
### 사용 예시
|
|
189
|
+
|
|
190
|
+
스킬 설치 후 에이전트에게 자연어로 요청합니다:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
"오늘 코스피 지수 보여줘"
|
|
194
|
+
→ krx index list --date 20250311 --market kospi --fields IDX_NM,CLSPRC_IDX,FLUC_RT
|
|
195
|
+
|
|
196
|
+
"삼성전자 주가 알려줘"
|
|
197
|
+
→ krx stock list --date 20250311 --market kospi --fields ISU_NM,TDD_CLSPRC,FLUC_RT -o json
|
|
198
|
+
|
|
199
|
+
"금 시세 확인해줘"
|
|
200
|
+
→ krx commodity list --date 20250311 --type gold
|
|
201
|
+
|
|
202
|
+
"어떤 API가 승인되어 있어?"
|
|
203
|
+
→ krx auth status
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### 스킬 관리
|
|
143
207
|
|
|
144
208
|
```bash
|
|
145
|
-
|
|
146
|
-
|
|
209
|
+
npx skills list -g # 설치된 스킬 확인
|
|
210
|
+
npx skills check # 업데이트 확인
|
|
211
|
+
npx skills update # 업데이트
|
|
212
|
+
npx skills remove krx-cli # 제거
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### 수동 연동 (skills.sh 없이)
|
|
216
|
+
|
|
217
|
+
SKILL.md를 직접 에이전트 설정 디렉토리에 복사할 수도 있습니다:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Claude Code
|
|
221
|
+
mkdir -p ~/.claude/skills && cp SKILL.md ~/.claude/skills/krx-cli.md
|
|
222
|
+
|
|
223
|
+
# Cursor
|
|
224
|
+
mkdir -p ~/.cursor/skills && cp SKILL.md ~/.cursor/skills/krx-cli.md
|
|
147
225
|
```
|
|
148
226
|
|
|
149
227
|
## 개발
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "krx-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Agent-native CLI for KRX (Korea Exchange) Open API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"lint": "eslint src/",
|
|
20
20
|
"format": "prettier --write 'src/**/*.ts' 'tests/**/*.ts'",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
|
-
"check": "pnpm lint && pnpm typecheck && pnpm test"
|
|
22
|
+
"check": "pnpm lint && pnpm typecheck && pnpm test",
|
|
23
|
+
"prepare": "husky"
|
|
23
24
|
},
|
|
24
25
|
"keywords": [
|
|
25
26
|
"krx",
|
|
@@ -41,15 +42,99 @@
|
|
|
41
42
|
"zod": "^4.3.6"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
45
|
+
"@commitlint/cli": "^20.4.3",
|
|
46
|
+
"@commitlint/config-conventional": "^20.4.3",
|
|
44
47
|
"@eslint/js": "^10.0.1",
|
|
48
|
+
"@release-it/conventional-changelog": "^10.0.5",
|
|
45
49
|
"@types/node": "^25.4.0",
|
|
46
50
|
"eslint": "^10.0.3",
|
|
51
|
+
"husky": "^9.1.7",
|
|
52
|
+
"lint-staged": "^16.3.3",
|
|
47
53
|
"prettier": "^3.8.1",
|
|
54
|
+
"release-it": "^19.2.4",
|
|
48
55
|
"tsup": "^8.5.1",
|
|
49
56
|
"typescript": "^5.9.3",
|
|
50
57
|
"typescript-eslint": "^8.57.0",
|
|
51
58
|
"vitest": "^4.0.18"
|
|
52
59
|
},
|
|
60
|
+
"lint-staged": {
|
|
61
|
+
"*.{ts,js}": [
|
|
62
|
+
"eslint --fix",
|
|
63
|
+
"prettier --write"
|
|
64
|
+
],
|
|
65
|
+
"*.{json,md}": [
|
|
66
|
+
"prettier --write"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"commitlint": {
|
|
70
|
+
"extends": [
|
|
71
|
+
"@commitlint/config-conventional"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"release-it": {
|
|
75
|
+
"$schema": "https://unpkg.com/release-it/schema/release-it.json",
|
|
76
|
+
"git": {
|
|
77
|
+
"requireUpstream": false,
|
|
78
|
+
"requireCleanWorkingDir": false,
|
|
79
|
+
"tagName": "v${version}",
|
|
80
|
+
"commitMessage": "chore(release): v${version}"
|
|
81
|
+
},
|
|
82
|
+
"github": {
|
|
83
|
+
"release": true
|
|
84
|
+
},
|
|
85
|
+
"npm": {
|
|
86
|
+
"publish": false
|
|
87
|
+
},
|
|
88
|
+
"plugins": {
|
|
89
|
+
"@release-it/conventional-changelog": {
|
|
90
|
+
"preset": "conventionalcommits",
|
|
91
|
+
"writerOpts": {
|
|
92
|
+
"types": [
|
|
93
|
+
{
|
|
94
|
+
"type": "feat",
|
|
95
|
+
"section": "New Features"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "fix",
|
|
99
|
+
"section": "Bug Fixes"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"type": "refactor",
|
|
103
|
+
"section": "Refactoring"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "perf",
|
|
107
|
+
"section": "Performance"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "build",
|
|
111
|
+
"section": "Build System"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "ci",
|
|
115
|
+
"section": "Build System"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "docs",
|
|
119
|
+
"section": "Documentation"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "test",
|
|
123
|
+
"section": "Tests"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "revert",
|
|
127
|
+
"section": "Miscellaneous"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "chore",
|
|
131
|
+
"section": "Miscellaneous"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
53
138
|
"pnpm": {
|
|
54
139
|
"onlyBuiltDependencies": [
|
|
55
140
|
"esbuild"
|