@kiyeonjeon21/ncli 0.1.16 → 0.1.18

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 (2) hide show
  1. package/README.md +67 -28
  2. package/package.json +4 -1
package/README.md CHANGED
@@ -1,11 +1,52 @@
1
1
  # ncli
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@kiyeonjeon21/ncli)](https://www.npmjs.com/package/@kiyeonjeon21/ncli)
4
+ [![CI](https://github.com/kiyeonjeon21/naver-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/kiyeonjeon21/naver-cli/actions)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+ [![Node](https://img.shields.io/node/v/@kiyeonjeon21/ncli)](https://nodejs.org/)
7
+
3
8
  Agent-native CLI for Naver Open APIs.
4
9
 
5
10
  > Unofficial CLI for Naver Open APIs. Not affiliated with NAVER Corp.
6
11
 
7
12
  https://github.com/user-attachments/assets/c5776c61-b504-4aaa-bb08-591d4a95c4a1
8
13
 
14
+ ---
15
+
16
+ ## Why ncli?
17
+
18
+ Naver Open APIs have no official CLI. Existing tools are either MCP servers (high token cost, 72% reliability) or single-purpose scripts.
19
+
20
+ ncli is designed **for AI agents first** — structured JSON output, runtime schema introspection, input hardening, and safety rails — following the [agentic-cli-guide](https://github.com/kiyeonjeon21/agentic-cli-guide) principles.
21
+
22
+ | | CLI (ncli) | MCP |
23
+ |---|---|---|
24
+ | Token cost | **1x** | 10-32x |
25
+ | Reliability | **100%** | ~72% |
26
+ | Startup | **Instant** | Protocol negotiation |
27
+ | Context overhead | **Minimal** | 43+ tool schemas injected |
28
+
29
+ ---
30
+
31
+ ## Table of Contents
32
+
33
+ - [Install](#install)
34
+ - [Setup](#setup)
35
+ - [Usage](#usage)
36
+ - [Search](#search)
37
+ - [DataLab](#datalab)
38
+ - [CAPTCHA](#captcha)
39
+ - [Schema Introspection](#schema-introspection)
40
+ - [Agent-First Design](#agent-first-design)
41
+ - [Rate Limits](#rate-limits)
42
+ - [Configuration](#configuration)
43
+ - [Development](#development)
44
+ - [Troubleshooting](#troubleshooting)
45
+ - [Contributing](#contributing)
46
+ - [License](#license)
47
+
48
+ ---
49
+
9
50
  ## Install
10
51
 
11
52
  ```bash
@@ -51,7 +92,7 @@ ncli search blog "TypeScript" --page-all --max-results 50 --output ndjson
51
92
  echo '{"query":"AI","display":5}' | ncli search blog --json -
52
93
  ```
53
94
 
54
- Available search types: `blog`, `news`, `web`, `image`, `book`, `cafe`, `kin`, `encyclopedia`, `shop`, `local`, `errata`, `adult`, `doc`
95
+ Available search types: `blog` `news` `web` `image` `book` `cafe` `kin` `encyclopedia` `shop` `local` `errata` `adult` `doc`
55
96
 
56
97
  ### DataLab
57
98
 
@@ -110,48 +151,32 @@ ncli search blog --describe
110
151
  ### Other Commands
111
152
 
112
153
  ```bash
113
- # Check auth status
114
- ncli auth status
115
-
116
- # Print CONTEXT.md for agent consumption
117
- ncli context
118
-
119
- # Show version
120
- ncli --version
154
+ ncli auth status # Check authentication
155
+ ncli context # Print CONTEXT.md for agents
156
+ ncli --version # Show version
157
+ ncli --help # Show help
121
158
  ```
122
159
 
123
160
  ## Agent-First Design
124
161
 
125
- ncli is built for AI agents following the [agentic-cli-guide](https://github.com/kiyeonjeon21/agentic-cli-guide) principles:
126
-
127
162
  | Feature | Flag | Purpose |
128
163
  |---------|------|---------|
129
164
  | JSON output | `--output json` (default) | Machine-readable output |
130
- | NDJSON streaming | `--output ndjson` | Line-by-line streaming for large results |
165
+ | NDJSON streaming | `--output ndjson` | Line-by-line streaming |
131
166
  | Field masks | `--fields "title,link"` | Reduce token usage |
132
167
  | Dry-run | `--dry-run` | Validate without executing |
133
- | Sanitize | `--sanitize` | Filter prompt injection in API responses |
168
+ | Sanitize | `--sanitize` | Filter prompt injection |
134
169
  | Schema | `--describe` / `ncli schema` | Runtime API introspection |
135
170
  | Stdin | `--json -` | Pipe JSON payloads |
136
171
  | File input | `--json @payload.json` | Read JSON from file |
137
- | Pagination | `--page-all --max-results N` | Auto-paginate search results |
138
- | Context | `ncli context` | Inject CONTEXT.md into agent context |
139
-
140
- ### Why CLI over MCP?
141
-
142
- | Metric | CLI | MCP |
143
- |--------|-----|-----|
144
- | Token cost | 1x | 10-32x |
145
- | Reliability | 100% | ~72% |
146
- | Startup | Instant | Protocol negotiation |
147
-
148
- CLI is the pragmatic choice for agent tooling. MCP servers for Naver APIs [already exist](https://github.com/isnow890/naver-search-mcp) for environments that need them.
172
+ | Pagination | `--page-all --max-results N` | Auto-paginate results |
173
+ | Context | `ncli context` | Inject CONTEXT.md into agent |
149
174
 
150
175
  ## Rate Limits
151
176
 
152
177
  | API | Limit |
153
178
  |-----|-------|
154
- | Search (all types) | 25,000/day |
179
+ | Search (all 13 types) | 25,000/day |
155
180
  | DataLab (trend) | 1,000/day |
156
181
  | DataLab (shopping) | 1,000/day |
157
182
  | CAPTCHA | 1,000/day |
@@ -173,10 +198,24 @@ npm install
173
198
  cp .env.example .env # add your credentials
174
199
 
175
200
  npm run dev -- search blog "test" # run in dev mode
176
- npm test # run tests (58 tests)
201
+ npm test # run tests
177
202
  npm run build # compile TypeScript
178
203
  ```
179
204
 
205
+ ## Troubleshooting
206
+
207
+ | Problem | Solution |
208
+ |---------|----------|
209
+ | `AUTH_REQUIRED` | Run `ncli init` or set `NAVER_CLIENT_ID` and `NAVER_CLIENT_SECRET` |
210
+ | `HTTP_400` on DataLab | `endDate` must not be in the future |
211
+ | `HTTP_429` rate limited | Wait until daily limit resets (midnight KST) |
212
+ | Old version after install | Run `npm uninstall -g naver-cli` to remove legacy package |
213
+ | `Scope Status Invalid` | Check API permissions at [developers.naver.com/apps](https://developers.naver.com/apps/) |
214
+
215
+ ## Contributing
216
+
217
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, project structure, and release flow.
218
+
180
219
  ## License
181
220
 
182
- MIT
221
+ [MIT](LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiyeonjeon21/ncli",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Agent-native CLI for Naver Open APIs",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,6 +12,9 @@
12
12
  "AGENTS.md",
13
13
  "skills"
14
14
  ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
15
18
  "scripts": {
16
19
  "build": "tsc",
17
20
  "dev": "tsx src/cli.ts",