@mk-co/neox-cli 2.0.7

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/LICENSE ADDED
@@ -0,0 +1,254 @@
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ our General Public Licenses are intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users.
19
+
20
+ When we speak of free software, we are referring to freedom, not
21
+ price. Our General Public Licenses are designed to make sure that you
22
+ have the freedom to distribute copies of free software (and charge for
23
+ them if you wish), that you receive source code or can get it if you
24
+ want it, that you can change the software or use pieces of it in new
25
+ free programs, and that you know you can do these things.
26
+
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ TERMS AND CONDITIONS
60
+
61
+ 0. Definitions.
62
+
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
64
+
65
+ "Copyright" also means copyright-like laws that apply to other kinds of
66
+ works, such as semiconductor masks.
67
+
68
+ "The Program" refers to any copyrightable work licensed under this
69
+ License. Each licensee is addressed as "you". "Licensees" and
70
+ "recipients" may be individuals or organizations.
71
+
72
+ To "modify" a work means to copy from or adapt all or part of the work
73
+ in a fashion requiring copyright permission, other than the making of an
74
+ exact copy. The resulting work is called a "modified version" of the
75
+ earlier work or a work "based on" the earlier work.
76
+
77
+ A "covered work" means either the unmodified Program or a work based
78
+ on the Program.
79
+
80
+ To "propagate" a work means to do anything with it that, without
81
+ permission, would make you directly or secondarily liable for
82
+ infringement under applicable copyright law, except executing it on a
83
+ computer or modifying a private copy. Propagation includes copying,
84
+ distribution (with or without modification), making available to the
85
+ public, and in some countries other activities as well.
86
+
87
+ To "convey" a work means any kind of propagation that enables other
88
+ parties to make or receive copies. Mere interaction with a user through
89
+ a computer network, with no transfer of a copy, is not conveying.
90
+
91
+ An interactive user interface displays "Appropriate Legal Notices"
92
+ to the extent that it includes a convenient and prominently visible
93
+ feature that (1) displays an appropriate copyright notice, and (2)
94
+ tells the user that there is no warranty for the work (except to the
95
+ extent that warranties are provided), that licensees may convey the
96
+ work under this License, and how to view a copy of this License. If
97
+ the interface presents a list of user commands or options, such as a
98
+ menu, a prominent item in the list meets this criterion.
99
+
100
+ 1. Source Code.
101
+
102
+ The "source code" for a work means the preferred form of the work
103
+ for making modifications to it. "Object code" means any non-source
104
+ form of a work.
105
+
106
+ A "Standard Interface" means an interface that either is an official
107
+ standard defined by a recognized standards body, or, in the case of
108
+ interfaces specified for a particular programming language, one that
109
+ is widely used among developers working in that language.
110
+
111
+ The "System Libraries" of an executable work include anything, other
112
+ than the work as a whole, that (a) is included in the normal form of
113
+ packaging a Major Component, but which is not part of that Major
114
+ Component, and (b) serves only to enable use of the work with that
115
+ Major Component, or to implement a Standard Interface for which an
116
+ implementation is available to the public in source code form. A
117
+ "Major Component", in this context, means a major essential component
118
+ (kernel, window system, and so on) of the specific operating system
119
+ (if any) on which the executable work runs, or a compiler used to
120
+ produce the work, or an object code interpreter used to run it.
121
+
122
+ The "Corresponding Source" for a work in object code form means all
123
+ the source code needed to generate, install, and (for an executable
124
+ work) run the object code and to modify the work, including scripts to
125
+ control those activities. However, it does not include the work's
126
+ System Libraries, or general-purpose tools or generally available free
127
+ programs which are used unmodified in performing those activities but
128
+ which are not part of the work. For example, Corresponding Source
129
+ includes interface definition files associated with source files for
130
+ the work, and the source code for shared libraries and dynamically
131
+ linked subprograms that the work is specifically designed to require,
132
+ such as by intimate data communication or control flow between those
133
+ subprograms and other parts of the work.
134
+
135
+ The Corresponding Source need not include anything that users
136
+ can regenerate automatically from other parts of the Corresponding
137
+ Source.
138
+
139
+ The Corresponding Source for a work in source code form is that
140
+ same work.
141
+
142
+ 2. Basic Permissions.
143
+
144
+ All rights granted under this License are granted for the term of
145
+ copyright on the Program, and are irrevocable provided the stated
146
+ conditions are met. This License explicitly affirms your unlimited
147
+ permission to run the unmodified Program. The output from running a
148
+ covered work is covered by this License only if the output, given its
149
+ content, constitutes a covered work. This License acknowledges your
150
+ rights of fair use or other equivalent, as provided by copyright law.
151
+
152
+ You may make, run and propagate covered works that you do not
153
+ convey, without conditions so long as your license otherwise remains
154
+ in force. You may convey covered works to others for the sole purpose
155
+ of having them make modifications exclusively for you, or provide you
156
+ with facilities for running those works, provided that you comply with
157
+ the terms of this License in conveying all material for which you do
158
+ not control copyright. Those thus making or running the covered works
159
+ for you must do so exclusively on your behalf, under your direction
160
+ and control, on terms that prohibit them from making any copies of
161
+ your copyrighted material outside their relationship with you.
162
+
163
+ Conveying under any other circumstances is permitted solely under
164
+ the conditions stated below. Sublicensing is not allowed; section 10
165
+ makes it unnecessary.
166
+
167
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168
+
169
+ No covered work shall be deemed part of an effective technological
170
+ measure under any applicable law fulfilling obligations under article
171
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172
+ similar laws prohibiting or restricting circumvention of such
173
+ measures.
174
+
175
+ When you convey a covered work, you waive any legal power to forbid
176
+ circumvention of technological measures to the extent such circumvention
177
+ is effected by exercising rights under this License with respect to
178
+ the covered work, and you disclaim any intention to limit operation or
179
+ modification of the work as a means of enforcing, against the work's
180
+ users, your or third parties' legal rights to forbid circumvention of
181
+ technological measures.
182
+
183
+ 4. Conveying Verbatim Copies.
184
+
185
+ You may convey verbatim copies of the Program's source code as you
186
+ receive it, in any medium, provided that you conspicuously and
187
+ appropriately publish on each copy an appropriate copyright notice;
188
+ keep intact all notices stating that this License and any
189
+ non-permissive terms added in accord with section 7 apply to the code;
190
+ keep intact all notices of the absence of any warranty; and give all
191
+ recipients a copy of this License along with the Program.
192
+
193
+ You may charge any price or no price for each copy that you convey,
194
+ and you may offer support or warranty protection for a fee.
195
+
196
+ 5. Conveying Modified Source Versions.
197
+
198
+ You may convey a work based on the Program, or the modifications to
199
+ produce it from the Program, in the form of source code under the
200
+ terms of section 4, provided that you also meet all of these conditions:
201
+
202
+ a) The work must carry prominent notices stating that you modified
203
+ it, and giving a relevant date.
204
+
205
+ b) The work must carry prominent notices stating that it is
206
+ released under this License and any conditions added under section
207
+ 7. This requirement modifies the requirement in section 4 to
208
+ "keep intact all notices".
209
+
210
+ c) You must license the entire work, as a whole, under this
211
+ License to anyone who comes into possession of a copy. This
212
+ License will therefore apply, along with any applicable section 7
213
+ additional terms, to the whole of the work, and all its parts,
214
+ regardless of how they are packaged. This License gives no
215
+ permission to license the work in any other way, but it does not
216
+ invalidate such permission if you have separately received it.
217
+
218
+ d) If the work has interactive user interfaces, each must display
219
+ Appropriate Legal Notices; however, if the Program has interactive
220
+ interfaces that do not display Appropriate Legal Notices, your
221
+ work need not make them do so.
222
+
223
+ A compilation of a covered work with other separate and independent
224
+ works, which are not by their nature extensions of the covered work,
225
+ and which are not combined with it such as to form a larger program,
226
+ in or on a volume of a storage or distribution medium, is called an
227
+ "aggregate" if the compilation and its resulting copyright are not
228
+ used to limit the access or legal rights of the compilation's users
229
+ beyond what the individual works permit. Inclusion of a covered work
230
+ in an aggregate does not cause this License to apply to the other
231
+ parts of the aggregate.
232
+
233
+ 6. Conveying Non-Source Forms.
234
+
235
+ You may convey a covered work in object code form under the terms
236
+ of sections 4 and 5, provided that you also convey the
237
+ machine-readable Corresponding Source under the terms of this License,
238
+ in one of these ways:
239
+
240
+ a) Convey the object code in, or embodied in, a physical product
241
+ (including a physical distribution medium), accompanied by the
242
+ Corresponding Source fixed on a durable physical medium
243
+ customarily used for software interchange.
244
+
245
+ b) Convey the object code in, or embodied in, a physical product
246
+ (including a physical distribution medium), accompanied by a
247
+ written offer, valid for at least three years and valid for as
248
+ long as you offer spare parts or customer support for that product
249
+ model, to give anyone who possesses the object code either (1) a
250
+ copy of the Corresponding Source for all the software in the
251
+ product that is covered by this License, on a durable physical
252
+ medium customarily used for software interchange, for a price no
253
+ more than your reasonable cost of physically performing this
254
+ conveying of source, or (2) access to copy the
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ <p align="center">
2
+ <img src="assets/logo.svg" alt="Neox Logo" width="120" height="120">
3
+ </p>
4
+
5
+ <h1 align="center">Neox</h1>
6
+
7
+ <p align="center">
8
+ <strong>AI Code Assistant · CLI + Desktop</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://github.com/mk-co/Neox/releases"><img src="https://img.shields.io/badge/version-2.0.6-blue.svg" alt="Version"></a>
13
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg" alt="Node.js"></a>
14
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ 支持多模型 · 智能回滚 · Java 调试 · 内置终端与编辑器
19
+ </p>
20
+
21
+ ---
22
+
23
+ ## Features
24
+
25
+ | 功能 | 说明 | 状态 |
26
+ |------|------|------|
27
+ | **多模型支持** | Claude / GPT / 豆包 / 自定义 API | ✅ |
28
+ | **双形态** | CLI 终端 + Electron 桌面应用 | ✅ |
29
+ | **Shadow Git** | 消息级自动快照,支持多级回滚 | ✅ |
30
+ | **内置编辑器** | Monaco Editor (VS Code 同款) | ✅ |
31
+ | **内置终端** | 多终端会话管理 | ✅ |
32
+ | **Timeline** | 可视化操作时间线 | ✅ |
33
+ | **Java Debug** | 基于 DAP 协议的调试集成 | ✅ |
34
+ | **Python Debug** | Python 调试支持 | 🚧 |
35
+ | **浏览器自动化** | Puppeteer 集成 | 🚧 |
36
+ | **插件系统** | 第三方工具扩展 | 📋 |
37
+ | **多 Agent 协作** | 多角色 Agent 并行工作 | 📋 |
38
+
39
+ > ✅ 已完成 · 🚧 开发中 · 📋 计划中
40
+
41
+ ---
42
+
43
+ ## Quick Start
44
+
45
+ ### CLI
46
+
47
+ ```bash
48
+ # 安装
49
+ npm install -g @mk-co/neox-cli
50
+
51
+ # 启动
52
+ neox
53
+ ```
54
+
55
+ ### Desktop
56
+
57
+ 从 [Releases](https://github.com/mk-co/Neox/releases) 下载对应平台安装包。
58
+
59
+ macOS 首次打开如遇安全提示:
60
+ ```bash
61
+ sudo xattr -r -d com.apple.quarantine /Applications/Neox.app
62
+ ```
63
+
64
+ ### From Source
65
+
66
+ ```bash
67
+ git clone https://github.com/mk-co/Neox.git
68
+ cd Neox && npm install
69
+
70
+ # CLI
71
+ npm run dev
72
+
73
+ # Desktop
74
+ npm run ui:dev
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Configuration
80
+
81
+ 首次启动会引导配置,配置文件位置:
82
+
83
+ | 平台 | 路径 |
84
+ |------|------|
85
+ | macOS | `~/Library/Application Support/Neox/config.json` |
86
+ | Linux | `~/.config/neox/config.json` |
87
+ | Windows | `%APPDATA%\Neox\config.json` |
88
+
89
+ 配置示例:
90
+
91
+ ```json
92
+ {
93
+ "providers": [
94
+ {
95
+ "id": "openai",
96
+ "type": "openai",
97
+ "baseUrl": "https://api.openai.com/v1",
98
+ "apiKey": "sk-...",
99
+ "models": ["gpt-4o"]
100
+ }
101
+ ]
102
+ }
103
+ ```
104
+
105
+ ---
106
+
107
+ ## CLI Commands
108
+
109
+ ```bash
110
+ # 会话
111
+ /sessions # 列出会话
112
+ /session new # 新建会话
113
+ /clear # 清空当前会话
114
+
115
+ # 回滚
116
+ /checkpoint [name] # 创建检查点
117
+ /rollback # 打开快照选择器
118
+ /undo # 撤销上一步
119
+
120
+ # 模型
121
+ /provider list # 查看 Provider
122
+ /model # 切换模型
123
+ /health # 健康检查
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Java Debug
129
+
130
+ ```bash
131
+ # 安装调试组件
132
+ npm run setup-java-debug
133
+
134
+ # 启动 Java 应用 (开启调试)
135
+ java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar app.jar
136
+ ```
137
+
138
+ 然后在 Neox 中连接 `localhost:5005` 即可让 AI 进行断点调试。
139
+
140
+ ---
141
+
142
+ ## Tech Stack
143
+
144
+ - **Runtime**: Node.js 20+
145
+ - **Desktop**: Electron 32
146
+ - **Editor**: Monaco Editor
147
+ - **Terminal**: xterm.js + node-pty
148
+ - **AI SDK**: OpenAI API / Anthropic API
149
+
150
+ ---
151
+
152
+ ## Contributing
153
+
154
+ ```bash
155
+ # Fork & Clone
156
+ git checkout -b feature/xxx
157
+ # 提交
158
+ git commit -m "feat: xxx"
159
+ # PR
160
+ ```
161
+
162
+ ---
163
+
164
+ ## License
165
+
166
+ [MIT](LICENSE)
167
+
168
+ ---
169
+
170
+ <p align="center">
171
+ <sub>Built by MK-CO</sub>
172
+ </p>