dart-fss-cli 0.4.3 → 0.4.5

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
@@ -1,29 +1,26 @@
1
1
  # dart-fss-cli
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/dart-fss-cli)](https://www.npmjs.com/package/dart-fss-cli)
4
+ [![license](https://img.shields.io/npm/l/dart-fss-cli)](LICENSE)
5
+
3
6
  CLI for the Korea FSS [DART Open API](https://opendart.fss.or.kr) (Electronic Disclosure System).
4
7
 
5
- Access all DART API endpoints from the command line.
8
+ Access all **83 DART API endpoints** from the command line. Designed for both humans and AI agents (Claude Code, etc.).
6
9
 
7
- **[한국어 가이드 (Korean Guide)](docs/ko.md)**
10
+ **[Demo & Examples](DEMO.md)** | **[Agent Integration Guide](AGENTS.md)** | **[한국어 가이드](docs/ko.md)**
8
11
 
9
12
  ## Install
10
13
 
11
14
  ```bash
12
- curl -fsSL https://raw.githubusercontent.com/kiyeonjeon21/dart-fss-cli/main/install.sh | bash
15
+ npx dart-fss-cli --help
13
16
  ```
14
17
 
15
- Or via npm:
18
+ Runs instantly without installation. For global install:
16
19
 
17
20
  ```bash
18
21
  npm install -g dart-fss-cli
19
22
  ```
20
23
 
21
- Or run directly with npx:
22
-
23
- ```bash
24
- npx dart-fss-cli --help
25
- ```
26
-
27
24
  ## Setup
28
25
 
29
26
  Get an API key from [DART Open API](https://opendart.fss.or.kr).
@@ -35,49 +32,95 @@ export DART_API_KEY=your_api_key_here
35
32
  ## Usage
36
33
 
37
34
  ```bash
35
+ # Look up a company (Korean name → corp_code)
36
+ dart-fss lookup "삼성전자"
37
+
38
38
  # Company overview
39
39
  dart-fss disclosure company --corp "삼성전자" --pretty
40
40
 
41
- # Search disclosures
42
- dart-fss disclosure list --corp "카카오" --from 20240101 --to 20241231
41
+ # Search filings
42
+ dart-fss disclosure list --corp "카카오" --from 20250101 --to 20260101
43
43
 
44
- # Employee status
45
- dart-fss report employee --corp "삼성전자" --year 2024 --quarter annual
44
+ # Employee status (filtered fields)
45
+ dart-fss report employee --corp "삼성전자" --year 2025 --quarter annual \
46
+ --fields "sexdstn,fo_bbm,sm,avrg_cnwk_sdytrn"
46
47
 
47
48
  # Financial statements
48
- dart-fss financial single-account --corp "카카오" --year 2024 --quarter annual --pretty
49
+ dart-fss financial single-account --corp "SK하이닉스" --year 2025 --quarter annual --pretty
49
50
 
50
- # Major holdings
51
- dart-fss equity major-stock --corp "삼성전자" --pretty
51
+ # Major shareholding
52
+ dart-fss equity major-stock --corp "네이버"
52
53
 
53
- # Look up corp_code by name
54
- dart-fss lookup "네이버"
55
-
56
- # List all endpoints
57
- dart-fss endpoints
58
-
59
- # Save output to file
54
+ # Save to file
60
55
  dart-fss disclosure company --corp "삼성전자" --output result.json
61
56
  ```
62
57
 
58
+ > Korean company names work directly. Companies registered with English names (NAVER, LG, etc.) can also be found using Korean input.
59
+
63
60
  ## Command Groups
64
61
 
65
62
  | Command | Description | APIs |
66
63
  |---------|-------------|------|
67
- | `disclosure` | Disclosures (search, company overview, documents) | 4 |
68
- | `report` | Periodic reports (employees, executives, dividends, etc.) | 28 |
69
- | `financial` | Financial data (statements, indices, XBRL) | 7 |
64
+ | `disclosure` | Filings search, company overview, documents | 4 |
65
+ | `report` | Periodic reports (employees, executives, dividends, audit) | 28 |
66
+ | `financial` | Financial statements, indices, XBRL | 7 |
70
67
  | `equity` | Equity disclosure (major holdings, executive ownership) | 2 |
71
- | `major` | Major event reports (capital changes, bonds, M&A, etc.) | 36 |
72
- | `securities` | Securities registration (equity, debt, mergers, etc.) | 6 |
68
+ | `major` | Major events (capital changes, bonds, M&A, lawsuits) | 36 |
69
+ | `securities` | Securities registration statements | 6 |
73
70
 
74
- ## Global Options
71
+ ## Options
75
72
 
76
73
  | Option | Description |
77
74
  |--------|-------------|
78
- | `--api-key <key>` | DART API key (default: `DART_API_KEY` env) |
79
75
  | `--pretty` | Pretty-print JSON output |
76
+ | `--fields <f1,f2>` | Filter response fields (saves context window for agents) |
77
+ | `--dry-run` | Validate parameters without calling the API |
80
78
  | `--output <file>` | Save result to file |
79
+ | `--json <params>` | Pass raw API parameters as JSON |
80
+ | `--api-key <key>` | DART API key (default: `DART_API_KEY` env) |
81
+
82
+ ## Quarter Codes
83
+
84
+ | Value | Meaning |
85
+ |-------|---------|
86
+ | `q1` | Q1 report |
87
+ | `half` | Semi-annual |
88
+ | `q3` | Q3 report |
89
+ | `annual` | Annual report |
90
+
91
+ ## Agent Integration
92
+
93
+ Built for AI agents to self-discover and call endpoints:
94
+
95
+ ```bash
96
+ # Discover endpoints (auto-JSON when piped)
97
+ dart-fss endpoints --json-output
98
+
99
+ # Inspect parameter schema
100
+ dart-fss schema dividend
101
+
102
+ # Validate without API call
103
+ dart-fss report dividend --corp "삼성전자" --year 2025 --quarter annual --dry-run
104
+
105
+ # Structured JSON errors
106
+ # {"error":true,"code":"013","description":"No data found","message":"..."}
107
+ ```
108
+
109
+ Add to your `CLAUDE.md` to use as a tool:
110
+
111
+ ```markdown
112
+ ## Available Tools
113
+
114
+ dart-fss-cli is installed. Use it for Korean corporate disclosure data.
115
+
116
+ - `dart-fss endpoints --json-output` — list available APIs
117
+ - `dart-fss schema <endpoint>` — get parameter schema
118
+ - `dart-fss lookup <name>` — search company by name
119
+ - Always use `--fields` to limit response size
120
+ - Example: `dart-fss report employee --corp "삼성전자" --year 2025 --quarter annual --fields "corp_name,sm"`
121
+ ```
122
+
123
+ See [AGENTS.md](AGENTS.md) and [DEMO.md](DEMO.md) for detailed examples.
81
124
 
82
125
  ## Programmatic Usage
83
126
 
@@ -85,7 +128,12 @@ dart-fss disclosure company --corp "삼성전자" --output result.json
85
128
  import { createDartProgram } from 'dart-fss-cli';
86
129
 
87
130
  const program = createDartProgram();
88
- await program.parseAsync(['node', 'dart-fss', 'disclosure', 'company', '--corp', '삼성전자', '--pretty']);
131
+ await program.parseAsync([
132
+ 'node', 'dart-fss',
133
+ 'disclosure', 'company',
134
+ '--corp', '삼성전자',
135
+ '--pretty'
136
+ ]);
89
137
  ```
90
138
 
91
139
  ## License
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  createDartProgram,
4
4
  formatErrorJson
5
- } from "./chunk-KPRBD4DH.js";
5
+ } from "./chunk-JYPAIE4W.js";
6
6
 
7
7
  // src/bin.ts
8
8
  createDartProgram().parseAsync(process.argv).catch((err) => {
@@ -1664,7 +1664,7 @@ function createDartProgram() {
1664
1664
  const program = new Command();
1665
1665
  program.name("dart-fss").description(
1666
1666
  'DART Open API CLI \u2014 access Korea Financial Supervisory Service (FSS) electronic disclosure system.\nProvides 83 API endpoints for company filings, financial statements, equity disclosures, and more.\nAuthentication: set DART_API_KEY env var or pass --api-key. Get a key at https://opendart.fss.or.kr\nCompanies are identified by 8-digit corp_code or company name. Use "dart-fss lookup <name>" to find corp_code.\nOutput is JSON by default (compact single-line). Use --pretty for formatted output.\nRate limit: approximately 20,000 requests per day per API key.'
1667
- ).version("0.4.3").option("--api-key <key>", "DART API key (default: DART_API_KEY env). Get one at https://opendart.fss.or.kr").option("--pretty", "Pretty-print JSON output (default: compact single-line JSON)").option("--output <file>", "Save result to file instead of stdout").option("--json <params>", "Pass raw API parameters as JSON string, bypassing flag parsing").option("--fields <f1,f2,...>", "Comma-separated field names to include in output (reduces response size for agents)").option("--dry-run", "Validate parameters and print the resolved API request without calling the API");
1667
+ ).version("0.4.5").option("--api-key <key>", "DART API key (default: DART_API_KEY env). Get one at https://opendart.fss.or.kr").option("--pretty", "Pretty-print JSON output (default: compact single-line JSON)").option("--output <file>", "Save result to file instead of stdout").option("--json <params>", "Pass raw API parameters as JSON string, bypassing flag parsing").option("--fields <f1,f2,...>", "Comma-separated field names to include in output (reduces response size for agents)").option("--dry-run", "Validate parameters and print the resolved API request without calling the API");
1668
1668
  registerDisclosureCommands(program);
1669
1669
  registerPeriodicReportCommands(program);
1670
1670
  registerFinancialCommands(program);
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createDartProgram
3
- } from "./chunk-KPRBD4DH.js";
3
+ } from "./chunk-JYPAIE4W.js";
4
4
  export {
5
5
  createDartProgram
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dart-fss-cli",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "DART (금융감독원 전자공시) Open API CLI",
5
5
  "type": "module",
6
6
  "bin": {