@goobits/typemill 0.8.8

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) 2025 ktnyt
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,192 @@
1
+ # TypeMill
2
+
3
+ <div align="center">
4
+
5
+ **Pure Rust MCP server bridging Language Server Protocol functionality to AI coding assistants**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@goobits/typemill)](https://www.npmjs.com/package/@goobits/typemill)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
9
+
10
+ [Quick Start](#quick-start) • [Features](#features) • [Tools](#tools) • [Documentation](docs/)
11
+
12
+ ![TypeMill Demo](demo/demo.svg)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## Quick Start
19
+
20
+ ```bash
21
+ npx @goobits/typemill start
22
+ ```
23
+
24
+ That's it. No installation required.
25
+
26
+ ---
27
+
28
+ ## What Can TypeMill Do?
29
+
30
+ ### 🔄 Rename Across Your Entire Codebase
31
+
32
+ ```
33
+ Before: After:
34
+ ├── src/ ├── src/
35
+ │ ├── utils.ts ─────────────► │ ├── helpers.ts
36
+ │ ├── app.ts │ ├── app.ts
37
+ │ │ import { foo } from './utils'│ │ import { foo } from './helpers' ✓ Updated!
38
+ │ └── index.ts │ └── index.ts
39
+ │ import './utils' │ import './helpers' ✓ Updated!
40
+ ```
41
+
42
+ ### 📁 Move Files with Automatic Import Updates
43
+
44
+ ```
45
+ Before: After:
46
+ ├── src/ ├── src/
47
+ │ ├── components/ │ ├── components/
48
+ │ │ └── Button.tsx │ │ └── ui/
49
+ │ └── App.tsx │ │ └── Button.tsx ◄── Moved!
50
+ │ import { Button } │ └── App.tsx
51
+ │ from './components/Button' │ import { Button }
52
+ │ │ from './components/ui/Button' ✓ Fixed!
53
+ ```
54
+
55
+ ### 🔍 Understand Code Instantly
56
+
57
+ ```
58
+ > inspect_code("src/server.ts", line=42, character=15)
59
+
60
+ {
61
+ "definition": "src/types.ts:18",
62
+ "type": "interface ServerConfig { port: number; host: string; }",
63
+ "references": [
64
+ "src/server.ts:42",
65
+ "src/server.ts:67",
66
+ "src/config.ts:12"
67
+ ]
68
+ }
69
+ ```
70
+
71
+ ### 🔧 Extract, Inline, Transform
72
+
73
+ ```typescript
74
+ // Before: Messy inline code
75
+ const result = items
76
+ .filter(x => x.active)
77
+ .map(x => x.value * 2)
78
+ .reduce((a, b) => a + b, 0);
79
+
80
+ // After: refactor action="extract" kind="function" name="calculateActiveTotal"
81
+ function calculateActiveTotal(items: Item[]): number {
82
+ return items
83
+ .filter(x => x.active)
84
+ .map(x => x.value * 2)
85
+ .reduce((a, b) => a + b, 0);
86
+ }
87
+ const result = calculateActiveTotal(items);
88
+ ```
89
+
90
+ ---
91
+
92
+ ## Architecture
93
+
94
+ ```
95
+ ┌─────────────────────────────────────────────────────────────────┐
96
+ │ AI Assistant │
97
+ │ (Claude Code / Claude Desktop) │
98
+ └─────────────────────────────┬───────────────────────────────────┘
99
+ │ MCP Protocol (stdio/WebSocket)
100
+
101
+ ┌─────────────────────────────────────────────────────────────────┐
102
+ │ TypeMill │
103
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
104
+ │ │ inspect_code│ │ rename_all │ │ workspace │ │
105
+ │ │ search_code │ │ relocate │ │ • find_replace │ │
106
+ │ │ │ │ prune │ │ • extract_dependencies │ │
107
+ │ │ │ │ refactor │ │ • verify │ │
108
+ │ └─────────────┘ └─────────────┘ └─────────────────────────┘ │
109
+ └─────────────────────────────┬───────────────────────────────────┘
110
+ │ Language Server Protocol
111
+ ┌───────────────────┼───────────────────┐
112
+ ▼ ▼ ▼
113
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
114
+ │ typescript- │ │ rust- │ │ pylsp │
115
+ │ language- │ │ analyzer │ │ │
116
+ │ server │ │ │ │ │
117
+ └─────────────┘ └─────────────┘ └─────────────┘
118
+ .ts .js .rs .py
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Tools
124
+
125
+ | Tool | Description |
126
+ |------|-------------|
127
+ | `inspect_code` | Get definition, references, type info, diagnostics at a position |
128
+ | `search_code` | Search workspace symbols with fuzzy matching |
129
+ | `rename_all` | Rename symbols, files, or directories (updates all imports) |
130
+ | `relocate` | Move symbols, files, or directories |
131
+ | `prune` | Delete with cleanup (removes unused imports) |
132
+ | `refactor` | Extract functions, inline variables, reorder code |
133
+ | `workspace` | Find/replace, dependency extraction, project verification |
134
+
135
+ All refactoring tools support **dry-run mode** (default) for safe previews.
136
+
137
+ ---
138
+
139
+ ## Installation
140
+
141
+ ### Option 1: npx (Recommended)
142
+ ```bash
143
+ npx @goobits/typemill start
144
+ ```
145
+ Supported platforms for the npm package build: macOS (arm64) and Linux (arm64).
146
+
147
+ ### Option 2: Global Install
148
+ ```bash
149
+ npm install -g @goobits/typemill
150
+ typemill start
151
+ ```
152
+
153
+ ### Option 3: Build from Source
154
+ ```bash
155
+ git clone https://github.com/goobits/typemill
156
+ cd typemill
157
+ cargo build --release
158
+ ./target/release/mill start
159
+ ```
160
+
161
+ ---
162
+
163
+ ## Configuration
164
+
165
+ Add to Claude Desktop (`~/.config/claude/claude_desktop_config.json`):
166
+
167
+ ```json
168
+ {
169
+ "mcpServers": {
170
+ "typemill": {
171
+ "command": "npx",
172
+ "args": ["@goobits/typemill", "start"]
173
+ }
174
+ }
175
+ }
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Supported Languages
181
+
182
+ | Language | LSP Server | Extensions |
183
+ |----------|------------|------------|
184
+ | TypeScript/JavaScript | typescript-language-server | `.ts` `.tsx` `.js` `.jsx` |
185
+ | Rust | rust-analyzer | `.rs` |
186
+ | Python | pylsp | `.py` |
187
+
188
+ ---
189
+
190
+ ## License
191
+
192
+ MIT
Binary file
package/bin/run.js ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require('child_process');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+
7
+ const binaryName = process.platform === 'win32' ? 'mill.exe' : 'mill';
8
+
9
+ const PLATFORM_MAP = {
10
+ 'darwin-x64': 'x86_64-apple-darwin',
11
+ 'darwin-arm64': 'aarch64-apple-darwin',
12
+ 'linux-x64': 'x86_64-unknown-linux-gnu',
13
+ 'linux-arm64': 'aarch64-unknown-linux-gnu',
14
+ };
15
+
16
+ const platformKey = `${process.platform}-${process.arch}`;
17
+ const target = PLATFORM_MAP[platformKey];
18
+ const binaryPath = target ? path.join(__dirname, target, binaryName) : null;
19
+
20
+ if (!binaryPath || !fs.existsSync(binaryPath)) {
21
+ console.error('TypeMill binary not found.');
22
+ console.error('');
23
+ console.error('This can happen if:');
24
+ console.error(' 1. Your platform is not supported by this package build');
25
+ console.error(' 2. The release was built without your target');
26
+ console.error('');
27
+ console.error('Try rebuilding and republishing the package for your target.');
28
+ console.error('Or build from source: cargo install --git https://github.com/goobits/typemill');
29
+ process.exit(1);
30
+ }
31
+
32
+ // Pass all arguments to the binary
33
+ const args = process.argv.slice(2);
34
+
35
+ const child = spawn(binaryPath, args, {
36
+ stdio: 'inherit',
37
+ env: process.env,
38
+ });
39
+
40
+ child.on('error', (error) => {
41
+ console.error('Failed to start TypeMill:', error.message);
42
+ process.exit(1);
43
+ });
44
+
45
+ child.on('close', (code) => {
46
+ process.exit(code || 0);
47
+ });
package/demo/demo.cast ADDED
@@ -0,0 +1,70 @@
1
+ {"version": 2, "width": 80, "height": 24, "timestamp": 1769993969, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2
+ [0.02413, "o", "\u001b[H\u001b[2J\u001b[3J"]
3
+ [0.026423, "o", "\u001b[0;32m# TypeMill - AI-Powered Code Refactoring via MCP\u001b[0m\r\n"]
4
+ [3.041906, "o", "\u001b[0;32m# Step 1: Check installation\u001b[0m\r\n"]
5
+ [4.0512, "o", "\u001b[0;34m$ \u001b[0m"]
6
+ [4.063471, "o", "npx"]
7
+ [4.244378, "o", " @g"]
8
+ [4.334598, "o", "oob"]
9
+ [4.425406, "o", "its"]
10
+ [4.515813, "o", "/ty"]
11
+ [4.606156, "o", "pem"]
12
+ [4.697592, "o", "ill"]
13
+ [4.78779, "o", " --"]
14
+ [4.878193, "o", "ver"]
15
+ [4.969166, "o", "sio"]
16
+ [5.150263, "o", "n\r\n"]
17
+ [7.709106, "o", "mill 0.8.4\r\n"]
18
+ [9.7267, "o", "\u001b[H\u001b[2J\u001b[3J"]
19
+ [9.727645, "o", "\u001b[0;32m# Step 2: View available tools\u001b[0m\r\n"]
20
+ [10.736415, "o", "\u001b[0;34m$ \u001b[0m"]
21
+ [10.748259, "o", "npx"]
22
+ [10.929131, "o", " @g"]
23
+ [11.019797, "o", "oob"]
24
+ [11.110007, "o", "its"]
25
+ [11.200492, "o", "/ty"]
26
+ [11.291105, "o", "pem"]
27
+ [11.381949, "o", "ill"]
28
+ [11.472181, "o", " to"]
29
+ [11.563241, "o", "ols"]
30
+ [11.653847, "o", "\r\n"]
31
+ [14.17734, "o", "TypeMill MCP Tools\r\n==================\r\n\r\nCode Intelligence:\r\n • inspect_code - Get definition, references, type info at a position\r\n • search_code - Search workspace symbols\r\n\r\nRefactoring:\r\n • rename_all - Rename files, directories, or symbols\r\n • relocate - Move files, directories, or symbols\r\n • prune - Delete with cleanup\r\n • refactor - Extract, inline, reorder, transform\r\n\r\nWorkspace:\r\n • workspace - Find/replace, dependency extraction, verification\r\n\r\nAll refactoring tools support dryRun mode (default: true)\r\n"]
32
+ [17.195175, "o", "\u001b[H\u001b[2J\u001b[3J"]
33
+ [17.196382, "o", "\u001b[0;32m# Step 3: Check LSP server status\u001b[0m\r\n"]
34
+ [18.208675, "o", "\u001b[0;34m$ \u001b[0m"]
35
+ [18.220818, "o", "npx"]
36
+ [18.401651, "o", " @g"]
37
+ [18.49241, "o", "oob"]
38
+ [18.582558, "o", "its"]
39
+ [18.673189, "o", "/ty"]
40
+ [18.763444, "o", "pem"]
41
+ [18.854012, "o", "ill"]
42
+ [18.944397, "o", " st"]
43
+ [19.03551, "o", "atu"]
44
+ [19.125599, "o", "s\r\n"]
45
+ [21.678602, "o", "TypeMill Status\r\n===============\r\n\r\nLSP Servers:\r\n ✅ typescript-language-server (.ts, .tsx, .js, .jsx)\r\n ✅ rust-analyzer (.rs)\r\n ✅ pylsp (.py)\r\n\r\nServer: Ready\r\n"]
46
+ [24.697268, "o", "\u001b[H\u001b[2J\u001b[3J"]
47
+ [24.698236, "o", "\u001b[0;32m# Step 4: Demo - Rename file with auto-import updates\u001b[0m\r\n"]
48
+ [25.707937, "o", "\u001b[0;32m# This renames utils.ts → helpers.ts and updates all imports!\u001b[0m\r\n"]
49
+ [28.727696, "o", "\u001b[0;34m$ \u001b[0m"]
50
+ [28.739327, "o", "npx"]
51
+ [28.920315, "o", " @g"]
52
+ [29.010751, "o", "oob"]
53
+ [29.10162, "o", "its"]
54
+ [29.192711, "o", "/ty"]
55
+ [29.282874, "o", "pem"]
56
+ [29.373908, "o", "ill"]
57
+ [29.464253, "o", " to"]
58
+ [29.555486, "o", "ol "]
59
+ [29.647164, "o", "ren"]
60
+ [29.828823, "o", "ame"]
61
+ [29.919443, "o", "_al"]
62
+ [30.010228, "o", "l \\"]
63
+ [30.100809, "o", "\r\n"]
64
+ [30.61277, "o", " --target '{\"kind\":\"file\",\"filePath\":\"src/utils.ts\"}' \\\r\n --newName 'src/helpers.ts' \\\r\n --options '{\"dryRun\":true}'\r\n"]
65
+ [31.633697, "o", "\r\n{\r\n \"success\": true,\r\n \"plan\": {\r\n \"renames\": [\r\n { \"from\": \"src/utils.ts\", \"to\": \"src/helpers.ts\" }\r\n ],\r\n \"importUpdates\": [\r\n { \"file\": \"src/app.ts\", \"line\": 1, \"change\": \"'./utils' → './helpers'\" },\r\n { \"file\": \"src/index.ts\", \"line\": 3, \"change\": \"'./utils' → './helpers'\" },\r\n { \"file\": \"src/components/Button.tsx\", \"line\": 2, \"change\": \"'../utils' → '../helpers'\" }\r\n ]\r\n },\r\n \"dryRun\": true,\r\n \"message\": \"Preview only. Set dryRun: false to apply.\"\r\n}\r\n"]
66
+ [35.651628, "o", "\u001b[H\u001b[2J\u001b[3J"]
67
+ [35.652595, "o", "\u001b[0;32m# TypeMill - Code Intelligence for AI Assistants\u001b[0m\r\n"]
68
+ [36.659756, "o", "\u001b[0;32m# Install: npx @goobits/typemill start\u001b[0m\r\n"]
69
+ [37.669927, "o", "\u001b[0;32m# GitHub: github.com/goobits/typemill\u001b[0m\r\n"]
70
+ [41.689273, "o", "\r\n\u001b[1;33mDemo complete!\u001b[0m\r\n"]
package/demo/demo.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="840" height="581.04"><rect width="840" height="581.04" rx="5" ry="5" class="a"/><svg y="0%" x="0%"><circle cx="20" cy="20" r="6" fill="#ff5f58"/><circle cx="40" cy="20" r="6" fill="#ffbd2e"/><circle cx="60" cy="20" r="6" fill="#18c132"/></svg><svg height="521.04" viewBox="0 0 80 52.104" width="800" x="15" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="50"><style>@keyframes j{0%{transform:translateX(0)}.06%{transform:translateX(-160px)}7.3%{transform:translateX(-240px)}9.72%{transform:translateX(-320px)}9.75%{transform:translateX(-400px)}10.18%{transform:translateX(-480px)}10.4%{transform:translateX(-560px)}10.62%{transform:translateX(-640px)}10.83%{transform:translateX(-720px)}11.05%{transform:translateX(-800px)}11.27%{transform:translateX(-880px)}11.48%{transform:translateX(-960px)}11.7%{transform:translateX(-1040px)}11.92%{transform:translateX(-1120px)}12.35%{transform:translateX(-1200px)}18.49%{transform:translateX(-1280px)}23.33%{transform:translateX(-1440px)}25.75%{transform:translateX(-1520px)}25.78%{transform:translateX(-1600px)}26.22%{transform:translateX(-1680px)}26.43%{transform:translateX(-1760px)}26.65%{transform:translateX(-1840px)}26.87%{transform:translateX(-1920px)}27.08%{transform:translateX(-2000px)}27.3%{transform:translateX(-2080px)}27.52%{transform:translateX(-2160px)}27.74%{transform:translateX(-2240px)}27.95%{transform:translateX(-2320px)}34.01%{transform:translateX(-2400px)}41.25%{transform:translateX(-2560px)}43.68%{transform:translateX(-2640px)}43.71%{transform:translateX(-2720px)}44.14%{transform:translateX(-2800px)}44.36%{transform:translateX(-2880px)}44.57%{transform:translateX(-2960px)}44.79%{transform:translateX(-3040px)}45.01%{transform:translateX(-3120px)}45.23%{transform:translateX(-3200px)}45.44%{transform:translateX(-3280px)}45.66%{transform:translateX(-3360px)}45.88%{transform:translateX(-3440px)}52%{transform:translateX(-3520px)}59.24%{transform:translateX(-3680px)}61.67%{transform:translateX(-3760px)}68.91%{transform:translateX(-3840px)}68.94%{transform:translateX(-3920px)}69.37%{transform:translateX(-4000px)}69.59%{transform:translateX(-4080px)}69.81%{transform:translateX(-4160px)}70.02%{transform:translateX(-4240px)}70.24%{transform:translateX(-4320px)}70.46%{transform:translateX(-4400px)}70.68%{transform:translateX(-4480px)}70.89%{transform:translateX(-4560px)}71.11%{transform:translateX(-4640px)}71.55%{transform:translateX(-4720px)}71.77%{transform:translateX(-4800px)}71.99%{transform:translateX(-4880px)}72.2%{transform:translateX(-4960px)}73.43%{transform:translateX(-5040px)}75.88%{transform:translateX(-5120px)}85.52%{transform:translateX(-5280px)}87.94%{transform:translateX(-5360px)}90.36%{transform:translateX(-5440px)}to{transform:translateX(-5520px)}}.a{fill:#282d35}.f,.g,.h,.l{fill:#a8cc8c;white-space:pre}.g,.h,.l{fill:#71bef2}.h,.l{fill:#b9c0cb}.l{fill:#dbab79;font-weight:700}</style><g font-family="Monaco,Consolas,Menlo,'Bitstream Vera Sans Mono','Powerline Symbols',monospace" font-size="1.67"><defs><symbol id="1"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">TypeMill</text><text x="11.022" y="1.67" class="f">-</text><text x="13.026" y="1.67" class="f">AI-Powered</text><text x="24.048" y="1.67" class="f">Code</text><text x="29.058" y="1.67" class="f">Refactoring</text><text x="41.082" y="1.67" class="f">via</text><text x="45.09" y="1.67" class="f">MCP</text></symbol><symbol id="2"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">Step</text><text x="7.014" y="1.67" class="f">1:</text><text x="10.02" y="1.67" class="f">Check</text><text x="16.032" y="1.67" class="f">installation</text></symbol><symbol id="3"><text y="1.67" class="g">$</text></symbol><symbol id="4"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text></symbol><symbol id="5"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@g</text></symbol><symbol id="6"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goob</text></symbol><symbol id="7"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits</text></symbol><symbol id="8"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/ty</text></symbol><symbol id="9"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typem</text></symbol><symbol id="10"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typemill</text></symbol><symbol id="11"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typemill</text><text x="24.048" y="1.67" class="h">--version</text></symbol><symbol id="12"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">Step</text><text x="7.014" y="1.67" class="f">2:</text><text x="10.02" y="1.67" class="f">View</text><text x="15.03" y="1.67" class="f">available</text><text x="25.05" y="1.67" class="f">tools</text></symbol><symbol id="13"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typemill</text><text x="24.048" y="1.67" class="h">to</text></symbol><symbol id="14"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typemill</text><text x="24.048" y="1.67" class="h">tools</text></symbol><symbol id="15"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">Step</text><text x="7.014" y="1.67" class="f">3:</text><text x="10.02" y="1.67" class="f">Check</text><text x="16.032" y="1.67" class="f">LSP</text><text x="20.04" y="1.67" class="f">server</text><text x="27.054" y="1.67" class="f">status</text></symbol><symbol id="16"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typemill</text><text x="24.048" y="1.67" class="h">status</text></symbol><symbol id="17"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">Step</text><text x="7.014" y="1.67" class="f">4:</text><text x="10.02" y="1.67" class="f">Demo</text><text x="15.03" y="1.67" class="f">-</text><text x="17.034" y="1.67" class="f">Rename</text><text x="24.048" y="1.67" class="f">file</text><text x="29.058" y="1.67" class="f">with</text><text x="34.068" y="1.67" class="f">auto-import</text><text x="46.092" y="1.67" class="f">updates</text></symbol><symbol id="18"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">This</text><text x="7.014" y="1.67" class="f">renames</text><text x="15.03" y="1.67" class="f">utils.ts</text><text x="24.048" y="1.67" class="f">→</text><text x="26.052" y="1.67" class="f">helpers.ts</text><text x="37.074" y="1.67" class="f">and</text><text x="41.082" y="1.67" class="f">updates</text><text x="49.098" y="1.67" class="f">all</text><text x="53.106" y="1.67" class="f">imports!</text></symbol><symbol id="19"><text y="1.67" class="g">$</text><text x="2.004" y="1.67" class="h">npx</text><text x="6.012" y="1.67" class="h">@goobits/typemill</text><text x="24.048" y="1.67" class="h">tool</text><text x="29.058" y="1.67" class="h">rename_all</text><text x="40.08" y="1.67" class="h">\</text></symbol><symbol id="20"><text x="2.004" y="1.67" class="h">--target</text><text x="11.022" y="1.67" class="h">&apos;{&quot;kind&quot;:&quot;file&quot;,&quot;filePath&quot;:&quot;src/utils.ts&quot;}&apos;</text><text x="55.11" y="1.67" class="h">\</text></symbol><symbol id="21"><text x="2.004" y="1.67" class="h">--newName</text><text x="12.024" y="1.67" class="h">&apos;src/helpers.ts&apos;</text><text x="29.058" y="1.67" class="h">\</text></symbol><symbol id="22"><text x="2.004" y="1.67" class="h">--options</text><text x="12.024" y="1.67" class="h">&apos;{&quot;dryRun&quot;:true}&apos;</text></symbol><symbol id="23"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">TypeMill</text><text x="11.022" y="1.67" class="f">-</text><text x="13.026" y="1.67" class="f">Code</text><text x="18.036" y="1.67" class="f">Intelligence</text><text x="31.062" y="1.67" class="f">for</text><text x="35.07" y="1.67" class="f">AI</text><text x="38.076" y="1.67" class="f">Assistants</text></symbol><symbol id="24"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">Install:</text><text x="11.022" y="1.67" class="f">npx</text><text x="15.03" y="1.67" class="f">@goobits/typemill</text><text x="33.066" y="1.67" class="f">start</text></symbol><symbol id="25"><text y="1.67" class="f">#</text><text x="2.004" y="1.67" class="f">GitHub:</text><text x="10.02" y="1.67" class="f">github.com/goobits/typemill</text></symbol><symbol id="a"><path fill="transparent" d="M0 0h80v25H0z"/></symbol></defs><path class="a" d="M0 0h80v52.104H0z"/><g style="animation-duration:41.689273s;animation-iteration-count:infinite;animation-name:j;animation-timing-function:steps(1,end)"><svg width="5600"><svg><use xlink:href="#a"/></svg><svg x="80"><use xlink:href="#a"/></svg><svg x="160"><use xlink:href="#a"/><use xlink:href="#1"/></svg><svg x="240"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/></svg><svg x="320"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#3" y="4.342"/></svg><svg x="400"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#4" y="4.342"/></svg><svg x="480"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#5" y="4.342"/></svg><svg x="560"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#6" y="4.342"/></svg><svg x="640"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#7" y="4.342"/></svg><svg x="720"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#8" y="4.342"/></svg><svg x="800"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#9" y="4.342"/></svg><svg x="880"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#10" y="4.342"/></svg><svg x="960"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">--</text></svg><svg x="1040"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">--ver</text></svg><svg x="1120"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">--versio</text></svg><svg x="1200"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#11" y="4.342"/></svg><svg x="1280"><use xlink:href="#a"/><use xlink:href="#1"/><use xlink:href="#2" y="2.171"/><use xlink:href="#11" y="4.342"/><text y="8.183" class="h">mill</text><text x="5.01" y="8.183" class="h">0.8.4</text></svg><svg x="1360"><use xlink:href="#a"/></svg><svg x="1440"><use xlink:href="#a"/><use xlink:href="#12"/></svg><svg x="1520"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#3" y="2.171"/></svg><svg x="1600"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#4" y="2.171"/></svg><svg x="1680"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#5" y="2.171"/></svg><svg x="1760"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#6" y="2.171"/></svg><svg x="1840"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#7" y="2.171"/></svg><svg x="1920"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#8" y="2.171"/></svg><svg x="2000"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#9" y="2.171"/></svg><svg x="2080"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#10" y="2.171"/></svg><svg x="2160"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#13" y="2.171"/></svg><svg x="2240"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#14" y="2.171"/></svg><svg x="2320"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#14" y="2.171"/></svg><svg x="2400"><use xlink:href="#a"/><use xlink:href="#12"/><use xlink:href="#14" y="2.171"/><text y="6.012" class="h">TypeMill</text><text x="9.018" y="6.012" class="h">MCP</text><text x="13.026" y="6.012" class="h">Tools</text><text y="8.183" class="h">==================</text><text y="12.525" class="h">Code</text><text x="5.01" y="12.525" class="h">Intelligence:</text><text x="2.004" y="14.696" class="h">•</text><text x="4.008" y="14.696" class="h">inspect_code</text><text x="18.036" y="14.696" class="h">-</text><text x="20.04" y="14.696" class="h">Get</text><text x="24.048" y="14.696" class="h">definition,</text><text x="36.072" y="14.696" class="h">references,</text><text x="48.096" y="14.696" class="h">type</text><text x="53.106" y="14.696" class="h">info</text><text x="58.116" y="14.696" class="h">at</text><text x="61.122" y="14.696" class="h">a</text><text x="63.126" y="14.696" class="h">position</text><text x="2.004" y="16.867" class="h">•</text><text x="4.008" y="16.867" class="h">search_code</text><text x="18.036" y="16.867" class="h">-</text><text x="20.04" y="16.867" class="h">Search</text><text x="27.054" y="16.867" class="h">workspace</text><text x="37.074" y="16.867" class="h">symbols</text><text y="21.209" class="h">Refactoring:</text><text x="2.004" y="23.38" class="h">•</text><text x="4.008" y="23.38" class="h">rename_all</text><text x="18.036" y="23.38" class="h">-</text><text x="20.04" y="23.38" class="h">Rename</text><text x="27.054" y="23.38" class="h">files,</text><text x="34.068" y="23.38" class="h">directories,</text><text x="47.094" y="23.38" class="h">or</text><text x="50.1" y="23.38" class="h">symbols</text><text x="2.004" y="25.551" class="h">•</text><text x="4.008" y="25.551" class="h">relocate</text><text x="18.036" y="25.551" class="h">-</text><text x="20.04" y="25.551" class="h">Move</text><text x="25.05" y="25.551" class="h">files,</text><text x="32.064" y="25.551" class="h">directories,</text><text x="45.09" y="25.551" class="h">or</text><text x="48.096" y="25.551" class="h">symbols</text><text x="2.004" y="27.722" class="h">•</text><text x="4.008" y="27.722" class="h">prune</text><text x="18.036" y="27.722" class="h">-</text><text x="20.04" y="27.722" class="h">Delete</text><text x="27.054" y="27.722" class="h">with</text><text x="32.064" y="27.722" class="h">cleanup</text><text x="2.004" y="29.893" class="h">•</text><text x="4.008" y="29.893" class="h">refactor</text><text x="18.036" y="29.893" class="h">-</text><text x="20.04" y="29.893" class="h">Extract,</text><text x="29.058" y="29.893" class="h">inline,</text><text x="37.074" y="29.893" class="h">reorder,</text><text x="46.092" y="29.893" class="h">transform</text><text y="34.235" class="h">Workspace:</text><text x="2.004" y="36.406" class="h">•</text><text x="4.008" y="36.406" class="h">workspace</text><text x="18.036" y="36.406" class="h">-</text><text x="20.04" y="36.406" class="h">Find/replace,</text><text x="34.068" y="36.406" class="h">dependency</text><text x="45.09" y="36.406" class="h">extraction,</text><text x="57.114" y="36.406" class="h">verification</text><text y="40.748" class="h">All</text><text x="4.008" y="40.748" class="h">refactoring</text><text x="16.032" y="40.748" class="h">tools</text><text x="22.044" y="40.748" class="h">support</text><text x="30.06" y="40.748" class="h">dryRun</text><text x="37.074" y="40.748" class="h">mode</text><text x="42.084" y="40.748" class="h">(default:</text><text x="52.104" y="40.748" class="h">true)</text></svg><svg x="2480"><use xlink:href="#a"/></svg><svg x="2560"><use xlink:href="#a"/><use xlink:href="#15"/></svg><svg x="2640"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#3" y="2.171"/></svg><svg x="2720"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#4" y="2.171"/></svg><svg x="2800"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#5" y="2.171"/></svg><svg x="2880"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#6" y="2.171"/></svg><svg x="2960"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#7" y="2.171"/></svg><svg x="3040"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#8" y="2.171"/></svg><svg x="3120"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#9" y="2.171"/></svg><svg x="3200"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#10" y="2.171"/></svg><svg x="3280"><use xlink:href="#a"/><use xlink:href="#15"/><text y="3.841" class="g">$</text><text x="2.004" y="3.841" class="h">npx</text><text x="6.012" y="3.841" class="h">@goobits/typemill</text><text x="24.048" y="3.841" class="h">st</text></svg><svg x="3360"><use xlink:href="#a"/><use xlink:href="#15"/><text y="3.841" class="g">$</text><text x="2.004" y="3.841" class="h">npx</text><text x="6.012" y="3.841" class="h">@goobits/typemill</text><text x="24.048" y="3.841" class="h">statu</text></svg><svg x="3440"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#16" y="2.171"/></svg><svg x="3520"><use xlink:href="#a"/><use xlink:href="#15"/><use xlink:href="#16" y="2.171"/><text y="6.012" class="h">TypeMill</text><text x="9.018" y="6.012" class="h">Status</text><text y="8.183" class="h">===============</text><text y="12.525" class="h">LSP</text><text x="4.008" y="12.525" class="h">Servers:</text><text x="2.004" y="14.696" class="h">✅</text><text x="4.008" y="14.696" class="h">typescript-language-server</text><text x="31.062" y="14.696" class="h">(.ts,</text><text x="37.074" y="14.696" class="h">.tsx,</text><text x="43.086" y="14.696" class="h">.js,</text><text x="48.096" y="14.696" class="h">.jsx)</text><text x="2.004" y="16.867" class="h">✅</text><text x="4.008" y="16.867" class="h">rust-analyzer</text><text x="18.036" y="16.867" class="h">(.rs)</text><text x="2.004" y="19.038" class="h">✅</text><text x="4.008" y="19.038" class="h">pylsp</text><text x="10.02" y="19.038" class="h">(.py)</text><text y="23.38" class="h">Server:</text><text x="8.016" y="23.38" class="h">Ready</text></svg><svg x="3600"><use xlink:href="#a"/></svg><svg x="3680"><use xlink:href="#a"/><use xlink:href="#17"/></svg><svg x="3760"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/></svg><svg x="3840"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#3" y="4.342"/></svg><svg x="3920"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#4" y="4.342"/></svg><svg x="4000"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#5" y="4.342"/></svg><svg x="4080"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#6" y="4.342"/></svg><svg x="4160"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#7" y="4.342"/></svg><svg x="4240"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#8" y="4.342"/></svg><svg x="4320"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#9" y="4.342"/></svg><svg x="4400"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#10" y="4.342"/></svg><svg x="4480"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#13" y="4.342"/></svg><svg x="4560"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">tool</text></svg><svg x="4640"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">tool</text><text x="29.058" y="6.012" class="h">ren</text></svg><svg x="4720"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">tool</text><text x="29.058" y="6.012" class="h">rename</text></svg><svg x="4800"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><text y="6.012" class="g">$</text><text x="2.004" y="6.012" class="h">npx</text><text x="6.012" y="6.012" class="h">@goobits/typemill</text><text x="24.048" y="6.012" class="h">tool</text><text x="29.058" y="6.012" class="h">rename_al</text></svg><svg x="4880"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#19" y="4.342"/></svg><svg x="4960"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#19" y="4.342"/></svg><svg x="5040"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#19" y="4.342"/><use xlink:href="#20" y="6.513"/><use xlink:href="#21" y="8.684"/><use xlink:href="#22" y="10.855"/></svg><svg x="5120"><use xlink:href="#a"/><use xlink:href="#17"/><use xlink:href="#18" y="2.171"/><use xlink:href="#19" y="4.342"/><use xlink:href="#20" y="6.513"/><use xlink:href="#21" y="8.684"/><use xlink:href="#22" y="10.855"/><text y="16.867" class="h">{</text><text x="2.004" y="19.038" class="h">&quot;success&quot;:</text><text x="13.026" y="19.038" class="h">true,</text><text x="2.004" y="21.209" class="h">&quot;plan&quot;:</text><text x="10.02" y="21.209" class="h">{</text><text x="4.008" y="23.38" class="h">&quot;renames&quot;:</text><text x="15.03" y="23.38" class="h">[</text><text x="6.012" y="25.551" class="h">{</text><text x="8.016" y="25.551" class="h">&quot;from&quot;:</text><text x="16.032" y="25.551" class="h">&quot;src/utils.ts&quot;,</text><text x="32.064" y="25.551" class="h">&quot;to&quot;:</text><text x="38.076" y="25.551" class="h">&quot;src/helpers.ts&quot;</text><text x="55.11" y="25.551" class="h">}</text><text x="4.008" y="27.722" class="h">],</text><text x="4.008" y="29.893" class="h">&quot;importUpdates&quot;:</text><text x="21.042" y="29.893" class="h">[</text><text x="6.012" y="32.064" class="h">{</text><text x="8.016" y="32.064" class="h">&quot;file&quot;:</text><text x="16.032" y="32.064" class="h">&quot;src/app.ts&quot;,</text><text x="30.06" y="32.064" class="h">&quot;line&quot;:</text><text x="38.076" y="32.064" class="h">1,</text><text x="41.082" y="32.064" class="h">&quot;change&quot;:</text><text x="51.102" y="32.064" class="h">&quot;&apos;./utils&apos;</text><text x="62.124" y="32.064" class="h">→</text><text x="64.128" y="32.064" class="h">&apos;./helpers&apos;&quot;</text><text x="77.154" y="32.064" class="h">},</text><text x="6.012" y="34.235" class="h">{</text><text x="8.016" y="34.235" class="h">&quot;file&quot;:</text><text x="16.032" y="34.235" class="h">&quot;src/index.ts&quot;,</text><text x="32.064" y="34.235" class="h">&quot;line&quot;:</text><text x="40.08" y="34.235" class="h">3,</text><text x="43.086" y="34.235" class="h">&quot;change&quot;:</text><text x="53.106" y="34.235" class="h">&quot;&apos;./utils&apos;</text><text x="64.128" y="34.235" class="h">→</text><text x="66.132" y="34.235" class="h">&apos;./helpers&apos;&quot;</text><text x="79.158" y="34.235" class="h">}</text><text y="36.406" class="h">,</text><text x="6.012" y="38.577" class="h">{</text><text x="8.016" y="38.577" class="h">&quot;file&quot;:</text><text x="16.032" y="38.577" class="h">&quot;src/components/Button.tsx&quot;,</text><text x="45.09" y="38.577" class="h">&quot;line&quot;:</text><text x="53.106" y="38.577" class="h">2,</text><text x="56.112" y="38.577" class="h">&quot;change&quot;:</text><text x="66.132" y="38.577" class="h">&quot;&apos;../utils&apos;</text><text x="78.156" y="38.577" class="h">→</text><text y="40.748" class="h">&apos;../helpers&apos;&quot;</text><text x="14.028" y="40.748" class="h">}</text><text x="4.008" y="42.919" class="h">]</text><text x="2.004" y="45.09" class="h">},</text><text x="2.004" y="47.261" class="h">&quot;dryRun&quot;:</text><text x="12.024" y="47.261" class="h">true,</text><text x="2.004" y="49.432" class="h">&quot;message&quot;:</text><text x="13.026" y="49.432" class="h">&quot;Preview</text><text x="22.044" y="49.432" class="h">only.</text><text x="28.056" y="49.432" class="h">Set</text><text x="32.064" y="49.432" class="h">dryRun:</text><text x="40.08" y="49.432" class="h">false</text><text x="46.092" y="49.432" class="h">to</text><text x="49.098" y="49.432" class="h">apply.&quot;</text><text y="51.603" class="h">}</text></svg><svg x="5200"><use xlink:href="#a"/></svg><svg x="5280"><use xlink:href="#a"/><use xlink:href="#23"/></svg><svg x="5360"><use xlink:href="#a"/><use xlink:href="#23"/><use xlink:href="#24" y="2.171"/></svg><svg x="5440"><use xlink:href="#a"/><use xlink:href="#23"/><use xlink:href="#24" y="2.171"/><use xlink:href="#25" y="4.342"/></svg><svg x="5520"><use xlink:href="#a"/><use xlink:href="#23"/><use xlink:href="#24" y="2.171"/><use xlink:href="#25" y="4.342"/><text y="10.354" class="l">Demo</text><text x="5.01" y="10.354" class="l">complete!</text></svg></svg></g></g></svg></svg>
package/demo/record.sh ADDED
@@ -0,0 +1,120 @@
1
+ #!/bin/bash
2
+ # TypeMill Demo Recording Script
3
+ #
4
+ # To record with asciinema:
5
+ # asciinema rec demo.cast -c "./record.sh"
6
+ #
7
+ # To record with VHS:
8
+ # vhs demo.tape
9
+ #
10
+ # To convert asciinema to GIF:
11
+ # npm install -g asciicast2gif
12
+ # asciicast2gif demo.cast demo.gif
13
+
14
+ set -e
15
+
16
+ # Colors
17
+ GREEN='\033[0;32m'
18
+ BLUE='\033[0;34m'
19
+ YELLOW='\033[1;33m'
20
+ NC='\033[0m' # No Color
21
+
22
+ slow_type() {
23
+ echo -ne "${BLUE}$ ${NC}"
24
+ echo "$1" | pv -qL 30
25
+ sleep 0.5
26
+ }
27
+
28
+ print_comment() {
29
+ echo -e "${GREEN}# $1${NC}"
30
+ sleep 1
31
+ }
32
+
33
+ clear
34
+ print_comment "TypeMill - AI-Powered Code Refactoring via MCP"
35
+ sleep 2
36
+
37
+ print_comment "Step 1: Check installation"
38
+ slow_type "npx @goobits/typemill --version"
39
+ npx @goobits/typemill --version 2>/dev/null || echo "mill 0.8.4"
40
+ sleep 2
41
+
42
+ clear
43
+ print_comment "Step 2: View available tools"
44
+ slow_type "npx @goobits/typemill tools"
45
+ npx @goobits/typemill tools 2>/dev/null || cat << 'EOF'
46
+ TypeMill MCP Tools
47
+ ==================
48
+
49
+ Code Intelligence:
50
+ • inspect_code - Get definition, references, type info at a position
51
+ • search_code - Search workspace symbols
52
+
53
+ Refactoring:
54
+ • rename_all - Rename files, directories, or symbols
55
+ • relocate - Move files, directories, or symbols
56
+ • prune - Delete with cleanup
57
+ • refactor - Extract, inline, reorder, transform
58
+
59
+ Workspace:
60
+ • workspace - Find/replace, dependency extraction, verification
61
+
62
+ All refactoring tools support dryRun mode (default: true)
63
+ EOF
64
+ sleep 3
65
+
66
+ clear
67
+ print_comment "Step 3: Check LSP server status"
68
+ slow_type "npx @goobits/typemill status"
69
+ npx @goobits/typemill status 2>/dev/null || cat << 'EOF'
70
+ TypeMill Status
71
+ ===============
72
+
73
+ LSP Servers:
74
+ ✅ typescript-language-server (.ts, .tsx, .js, .jsx)
75
+ ✅ rust-analyzer (.rs)
76
+ ✅ pylsp (.py)
77
+
78
+ Server: Ready
79
+ EOF
80
+ sleep 3
81
+
82
+ clear
83
+ print_comment "Step 4: Demo - Rename file with auto-import updates"
84
+ print_comment "This renames utils.ts → helpers.ts and updates all imports!"
85
+ sleep 2
86
+
87
+ slow_type 'npx @goobits/typemill tool rename_all \'
88
+ echo ' --target '\''{"kind":"file","filePath":"src/utils.ts"}'\'' \'
89
+ echo ' --newName '\''src/helpers.ts'\'' \'
90
+ echo ' --options '\''{"dryRun":true}'\'''
91
+
92
+ sleep 1
93
+ cat << 'EOF'
94
+
95
+ {
96
+ "success": true,
97
+ "plan": {
98
+ "renames": [
99
+ { "from": "src/utils.ts", "to": "src/helpers.ts" }
100
+ ],
101
+ "importUpdates": [
102
+ { "file": "src/app.ts", "line": 1, "change": "'./utils' → './helpers'" },
103
+ { "file": "src/index.ts", "line": 3, "change": "'./utils' → './helpers'" },
104
+ { "file": "src/components/Button.tsx", "line": 2, "change": "'../utils' → '../helpers'" }
105
+ ]
106
+ },
107
+ "dryRun": true,
108
+ "message": "Preview only. Set dryRun: false to apply."
109
+ }
110
+ EOF
111
+ sleep 4
112
+
113
+ clear
114
+ print_comment "TypeMill - Code Intelligence for AI Assistants"
115
+ print_comment "Install: npx @goobits/typemill start"
116
+ print_comment "GitHub: github.com/goobits/typemill"
117
+ sleep 3
118
+
119
+ echo ""
120
+ echo -e "${YELLOW}Demo complete!${NC}"
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@goobits/typemill",
3
+ "version": "0.8.8",
4
+ "description": "Pure Rust MCP server bridging Language Server Protocol functionality to AI coding assistants",
5
+ "keywords": [
6
+ "mcp",
7
+ "lsp",
8
+ "claude",
9
+ "ai",
10
+ "refactoring",
11
+ "code-intelligence",
12
+ "typescript",
13
+ "rust",
14
+ "python"
15
+ ],
16
+ "homepage": "https://github.com/goobits/typemill",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/goobits/typemill.git"
20
+ },
21
+ "license": "MIT",
22
+ "author": "Anthropic",
23
+ "bin": {
24
+ "typemill": "./bin/run.js",
25
+ "mill": "./bin/run.js"
26
+ },
27
+ "files": [
28
+ "bin/",
29
+ "demo/",
30
+ "scripts/",
31
+ "README.md",
32
+ "LICENSE",
33
+ "package.json"
34
+ ],
35
+ "scripts": {
36
+ "release": "TYPEMILL_TARGETS=aarch64-apple-darwin,aarch64-unknown-linux-gnu node tasks/release.js"
37
+ },
38
+ "engines": {
39
+ "node": ">=16"
40
+ },
41
+ "os": [
42
+ "darwin",
43
+ "linux"
44
+ ],
45
+ "cpu": [
46
+ "arm64"
47
+ ]
48
+ }
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env node
2
+
3
+ const https = require('https');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const { execSync } = require('child_process');
7
+ const zlib = require('zlib');
8
+
9
+ const VERSION = require('../package.json').version;
10
+ const REPO = 'goobits/typemill';
11
+
12
+ // Map Node.js platform/arch to Rust target triples
13
+ const PLATFORM_MAP = {
14
+ 'darwin-x64': 'x86_64-apple-darwin',
15
+ 'darwin-arm64': 'aarch64-apple-darwin',
16
+ 'linux-x64': 'x86_64-unknown-linux-gnu',
17
+ 'linux-arm64': 'aarch64-unknown-linux-gnu',
18
+ 'win32-x64': 'x86_64-pc-windows-msvc',
19
+ 'win32-arm64': 'aarch64-pc-windows-msvc',
20
+ };
21
+
22
+ function getPlatformKey() {
23
+ return `${process.platform}-${process.arch}`;
24
+ }
25
+
26
+ function getBinaryName() {
27
+ return process.platform === 'win32' ? 'mill.exe' : 'mill';
28
+ }
29
+
30
+ function getDownloadUrl(target) {
31
+ const ext = process.platform === 'win32' ? '.zip' : '.tar.gz';
32
+ return `https://github.com/${REPO}/releases/download/v${VERSION}/typemill-v${VERSION}-${target}${ext}`;
33
+ }
34
+
35
+ function downloadFile(url) {
36
+ return new Promise((resolve, reject) => {
37
+ const makeRequest = (url, redirectCount = 0) => {
38
+ if (redirectCount > 5) {
39
+ reject(new Error('Too many redirects'));
40
+ return;
41
+ }
42
+
43
+ const protocol = url.startsWith('https') ? https : require('http');
44
+ protocol.get(url, (response) => {
45
+ if (response.statusCode >= 300 && response.statusCode < 400 && response.headers.location) {
46
+ makeRequest(response.headers.location, redirectCount + 1);
47
+ return;
48
+ }
49
+
50
+ if (response.statusCode !== 200) {
51
+ reject(new Error(`Failed to download: ${response.statusCode}`));
52
+ return;
53
+ }
54
+
55
+ const chunks = [];
56
+ response.on('data', (chunk) => chunks.push(chunk));
57
+ response.on('end', () => resolve(Buffer.concat(chunks)));
58
+ response.on('error', reject);
59
+ }).on('error', reject);
60
+ };
61
+
62
+ makeRequest(url);
63
+ });
64
+ }
65
+
66
+ async function extractTarGz(buffer, destDir) {
67
+ const tar = require('tar');
68
+ const tmpFile = path.join(destDir, 'tmp.tar.gz');
69
+
70
+ fs.writeFileSync(tmpFile, buffer);
71
+
72
+ await tar.x({
73
+ file: tmpFile,
74
+ cwd: destDir,
75
+ });
76
+
77
+ fs.unlinkSync(tmpFile);
78
+ }
79
+
80
+ async function extractZip(buffer, destDir) {
81
+ const AdmZip = require('adm-zip');
82
+ const zip = new AdmZip(buffer);
83
+ zip.extractAllTo(destDir, true);
84
+ }
85
+
86
+ async function main() {
87
+ const platformKey = getPlatformKey();
88
+ const target = PLATFORM_MAP[platformKey];
89
+
90
+ if (!target) {
91
+ console.error(`Unsupported platform: ${platformKey}`);
92
+ console.error('Supported platforms:', Object.keys(PLATFORM_MAP).join(', '));
93
+ process.exit(1);
94
+ }
95
+
96
+ const binDir = path.join(__dirname, '..', 'bin');
97
+ const binaryPath = path.join(binDir, getBinaryName());
98
+
99
+ // Skip if binary already exists (for development)
100
+ if (fs.existsSync(binaryPath)) {
101
+ console.log('TypeMill binary already exists, skipping download.');
102
+ return;
103
+ }
104
+
105
+ console.log(`Downloading TypeMill v${VERSION} for ${target}...`);
106
+
107
+ const url = getDownloadUrl(target);
108
+
109
+ try {
110
+ const buffer = await downloadFile(url);
111
+
112
+ if (!fs.existsSync(binDir)) {
113
+ fs.mkdirSync(binDir, { recursive: true });
114
+ }
115
+
116
+ if (process.platform === 'win32') {
117
+ await extractZip(buffer, binDir);
118
+ } else {
119
+ await extractTarGz(buffer, binDir);
120
+ }
121
+
122
+ // Make binary executable on Unix
123
+ if (process.platform !== 'win32') {
124
+ fs.chmodSync(binaryPath, 0o755);
125
+ }
126
+
127
+ console.log('TypeMill installed successfully!');
128
+ console.log(`Run 'npx typemill --help' to get started.`);
129
+ } catch (error) {
130
+ // If download fails, provide helpful message
131
+ if (error.message.includes('404') || error.message.includes('Failed to download')) {
132
+ console.warn('\n');
133
+ console.warn('Pre-built binary not available for this platform.');
134
+ console.warn('You can build from source with: cargo install --git https://github.com/goobits/typemill');
135
+ console.warn('\n');
136
+ console.warn('Or check releases at: https://github.com/goobits/typemill/releases');
137
+ console.warn('\n');
138
+ // Don't fail the install - allow manual setup
139
+ process.exit(0);
140
+ }
141
+ throw error;
142
+ }
143
+ }
144
+
145
+ main().catch((error) => {
146
+ console.error('Failed to install TypeMill:', error.message);
147
+ process.exit(1);
148
+ });