dominus-cli 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eli
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,248 @@
1
+ # Dominus
2
+
3
+ **AI-powered autonomous agent for Roblox Studio development.**
4
+
5
+ Dominus connects to Roblox Studio over WebSocket, giving you a terminal-based AI assistant that can read scripts, edit code, run Luau, browse the explorer tree, manage instances, upload assets, and run tests -- all in real-time.
6
+
7
+ ```
8
+ ◆ ◆ ◆
9
+ ╔█╗ ╔█╗ ╔█╗
10
+ ╔╝ █ ╚╗ ╔╝ █ ╚╗ ╔╝ █ ╚╗
11
+ ╚████████████████████████████████╝
12
+ D O M I N U S
13
+ ```
14
+
15
+ ## Features
16
+
17
+ - **Autonomous AI Agent** -- Plans, executes, and verifies multi-step tasks using tool calls (not just chat)
18
+ - **Real-time Studio Bridge** -- Bidirectional WebSocket connection to Roblox Studio via plugin
19
+ - **Persistent Memory** -- SQLite-backed memory that learns your project across sessions
20
+ - **15 Built-in Tools** -- Read/edit scripts, run code, browse explorer, manage instances, search, upload assets, run tests
21
+ - **Beautiful TUI** -- Ink-powered terminal interface with explorer tree, chat, output log, and live tool indicators
22
+ - **Multi-Model Support** -- Use any AI model via OpenRouter (Claude, GPT-4o, Gemini, Llama, DeepSeek, etc.)
23
+ - **Open Cloud Integration** -- Upload images, models, and audio directly to Roblox
24
+ - **Configurable Rules** -- Tell Dominus what to do and what not to do with persistent rules
25
+ - **StudioTestService** -- Run tests directly from the terminal
26
+ - **Plugin Auto-Install** -- One command to install the Studio plugin
27
+
28
+ ## Quick Start
29
+
30
+ ### 1. Install Dominus
31
+
32
+ ```bash
33
+ # With pnpm (recommended)
34
+ pnpm add -g dominus-cli
35
+
36
+ # Or with npm
37
+ npm install -g dominus-cli
38
+ ```
39
+
40
+ ### 2. Set Your API Key
41
+
42
+ Get an API key from [OpenRouter](https://openrouter.ai/settings/keys) (free tier available):
43
+
44
+ ```bash
45
+ dominus config set apiKey sk-or-v1-your-key-here
46
+ ```
47
+
48
+ Or use an environment variable:
49
+
50
+ ```bash
51
+ export OPENROUTER_API_KEY=sk-or-v1-your-key-here
52
+ ```
53
+
54
+ ### 3. Install the Studio Plugin
55
+
56
+ ```bash
57
+ dominus install-plugin
58
+ ```
59
+
60
+ This copies the Dominus plugin to your Roblox Studio plugins folder. Restart Studio to load it.
61
+
62
+ ### 4. Launch Dominus
63
+
64
+ ```bash
65
+ dominus
66
+ ```
67
+
68
+ The TUI will start, open a WebSocket server on port 18088, and wait for Studio to connect. In Studio, click the **Dominus > Connect** button in the toolbar.
69
+
70
+ ## Configuration
71
+
72
+ All config is stored at `~/.dominus/config.json`.
73
+
74
+ ```bash
75
+ # Set your API key
76
+ dominus config set apiKey <key>
77
+
78
+ # Change the AI model
79
+ dominus config set model openai/gpt-4o
80
+
81
+ # Change the WebSocket port
82
+ dominus config set port 9090
83
+
84
+ # Set your display name
85
+ dominus config set userName Eli
86
+
87
+ # Set up Open Cloud for asset uploads
88
+ dominus config set openCloudApiKey <your-open-cloud-key>
89
+
90
+ # View all settings
91
+ dominus config list
92
+ ```
93
+
94
+ ### Available Models
95
+
96
+ Any model on [OpenRouter](https://openrouter.ai/models) works. Popular choices:
97
+
98
+ | Model | ID |
99
+ |---|---|
100
+ | Claude Sonnet 4 | `anthropic/claude-sonnet-4` |
101
+ | GPT-4o | `openai/gpt-4o` |
102
+ | GPT-4o Mini | `openai/gpt-4o-mini` |
103
+ | Gemini 2.0 Flash | `google/gemini-2.0-flash-001` |
104
+ | DeepSeek V3 | `deepseek/deepseek-chat` |
105
+ | Llama 3.3 70B | `meta-llama/llama-3.3-70b-instruct` |
106
+
107
+ ## Agent Rules
108
+
109
+ Tell Dominus what to do (and what NOT to do):
110
+
111
+ ```bash
112
+ # Add rules
113
+ dominus rules add-do "Always use strict Luau type annotations"
114
+ dominus rules add-do "Follow Knit framework patterns"
115
+ dominus rules add-dont "Never use deprecated APIs like wait()"
116
+ dominus rules add-dont "Don't modify the DataStore schema without asking"
117
+
118
+ # View rules
119
+ dominus rules list
120
+ ```
121
+
122
+ Rules persist across sessions at `~/.dominus/rules.json`.
123
+
124
+ ## TUI Commands
125
+
126
+ Inside the Dominus terminal:
127
+
128
+ | Command | Description |
129
+ |---|---|
130
+ | (just type) | Chat with the AI agent |
131
+ | `/help` | Show all commands |
132
+ | `/run <code>` | Execute Luau in Studio |
133
+ | `/model <id>` | Switch AI model |
134
+ | `/clear` | Clear chat history |
135
+ | `/status` | Show connection info |
136
+ | `/index` | Re-index project scripts |
137
+ | `/memory` | Show recalled facts |
138
+
139
+ ## Architecture
140
+
141
+ ```
142
+ ┌─────────────────────────────────────────────────────┐
143
+ │ Terminal │
144
+ │ ┌─────────────────────────────────────────────────┐ │
145
+ │ │ Dominus TUI (Ink/React) │ │
146
+ │ │ ┌──────────┐ ┌───────────────────────────────┐ │ │
147
+ │ │ │ Explorer │ │ AI Chat + Tool Indicators │ │ │
148
+ │ │ │ │ │ │ │ │
149
+ │ │ └──────────┘ └───────────────────────────────┘ │ │
150
+ │ │ ┌─────────────────────────────────────────────┐ │ │
151
+ │ │ │ Output Log │ │ │
152
+ │ │ └─────────────────────────────────────────────┘ │ │
153
+ │ │ ┌─────────────────────────────────────────────┐ │ │
154
+ │ │ │ > Input │ │ │
155
+ │ │ └─────────────────────────────────────────────┘ │ │
156
+ │ └─────────────────────────────────────────────────┘ │
157
+ │ │ │
158
+ │ ┌──────────┴──────────┐ │
159
+ │ │ Agent Loop │ │
160
+ │ │ (Plan→Execute→ │ │
161
+ │ │ Verify→Learn) │ │
162
+ │ └──────────┬──────────┘ │
163
+ │ │ │
164
+ │ ┌───────────────────┼───────────────────┐ │
165
+ │ │ │ │ │
166
+ │ ┌──┴──┐ ┌─────┴─────┐ ┌────┴────┐ │
167
+ │ │Tools│ │ Memory │ │ AI │ │
168
+ │ │(15) │ │ (SQLite) │ │Provider │ │
169
+ │ └──┬──┘ └───────────┘ └─────────┘ │
170
+ │ │ │
171
+ └─────┼────────────────────────────────────────────────┘
172
+ │ WebSocket
173
+
174
+ ┌─────┴────────────────────────────────────────────────┐
175
+ │ Roblox Studio │
176
+ │ ┌─────────────────────────────────────────────────┐ │
177
+ │ │ Dominus Plugin │ │
178
+ │ │ (WS Client → Explorer, Executor, Watcher, │ │
179
+ │ │ Properties, Reflection, TestRunner) │ │
180
+ │ └─────────────────────────────────────────────────┘ │
181
+ └───────────────────────────────────────────────────────┘
182
+ ```
183
+
184
+ ## Studio Plugin
185
+
186
+ The plugin uses the **WebSocket API** introduced in Roblox Studio (October 2025):
187
+
188
+ ```lua
189
+ HttpService:CreateWebStreamClient(Enum.WebStreamClientType.WebSocket, { Url = "ws://localhost:18088" })
190
+ ```
191
+
192
+ ### Building with Rojo
193
+
194
+ If you have [Rojo](https://rojo.space/) installed:
195
+
196
+ ```bash
197
+ pnpm build:plugin
198
+ ```
199
+
200
+ This creates `plugin/Dominus.rbxm` that you can drag into Studio.
201
+
202
+ ### Manual Install
203
+
204
+ ```bash
205
+ dominus install-plugin
206
+ ```
207
+
208
+ Copies the plugin Lua files directly to your Studio plugins folder.
209
+
210
+ ## Development
211
+
212
+ ```bash
213
+ # Clone and install
214
+ git clone https://github.com/eli/dominus.git
215
+ cd dominus
216
+ pnpm install
217
+
218
+ # Run in dev mode
219
+ pnpm dev
220
+
221
+ # Run tests
222
+ pnpm test
223
+
224
+ # Type check
225
+ pnpm typecheck
226
+
227
+ # Build
228
+ pnpm build
229
+
230
+ # Format
231
+ pnpm format
232
+ ```
233
+
234
+ ## Tech Stack
235
+
236
+ - **TypeScript** + **Node.js 20+** -- Runtime
237
+ - **Ink 5** (React for CLI) -- Terminal UI framework
238
+ - **ws** -- WebSocket server
239
+ - **OpenAI SDK** -- AI provider (OpenRouter-compatible)
240
+ - **sql.js** -- SQLite in WASM (persistent memory)
241
+ - **Commander** -- CLI argument parsing
242
+ - **Vitest** -- Test runner
243
+ - **tsup** -- Bundler
244
+ - **Rojo** -- Roblox plugin builder
245
+
246
+ ## License
247
+
248
+ MIT