maonline-cli 0.0.0-stage → 0.0.2

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/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ /node_modules
2
+
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ ## [0.0.2](https://github.com/strikegroup/maonline_cli/compare/v0.0.1...v0.0.2) - 2026-10-20
4
+
5
+ ### Other
6
+
7
+ - README 更新
8
+
9
+ ## [0.0.1]
10
+
11
+ ### Added
12
+
13
+ - npm と APT の配布構成を追加。
14
+
15
+ ### Changed
16
+
17
+ - crates.io の自動公開を有効化。
package/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -1,3 +1,358 @@
1
- # Temporary Holding Version
1
+ # M&A Online CLI
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [M&A Online](https://maonline.jp/) から、企業情報、M&A案件、ニュース・速報をコマンドラインから検索・取得するツールです。取得結果は JSON 形式で標準出力に書き出します。
4
+
5
+ ## できること
6
+
7
+ - 証券コード、EDINETコード、企業名などによる企業情報の検索
8
+ - 当事者、買収金額、スキームなどによるM&A案件の検索
9
+ - ニュース、大量保有速報、TOB速報の検索と記事取得
10
+
11
+ ## インストール
12
+
13
+ ### Cargo
14
+
15
+ ```bash
16
+ cargo install --locked maonline_cli
17
+ ```
18
+
19
+ ### Homebrew
20
+
21
+ ```bash
22
+ brew install strikegroup/tap/maonline
23
+ ```
24
+
25
+ ### npm
26
+
27
+ ```bash
28
+ npm install --global maonline-cli
29
+ ```
30
+
31
+ ### APT(Ubuntu / Debian)
32
+
33
+ ```bash
34
+ sudo install -d -m 0755 /etc/apt/keyrings
35
+ curl -fsSL https://strikegroup.github.io/maonline_cli/apt/maonline-cli-archive-keyring.gpg \
36
+ | sudo tee /etc/apt/keyrings/maonline-cli-archive-keyring.gpg > /dev/null
37
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/maonline-cli-archive-keyring.gpg] https://strikegroup.github.io/maonline_cli/apt stable main" \
38
+ | sudo tee /etc/apt/sources.list.d/maonline-cli.list > /dev/null
39
+ sudo apt update && sudo apt install maonline-cli
40
+ ```
41
+
42
+ ## 利用規約
43
+
44
+ [M&A Online Research Kit利用特約](https://maonline.jp/pages/policy_researchkit) に従って本ツールを利用してください。
45
+
46
+ ## セットアップ
47
+
48
+ M&A Online の管理者から API キーを取得し、最初に登録します。
49
+
50
+ ```bash
51
+ maonline setup --key YOUR_API_KEY
52
+ ```
53
+
54
+ ## ユースケース
55
+
56
+ 以下のレスポンス例は、主要なフィールドと検索結果を抜粋しています。
57
+
58
+ ### 企業名から企業情報を調べる
59
+
60
+ 企業名またはカナの一部を指定して、該当する企業の証券コード、EDINETコード、市場区分、所在地などを取得します。
61
+
62
+ ```bash
63
+ maonline companies --name ストライク
64
+ ```
65
+
66
+ ```json
67
+ [
68
+ {
69
+ "sec_code": "6196",
70
+ "edinet_code": "E32380",
71
+ "company_name": "ストライクグループ",
72
+ "market": "東証プライム",
73
+ "address": "千代田区大手町一丁目2番1号",
74
+ "homepage": "http://www.strike.co.jp/"
75
+ },
76
+ {
77
+ "sec_code": "9816",
78
+ "edinet_code": "E02738",
79
+ "company_name": "ストライダーズ",
80
+ "market": "東証スタンダード",
81
+ "address": "東京都港区新橋5-13-5 新橋MCVビル",
82
+ "homepage": "http://www.striders.co.jp/"
83
+ }
84
+ ]
85
+ ```
86
+
87
+ ### 証券コードから企業情報を取得する
88
+
89
+ 証券コードを指定すると、完全一致する企業を検索できます。
90
+
91
+ ```bash
92
+ maonline companies --sec-code 7203
93
+ ```
94
+
95
+ ```json
96
+ [
97
+ {
98
+ "sec_code": "7203",
99
+ "edinet_code": "E02144",
100
+ "company_name": "トヨタ自動車",
101
+ "market": "東証プライム、名証プレミア",
102
+ "address": "愛知県豊田市トヨタ町1",
103
+ "homepage": "http://www.toyota.co.jp/"
104
+ }
105
+ ]
106
+ ```
107
+
108
+ ### 楽天が関係するM&A案件を調べる
109
+
110
+ 買い手、対象、売り手のいずれかに指定した企業名を含むM&A案件を検索します。
111
+
112
+ ```bash
113
+ maonline ma-data --company 楽天
114
+ ```
115
+
116
+ ```json
117
+ [
118
+ {
119
+ "disdate": "2018-01-29",
120
+ "title": "楽天<4755>、野村HD<8604>傘下の朝日火災をTOBで買収へ",
121
+ "price": 44998391232,
122
+ "total": 44998391232,
123
+ "maoscheme": "4",
124
+ "maoschemename": "株式譲渡",
125
+ "maoschemesub": "1",
126
+ "maoschemesubname": "TOB",
127
+ "inout": "IN-IN",
128
+ "buyer_info": {
129
+ "name": "楽天(株)",
130
+ "code": "4755",
131
+ "industry": "IT・ソフトウエア",
132
+ "area": "東京都"
133
+ },
134
+ "target_info": {
135
+ "name": "朝日火災海上保険(株)",
136
+ "code": "",
137
+ "industry": "証券・商品先物",
138
+ "area": "東京都"
139
+ },
140
+ "seller_info": {
141
+ "name": "野村ホールディングス(株)",
142
+ "code": "8604",
143
+ "industry": "証券・商品先物",
144
+ "area": "東京都"
145
+ }
146
+ }
147
+ ]
148
+ ```
149
+
150
+ ### 1兆円以上の規模のM&A案件を抽出する
151
+
152
+ 買収金額の下限を指定して、大型案件を絞り込みます。
153
+
154
+ ```bash
155
+ maonline ma-data --min-price 1000000000000
156
+ ```
157
+
158
+ ```json
159
+ [
160
+ {
161
+ "disdate": "2025-06-03",
162
+ "title": "トヨタグループ、豊田自動織機<6201>をTOBで非公開化",
163
+ "price": 5920924771888,
164
+ "total": 5920924771888,
165
+ "maoscheme": "4",
166
+ "maoschemename": "株式譲渡",
167
+ "maoschemesub": "1",
168
+ "maoschemesubname": "TOB",
169
+ "inout": "IN-IN",
170
+ "buyer_info": {
171
+ "name": "トヨタ不動産(株)",
172
+ "code": "",
173
+ "industry": "住宅・不動産",
174
+ "area": "東京都"
175
+ },
176
+ "target_info": {
177
+ "name": "(株)豊田自動織機",
178
+ "code": "6201",
179
+ "industry": "輸送用機器",
180
+ "area": "愛知県"
181
+ },
182
+ "seller_info": {
183
+ "name": "株主",
184
+ "code": "",
185
+ "industry": "",
186
+ "area": ""
187
+ }
188
+ }
189
+ ]
190
+ ```
191
+
192
+ ### ストライクに関するニュースを検索
193
+
194
+ タイトル、本文、タグを対象にニュース記事を検索します。
195
+
196
+ ```bash
197
+ maonline news search ストライク
198
+ ```
199
+
200
+ ```json
201
+ [
202
+ {
203
+ "id": "20230113jp",
204
+ "title": "M&A総合研究所、持ち株会社制移行で3月に「M&A総研ホールディングス」に社名変更",
205
+ "body_html": "<p>記事本文...</p>",
206
+ "published_at": "2023-01-13T16:02:00+09:00",
207
+ "related_codes": [
208
+ "9552"
209
+ ]
210
+ }
211
+ ]
212
+ ```
213
+
214
+ ### TOB速報を絞り込む
215
+
216
+ 記事種別を `tob_news` に指定して、TOB速報だけを検索します。
217
+
218
+ ```bash
219
+ maonline news search トヨタ --article-type tob_news
220
+ ```
221
+
222
+ ```json
223
+ [
224
+ {
225
+ "id": "2026_004a",
226
+ "title": "トヨタアセット準備(トヨタ不動産)、豊田自動織機<6201>にTOB開始",
227
+ "body_html": "<p>記事本文...</p>",
228
+ "published_at": "2026-01-15T00:00:00+09:00",
229
+ "related_codes": [
230
+ "6201",
231
+ "E01514",
232
+ "E41388"
233
+ ]
234
+ }
235
+ ]
236
+ ```
237
+
238
+ ### 記事IDからニュースを取得する
239
+
240
+ 検索結果に含まれる記事IDを指定して、記事を1件取得します。 (記事IDが分かっているときのみ)
241
+
242
+ ```bash
243
+ maonline news get summary20251011
244
+ ```
245
+
246
+ ```json
247
+ {
248
+ "id": "summary20251011",
249
+ "title": "1週間のM&A速報まとめ(2025年10月6日〜2025年10月10日)",
250
+ "body_html": "<h3 class='dateheader'>2025年10月6日</h3><p>記事本文...</p>"
251
+ }
252
+ ```
253
+
254
+ ## コマンドリファレンス
255
+
256
+ ### コマンド一覧
257
+
258
+ | コマンド | 短縮形 | 概要 |
259
+ |---|---|---|
260
+ | `companies` | `c` | 企業情報を検索します |
261
+ | `ma-data` | `m` | M&A案件を検索します |
262
+ | `news` | `n` | ニュース・速報を検索・取得します |
263
+ | `setup` | - | API キーを登録します |
264
+ | `status` | `s` | 設定状態を確認します |
265
+
266
+ 各コマンドの詳細はヘルプでも確認できます。`-h` と `--help` の出力内容は同じです。
267
+
268
+ ```bash
269
+ maonline --help
270
+ maonline companies --help
271
+ maonline ma-data --help
272
+ maonline news search --help
273
+ ```
274
+
275
+ ### `companies`
276
+
277
+ 証券コード、企業名、EDINETコード、市場区分のうち、1つ以上を指定します。複数指定した場合は、すべての条件で絞り込みます。
278
+
279
+ | オプション | 内容 |
280
+ |---|---|
281
+ | `-s, --sec-code SEC_CODE` | 証券コードで完全一致検索 |
282
+ | `-n, --name COMPANY_NAME` | 企業名またはカナで曖昧検索 |
283
+ | `-e, --edinet-code EDINET_CODE` | EDINETコードで完全一致検索 |
284
+ | `-m, --market MARKET` | 市場区分で絞り込み |
285
+ | `-k, --key API_KEY` | API キーを明示的に指定する場合 |
286
+
287
+ ### `ma-data`
288
+
289
+ 企業名、買収金額、スキーム、国内外区分、エリアを組み合わせてM&A案件を絞り込みます。
290
+
291
+ | オプション | 内容 |
292
+ |---|---|
293
+ | `-c, --company COMPANY_NAME` | 買い手・対象・売り手の企業名で曖昧検索 |
294
+ | `--min-price YEN` | 買収金額の下限を円単位で指定 |
295
+ | `--max-price YEN` | 買収金額の上限を円単位で指定 |
296
+ | `-s, --scheme CODE` | M&Aスキームコードで絞り込み |
297
+ | `-i, --inout CATEGORY` | 国内外区分で絞り込み |
298
+ | `-a, --area AREA` | 対象エリア名で絞り込み |
299
+ | `-k, --key API_KEY` | API キーを明示的に指定する場合 |
300
+
301
+ ### `news search`(短縮形: `news s`)
302
+
303
+ キーワード、関連企業、記事種別、公開日の範囲を組み合わせてニュース記事を検索します。条件を省略した場合は全記事が対象です。
304
+
305
+ API キーを明示的に指定する場合は、`news` の直後、サブコマンドの前に指定します。
306
+
307
+ ```text
308
+ maonline news --key API_KEY search QUERY
309
+ ```
310
+
311
+ | 引数・オプション | 内容 |
312
+ |---|---|
313
+ | `QUERY` | タイトル、本文、タグを対象にキーワード検索 |
314
+ | `-c, --company COMPANY_NAME` | 関連企業名で絞り込み |
315
+ | `-a, --article-type TYPE` | 記事種別で絞り込み |
316
+ | `-f, --date-from YYYY-MM-DD` | 指定日以降に公開された記事へ絞り込み |
317
+ | `-t, --date-to YYYY-MM-DD` | 指定日以前に公開された記事へ絞り込み |
318
+ | `-w, --with-raw` | 解析前の本文を `body_raw` として出力 |
319
+
320
+ 記事種別には次の値を指定できます。
321
+
322
+ | 値 | 記事種別 |
323
+ |---|---|
324
+ | `news` | ニュース |
325
+ | `shareholdings` | 大量保有速報 |
326
+ | `tob_news` | TOB速報 |
327
+
328
+ ### `news get`(短縮形: `news g`)
329
+
330
+ ```text
331
+ maonline news get ARTICLE_ID
332
+ ```
333
+
334
+ 検索結果に含まれる記事IDを指定して、ニュース記事を1件取得します。
335
+
336
+ ### `setup`
337
+
338
+ ```text
339
+ maonline setup --key API_KEY
340
+ ```
341
+
342
+ 利用特約のURLと同意確認を表示し、同意すると M&A Online API キーを登録します。再登録時も同意確認を行います。
343
+
344
+ ### `status`
345
+
346
+ ```text
347
+ maonline status
348
+ ```
349
+
350
+ API キーの登録状態、設定ファイルのパス、データディレクトリを表示します。API キーそのものは表示しません。
351
+
352
+ ## 開発者向け情報
353
+
354
+ 開発環境の準備、実装構成、テスト、リリース手順は [Development Guide](docs/development.md) を参照してください。
355
+
356
+ ## ライセンス
357
+
358
+ このソフトウェアは [Apache License 2.0](LICENSE) で提供します。