openkitt 0.3.18 → 0.4.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/README.md +58 -154
- package/dist/cli.js +3287 -1650
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,188 +2,111 @@
|
|
|
2
2
|
|
|
3
3
|
**AI-powered monorepo CLI for Railway deployments.**
|
|
4
4
|
|
|
5
|
-
KITT is an interactive terminal interface that scaffolds full-stack monorepos, adds apps with integrations pre-wired, and manages deployment to [Railway](https://railway.app) — all from a persistent REPL shell.
|
|
6
|
-
|
|
7
5
|
```
|
|
8
6
|
______ _______________________
|
|
9
7
|
___ //_/___ /__ __/__ __/
|
|
10
8
|
__ ,< __ / __ / __ /
|
|
11
9
|
_ /| | __/ / _ / _ /
|
|
12
10
|
/_/ |_| /___/ /_/ /_/
|
|
13
|
-
|
|
14
|
-
KITT v0.3.17 — AI-Powered App Scaffolding CLI
|
|
15
11
|
```
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Why KITT?
|
|
20
|
-
|
|
21
|
-
Modern app development means stitching together a monorepo, a cloud platform, an ORM, auth, payments, a job queue, and more — before writing a single line of product code. The setup tax is real and repetitive.
|
|
22
|
-
|
|
23
|
-
KITT eliminates that tax. It scaffolds a production-ready monorepo in one command, adds new apps with integrations already wired, and handles Railway deployments through a conversational REPL — no context-switching, no config hunting.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Who it's for
|
|
28
|
-
|
|
29
|
-
- **Indie developers and small teams** shipping full-stack TypeScript apps to Railway
|
|
30
|
-
- **Developers who want opinions** — KITT makes a stack choice (TanStack Start, Next.js, Hono, Express) and sets it up correctly
|
|
31
|
-
- **Teams who iterate fast** — add apps, provision databases, rotate envs, tail logs, all without leaving the terminal
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Features
|
|
36
|
-
|
|
37
|
-
- **Interactive REPL** with tab-completion and ghost text suggestions
|
|
38
|
-
- **AI scaffolding** — uses your LLM key (Anthropic, OpenAI, Gemini, or GitHub Copilot) to generate app code, wire integrations, and provision Railway infrastructure
|
|
39
|
-
- **Monorepo workspace** with `apps/` and `packages/` following convention
|
|
40
|
-
- **Framework support**: TanStack Start, Next.js, Hono, Express
|
|
41
|
-
- **Integration catalog**: databases, auth, payments, email, queues, caching, UI, analytics, testing
|
|
42
|
-
- **Version management** — pin integration versions, check for updates, apply selectively
|
|
43
|
-
- **Sandbox & secret scan** — stages LLM-generated files for review before writing to disk; blocks deploys if `.env` files containing secrets would be committed
|
|
44
|
-
- **Non-interactive mode** — scriptable via `--run` flag for CI pipelines
|
|
45
|
-
- **Auto update check** — notifies on new releases at startup
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Requirements
|
|
50
|
-
|
|
51
|
-
- Node.js ≥ 20
|
|
52
|
-
- [Railway CLI](https://docs.railway.app/develop/cli) installed and authenticated
|
|
53
|
-
- One of the following LLM providers configured:
|
|
54
|
-
- **Anthropic** — API key (claude-sonnet-4-5, claude-opus-4-5, claude-3-5-haiku)
|
|
55
|
-
- **OpenAI** — API key (gpt-4o, gpt-4o-mini, o1, o1-mini)
|
|
56
|
-
- **Gemini** — API key (gemini-2.0-flash, gemini-2.0-flash-lite, gemini-1.5-pro)
|
|
57
|
-
- **GitHub Copilot** — device OAuth flow (claude-haiku-4.5, gpt-4.1, claude-sonnet-4.6, claude-opus-4.6)
|
|
58
|
-
|
|
59
|
-
---
|
|
13
|
+
KITT scaffolds full-stack monorepos, adds apps with integrations pre-wired, and manages deployment to [Railway](https://railway.app) — all from a persistent REPL shell.
|
|
60
14
|
|
|
61
|
-
##
|
|
15
|
+
## Install
|
|
62
16
|
|
|
63
17
|
```bash
|
|
64
|
-
# Install globally
|
|
65
18
|
npm install -g openkitt
|
|
66
|
-
|
|
67
|
-
# Or run without installing
|
|
68
|
-
npx openkitt
|
|
69
19
|
```
|
|
70
20
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
kitt > /login
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
This walks you through Railway authentication (browser OAuth) and LLM provider setup (provider, model, API key or GitHub Copilot device flow). You only do this once — credentials are stored locally.
|
|
78
|
-
|
|
79
|
-
### 2. Initialize a workspace
|
|
80
|
-
|
|
81
|
-
Create a new directory and initialize it as a KITT monorepo:
|
|
21
|
+
Or run without installing:
|
|
82
22
|
|
|
83
23
|
```bash
|
|
84
|
-
mkdir my-project && cd my-project
|
|
85
24
|
npx openkitt
|
|
86
25
|
```
|
|
87
26
|
|
|
88
|
-
|
|
89
|
-
kitt > /init
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
KITT will:
|
|
93
|
-
- Prompt for a workspace name
|
|
94
|
-
- Create the `apps/` and `packages/` directory structure
|
|
95
|
-
- Write a workspace manifest (`.kitt/manifest.json`)
|
|
96
|
-
- Create a Railway project and link it to the workspace
|
|
97
|
-
- Generate `versions.md` with pinned integration versions
|
|
98
|
-
|
|
99
|
-
### 3. Add an app
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
kitt [my-project] > /create
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
KITT prompts you to select:
|
|
106
|
-
- **Framework** — TanStack Start, Next.js, Hono, or Express
|
|
107
|
-
- **Integrations** — pick from databases, auth, payments, email, queues, UI libraries, testing, and more
|
|
108
|
-
|
|
109
|
-
Then it scaffolds the app, installs packages, wires integrations, and stages everything for review before writing to disk.
|
|
110
|
-
|
|
111
|
-
### 4. Run locally
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
kitt [my-project] > /run
|
|
115
|
-
```
|
|
27
|
+
## Requirements
|
|
116
28
|
|
|
117
|
-
|
|
29
|
+
- Node.js ≥ 20
|
|
30
|
+
- [Railway CLI](https://docs.railway.com/guides/cli) installed and authenticated
|
|
31
|
+
- An LLM provider: **Anthropic**, **OpenAI**, **Gemini**, or **GitHub Copilot**
|
|
118
32
|
|
|
119
|
-
|
|
33
|
+
## Quick Start
|
|
120
34
|
|
|
121
35
|
```
|
|
122
|
-
kitt
|
|
36
|
+
kitt > /auth:login # Authenticate Railway + LLM
|
|
37
|
+
kitt > /kitt:init # Create a new workspace
|
|
38
|
+
kitt [my-project] > /app:create # Add an app (framework + integrations)
|
|
39
|
+
kitt [my-project] > /deploy:app # Deploy to Railway
|
|
123
40
|
```
|
|
124
41
|
|
|
125
|
-
Selects the app, generates `railway.toml` if needed, scans for exposed secrets, and triggers a Railway deployment via the MCP server.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
42
|
## Commands
|
|
130
43
|
|
|
131
|
-
###
|
|
44
|
+
### Auth
|
|
132
45
|
|
|
133
46
|
| Command | Description |
|
|
134
47
|
|---|---|
|
|
135
|
-
| `/login` | Full auth setup — Railway + LLM
|
|
136
|
-
| `/
|
|
137
|
-
| `/
|
|
138
|
-
| `/
|
|
139
|
-
| `/
|
|
140
|
-
| `/logout` | Remove all stored credentials |
|
|
48
|
+
| `/auth:login` | Full auth setup — Railway + LLM |
|
|
49
|
+
| `/auth:railway` | Authenticate with Railway |
|
|
50
|
+
| `/auth:llm` | Configure LLM provider and API key |
|
|
51
|
+
| `/auth:model` | Switch active model |
|
|
52
|
+
| `/auth:status` | Show current auth status |
|
|
53
|
+
| `/auth:logout` | Remove all stored credentials |
|
|
141
54
|
|
|
142
55
|
### Workspace
|
|
143
56
|
|
|
144
57
|
| Command | Description |
|
|
145
58
|
|---|---|
|
|
146
|
-
| `/init` | Scaffold a new KITT
|
|
147
|
-
| `/
|
|
148
|
-
| `/
|
|
149
|
-
| `/list` | List all
|
|
150
|
-
| `/
|
|
151
|
-
| `/
|
|
59
|
+
| `/kitt:init` | Scaffold a new KITT workspace |
|
|
60
|
+
| `/kitt:delete [name]` | Delete a workspace and all its files |
|
|
61
|
+
| `/kitt:switch [name]` | Switch active workspace |
|
|
62
|
+
| `/kitt:list` | List all reachable workspaces |
|
|
63
|
+
| `/kitt:status` | Workspace overview and Railway links |
|
|
64
|
+
| `/kitt:link [projectId]` | Link a Railway project to this workspace |
|
|
65
|
+
|
|
66
|
+
### Apps
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `/app:create` | Add a new app (framework + integrations) |
|
|
71
|
+
| `/app:delete [appName]` | Remove an app and its files |
|
|
72
|
+
| `/app:list` | List all apps, packages, and services |
|
|
73
|
+
| `/app:run [appName]` | Start an app's dev server |
|
|
74
|
+
| `/app:settings` | View or update workspace settings |
|
|
152
75
|
|
|
153
76
|
### Deploy & Infrastructure
|
|
154
77
|
|
|
155
78
|
| Command | Description |
|
|
156
79
|
|---|---|
|
|
157
|
-
| `/deploy [appName]` | Deploy an app to Railway |
|
|
158
|
-
| `/deploy:template <
|
|
80
|
+
| `/deploy:app [appName]` | Deploy an app to Railway |
|
|
81
|
+
| `/deploy:template <query>` | Search and provision a Railway template |
|
|
82
|
+
| `/deploy:delete [service]` | Delete a Railway service |
|
|
83
|
+
| `/deploy:destroy` | Delete entire Railway project (irreversible) |
|
|
84
|
+
| `/deploy:domain [appName]` | Generate or show Railway domain |
|
|
85
|
+
| `/deploy:logs [appName]` | Tail deployment logs |
|
|
86
|
+
| `/deploy:status` | App status and Railway deployment health |
|
|
87
|
+
| `/deploy:health [appName]` | HTTP health check on deployed services |
|
|
159
88
|
| `/env:create <name>` | Create a new Railway environment |
|
|
160
|
-
| `/env:
|
|
161
|
-
| `/env:vars
|
|
162
|
-
| `/
|
|
163
|
-
| `/logs [appName]` | Tail deployment logs |
|
|
164
|
-
| `/status` | Show workspace status and Railway deployment health |
|
|
89
|
+
| `/env:delete <name>` | Delete a Railway environment |
|
|
90
|
+
| `/env:vars [service]` | List environment variables |
|
|
91
|
+
| `/env:vars set [svc] <k> <v>` | Set an environment variable |
|
|
165
92
|
|
|
166
93
|
### Version Management
|
|
167
94
|
|
|
168
95
|
| Command | Description |
|
|
169
96
|
|---|---|
|
|
170
|
-
| `/versions` | View all pinned integration versions |
|
|
171
|
-
| `/versions
|
|
172
|
-
| `/versions
|
|
173
|
-
| `/versions
|
|
174
|
-
|
|
175
|
-
---
|
|
97
|
+
| `/versions:list` | View all pinned integration versions |
|
|
98
|
+
| `/versions:check` | Check for newer available versions |
|
|
99
|
+
| `/versions:update` | Interactive version update wizard |
|
|
100
|
+
| `/versions:set <name> <ver>` | Pin a specific version |
|
|
176
101
|
|
|
177
|
-
## Frameworks
|
|
178
|
-
|
|
179
|
-
**Frameworks**
|
|
102
|
+
## Frameworks
|
|
180
103
|
|
|
181
104
|
| Type | Options |
|
|
182
105
|
|---|---|
|
|
183
106
|
| Full-stack | `tanstack-start`, `nextjs` |
|
|
184
107
|
| Backend | `hono`, `expressjs` |
|
|
185
108
|
|
|
186
|
-
|
|
109
|
+
## Integrations
|
|
187
110
|
|
|
188
111
|
| Category | Options |
|
|
189
112
|
|---|---|
|
|
@@ -198,47 +121,28 @@ Selects the app, generates `railway.toml` if needed, scans for exposed secrets,
|
|
|
198
121
|
| Analytics | `posthog`, `sentry` |
|
|
199
122
|
| Testing | `vitest`, `playwright`, `storybook` |
|
|
200
123
|
|
|
201
|
-
---
|
|
202
|
-
|
|
203
124
|
## CLI Flags
|
|
204
125
|
|
|
205
126
|
```
|
|
206
127
|
--verbose Enable verbose logging
|
|
207
128
|
-q, --quiet Suppress non-essential output
|
|
208
|
-
--run <command> Execute a single command and exit
|
|
209
|
-
--dry-run Preview changes without applying
|
|
129
|
+
--run <command> Execute a single command and exit
|
|
130
|
+
--dry-run Preview changes without applying
|
|
210
131
|
-y, --yes Auto-confirm all prompts
|
|
211
|
-
--config <json> Pass command selections as
|
|
132
|
+
--config <json> Pass command selections as JSON
|
|
212
133
|
--env <name> Target a specific Railway environment
|
|
213
|
-
--no-update-check Skip
|
|
214
|
-
--debug Show LLM timing and token usage
|
|
134
|
+
--no-update-check Skip version check on startup
|
|
135
|
+
--debug Show LLM timing and token usage
|
|
215
136
|
-v, --version Print CLI version
|
|
216
137
|
-h, --help Print help
|
|
217
138
|
```
|
|
218
139
|
|
|
219
140
|
### Non-interactive mode
|
|
220
141
|
|
|
221
|
-
KITT supports scriptable execution via `--run`:
|
|
222
|
-
|
|
223
142
|
```bash
|
|
224
|
-
|
|
225
|
-
npx openkitt --run "deploy my-app" --yes --env production
|
|
143
|
+
npx openkitt --run "deploy:app my-app" --yes --env production
|
|
226
144
|
```
|
|
227
145
|
|
|
228
|
-
State-changing commands (`init`, `create`, `delete`, `deploy`, `deploy:template`, `env:create`, `env:vars`, `domain`) require `--yes` in non-interactive mode.
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## How it works
|
|
233
|
-
|
|
234
|
-
KITT uses an LLM (via your API key or GitHub Copilot) together with Railway's [MCP server](https://github.com/railwayapp/mcp-server) to perform Railway operations — creating projects, provisioning services, setting environment variables, and deploying. The LLM orchestrates MCP tool calls; KITT acts as the secure intermediary, enforcing a project-scoped guard so operations are confined to your linked Railway project.
|
|
235
|
-
|
|
236
|
-
For `hono` and `expressjs` apps, scaffolding is fully static — the LLM generates code at creation time only. For `tanstack-start` and `nextjs`, full server and client capabilities are available.
|
|
237
|
-
|
|
238
|
-
Generated code is staged to `.kitt/staging/` for review before being written to disk. A security scanner validates files for suspicious patterns, path traversal, and restricted file types before applying changes.
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
146
|
## License
|
|
243
147
|
|
|
244
148
|
MIT
|