@xortex/xcode 3.0.5 → 3.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/INSTALLATION.md +285 -0
- package/QUICKSTART.md +151 -0
- package/SYSTEM_PROMPT.md +583 -0
- package/SYSTEM_PROMPT_EXTRACTED.md +1 -0
- package/Untitled +1 -0
- package/bin/xcode +69 -120
- package/bootstrap/state.ts +1758 -0
- package/bun-bundle-hook.js +38 -17
- package/bun-bundle-shim.ts +12 -0
- package/bun.lock +645 -0
- package/context/QueuedMessageContext.tsx +63 -0
- package/context/fpsMetrics.tsx +30 -0
- package/context/mailbox.tsx +38 -0
- package/context/modalContext.tsx +58 -0
- package/context/notifications.tsx +240 -0
- package/context/overlayContext.tsx +151 -0
- package/context/promptOverlayContext.tsx +125 -0
- package/context/stats.tsx +220 -0
- package/context/voice.tsx +88 -0
- package/coordinator/coordinatorMode.ts +369 -0
- package/costHook.ts +22 -0
- package/dialogLaunchers.tsx +133 -0
- package/entrypoints/cli.tsx +1 -1
- package/extract_prompt.ts +304 -0
- package/ink.ts +85 -0
- package/install.sh +221 -0
- package/interactiveHelpers.tsx +366 -0
- package/macro.ts +1 -1
- package/memdir/findRelevantMemories.ts +141 -0
- package/memdir/memdir.ts +511 -0
- package/memdir/memoryAge.ts +53 -0
- package/memdir/memoryScan.ts +94 -0
- package/memdir/memoryTypes.ts +271 -0
- package/memdir/paths.ts +291 -0
- package/memdir/teamMemPaths.ts +292 -0
- package/memdir/teamMemPrompts.ts +100 -0
- package/moreright/useMoreRight.tsx +26 -0
- package/native-ts/color-diff/index.ts +999 -0
- package/native-ts/file-index/index.ts +370 -0
- package/native-ts/yoga-layout/enums.ts +134 -0
- package/native-ts/yoga-layout/index.ts +2578 -0
- package/outputStyles/loadOutputStylesDir.ts +98 -0
- package/package.json +5 -42
- package/plugins/builtinPlugins.ts +159 -0
- package/plugins/bundled/index.ts +23 -0
- package/projectOnboardingState.ts +83 -0
- package/public/claude-files.png +0 -0
- package/public/leak-tweet.png +0 -0
- package/query/config.ts +46 -0
- package/query/deps.ts +40 -0
- package/query/stopHooks.ts +470 -0
- package/query/tokenBudget.ts +93 -0
- package/replLauncher.tsx +27 -0
- package/schemas/hooks.ts +222 -0
- package/screens/Doctor.tsx +575 -0
- package/screens/REPL.tsx +7107 -0
- package/screens/ResumeConversation.tsx +399 -0
- package/scripts/postinstall.js +90 -0
- package/server/createDirectConnectSession.ts +88 -0
- package/server/directConnectManager.ts +213 -0
- package/server/types.ts +57 -0
- package/setup.ts +477 -0
- package/stub_types.sh +13 -0
- package/tasks.ts +39 -0
- package/tools.ts +396 -0
- package/tsconfig.json +16 -0
- package/upstreamproxy/relay.ts +455 -0
- package/upstreamproxy/upstreamproxy.ts +285 -0
- package/vim/motions.ts +82 -0
- package/vim/operators.ts +556 -0
- package/vim/textObjects.ts +186 -0
- package/vim/transitions.ts +490 -0
- package/vim/types.ts +199 -0
- package/voice/voiceModeEnabled.ts +54 -0
- package/utils/bunBundleCompat.ts +0 -44
package/INSTALLATION.md
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# Installation Guide
|
|
2
|
+
|
|
3
|
+
Complete installation instructions for XCode.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
You need **either** Bun or Node.js installed:
|
|
8
|
+
|
|
9
|
+
### Option A: Bun (Recommended - Faster)
|
|
10
|
+
```bash
|
|
11
|
+
curl -fsSL https://bun.sh/install | bash
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Option B: Node.js
|
|
15
|
+
```bash
|
|
16
|
+
# macOS
|
|
17
|
+
brew install node
|
|
18
|
+
|
|
19
|
+
# Ubuntu/Debian
|
|
20
|
+
sudo apt-get install nodejs npm
|
|
21
|
+
|
|
22
|
+
# Or download from https://nodejs.org/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Installation Methods
|
|
28
|
+
|
|
29
|
+
### Method 1: One-Line Curl Install (macOS/Linux) ⭐ Recommended
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
curl -fsSL https://raw.githubusercontent.com/XortexAI/XCode/main/install.sh | bash
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
What this does:
|
|
36
|
+
1. Clones XCode to `~/.xcode`
|
|
37
|
+
2. Installs dependencies with Bun/npm
|
|
38
|
+
3. Creates `~/.local/bin/xcode` launcher
|
|
39
|
+
4. Adds to PATH if needed
|
|
40
|
+
|
|
41
|
+
### Method 2: npm Global Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g @xortex/xcode
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This installs XCode globally and adds `xcode` to your PATH automatically.
|
|
48
|
+
|
|
49
|
+
### Method 3: Manual Clone
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# 1. Clone repository
|
|
53
|
+
git clone https://github.com/XortexAI/XCode.git ~/.xcode
|
|
54
|
+
|
|
55
|
+
# 2. Install dependencies
|
|
56
|
+
cd ~/.xcode
|
|
57
|
+
bun install
|
|
58
|
+
|
|
59
|
+
# 3. Create symlink
|
|
60
|
+
mkdir -p ~/.local/bin
|
|
61
|
+
ln -s ~/.xcode/bin/xcode ~/.local/bin/xcode
|
|
62
|
+
|
|
63
|
+
# 4. Add to PATH (if not already)
|
|
64
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
65
|
+
source ~/.bashrc
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Method 4: Docker (Coming Soon)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
docker run -it xortex/xcode
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Post-Installation
|
|
77
|
+
|
|
78
|
+
### 1. Verify Installation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
xcode --version
|
|
82
|
+
# Output: xcode v3.0.2 — AI coding assistant with XMem memory
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Or run the test suite:
|
|
86
|
+
```bash
|
|
87
|
+
xcode-test
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 2. Configure API Keys
|
|
91
|
+
|
|
92
|
+
Add to your `~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish`:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Required: At least one of these
|
|
96
|
+
export OPENROUTER_API_KEY=sk-or-v1-... # For multi-model access
|
|
97
|
+
export ANTHROPIC_API_KEY=sk-ant-... # For Claude models
|
|
98
|
+
export GEMINI_API_KEY=... # For Google Gemini
|
|
99
|
+
|
|
100
|
+
# Optional: XMem memory server
|
|
101
|
+
export XMEM_API_URL=http://localhost:8000
|
|
102
|
+
export XMEM_API_KEY=...
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Reload your shell:
|
|
106
|
+
```bash
|
|
107
|
+
source ~/.bashrc # or ~/.zshrc
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 3. First Run
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Interactive session with default model
|
|
114
|
+
xcode
|
|
115
|
+
|
|
116
|
+
# Or use a specific model
|
|
117
|
+
xcode --model gemini-2.5-pro
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Platform-Specific Notes
|
|
123
|
+
|
|
124
|
+
### macOS
|
|
125
|
+
|
|
126
|
+
- Requires macOS 12 (Monterey) or later
|
|
127
|
+
- Works with both Intel and Apple Silicon
|
|
128
|
+
- If you get "unidentified developer" warnings, go to System Preferences > Security & Privacy
|
|
129
|
+
|
|
130
|
+
### Linux
|
|
131
|
+
|
|
132
|
+
- Tested on Ubuntu 20.04+, Debian 11+, Fedora 35+
|
|
133
|
+
- Requires `git` and `curl` (usually pre-installed)
|
|
134
|
+
- May need to install `build-essential` for native modules:
|
|
135
|
+
```bash
|
|
136
|
+
sudo apt-get install build-essential
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Windows
|
|
140
|
+
|
|
141
|
+
Currently supported via:
|
|
142
|
+
- WSL2 (Windows Subsystem for Linux) - **Recommended**
|
|
143
|
+
- Git Bash
|
|
144
|
+
- PowerShell (with Node.js)
|
|
145
|
+
|
|
146
|
+
WSL2 Installation:
|
|
147
|
+
```powershell
|
|
148
|
+
# In WSL2 terminal
|
|
149
|
+
sudo apt-get update && sudo apt-get install git curl
|
|
150
|
+
curl -fsSL https://raw.githubusercontent.com/XortexAI/XCode/main/install.sh | bash
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Troubleshooting
|
|
156
|
+
|
|
157
|
+
### "xcode: command not found"
|
|
158
|
+
|
|
159
|
+
**Problem:** The binary isn't in your PATH
|
|
160
|
+
|
|
161
|
+
**Solution:**
|
|
162
|
+
```bash
|
|
163
|
+
# Check if ~/.local/bin is in PATH
|
|
164
|
+
echo $PATH | grep ".local/bin"
|
|
165
|
+
|
|
166
|
+
# If not, add it
|
|
167
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
168
|
+
source ~/.bashrc
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### "Bun not found" or "tsx not found"
|
|
172
|
+
|
|
173
|
+
**Problem:** Runtime not installed
|
|
174
|
+
|
|
175
|
+
**Solution:**
|
|
176
|
+
```bash
|
|
177
|
+
# Install Bun (fastest)
|
|
178
|
+
curl -fsSL https://bun.sh/install | bash
|
|
179
|
+
|
|
180
|
+
# Or install tsx for Node
|
|
181
|
+
npm install -g tsx
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### "Permission denied"
|
|
185
|
+
|
|
186
|
+
**Problem:** Script isn't executable
|
|
187
|
+
|
|
188
|
+
**Solution:**
|
|
189
|
+
```bash
|
|
190
|
+
chmod +x ~/.local/bin/xcode
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### "Module not found" errors
|
|
194
|
+
|
|
195
|
+
**Problem:** Dependencies not installed
|
|
196
|
+
|
|
197
|
+
**Solution:**
|
|
198
|
+
```bash
|
|
199
|
+
cd ~/.xcode
|
|
200
|
+
bun install # or: npm install
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### API Key Errors
|
|
204
|
+
|
|
205
|
+
**Problem:** Missing or invalid API key
|
|
206
|
+
|
|
207
|
+
**Solution:**
|
|
208
|
+
```bash
|
|
209
|
+
# Check if key is set
|
|
210
|
+
echo $OPENROUTER_API_KEY
|
|
211
|
+
|
|
212
|
+
# Set it if empty
|
|
213
|
+
export OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
214
|
+
|
|
215
|
+
# Make it permanent by adding to ~/.bashrc
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Slow Performance
|
|
219
|
+
|
|
220
|
+
**Problem:** Using npm instead of Bun
|
|
221
|
+
|
|
222
|
+
**Solution:** Install Bun for 10x faster startup:
|
|
223
|
+
```bash
|
|
224
|
+
curl -fsSL https://bun.sh/install | bash
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Updating XCode
|
|
230
|
+
|
|
231
|
+
### If installed via curl script:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
# Just run the install script again
|
|
235
|
+
curl -fsSL https://raw.githubusercontent.com/XortexAI/XCode/main/install.sh | bash
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### If installed via npm:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
npm update -g @xortex/xcode
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### If installed manually:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
cd ~/.xcode
|
|
248
|
+
git pull origin main
|
|
249
|
+
bun install
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Uninstalling
|
|
255
|
+
|
|
256
|
+
### If installed via curl script:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
rm -rf ~/.xcode ~/.local/bin/xcode
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### If installed via npm:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
npm uninstall -g @xortex/xcode
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Getting Help
|
|
271
|
+
|
|
272
|
+
- **GitHub Issues**: https://github.com/XortexAI/XCode/issues
|
|
273
|
+
- **Documentation**: https://github.com/XortexAI/XCode/tree/main/docs
|
|
274
|
+
- **Discord**: [Join our community](https://discord.gg/xortex)
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Next Steps
|
|
279
|
+
|
|
280
|
+
After installation:
|
|
281
|
+
|
|
282
|
+
1. [Quick Start Guide](QUICKSTART.md) - Get running in 2 minutes
|
|
283
|
+
2. [Configure Models](docs/models.md) - Set up your preferred AI models
|
|
284
|
+
3. [XMem Integration](docs/xmem.md) - Enable persistent memory
|
|
285
|
+
4. [Usage Guide](docs/usage.md) - Learn the commands and features
|
package/QUICKSTART.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get XCode running in under 2 minutes.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Option 1: One-Line Install (Recommended)
|
|
8
|
+
|
|
9
|
+
**macOS/Linux:**
|
|
10
|
+
```bash
|
|
11
|
+
curl -fsSL https://raw.githubusercontent.com/XortexAI/XCode/main/install.sh | bash
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Windows (PowerShell):**
|
|
15
|
+
```powershell
|
|
16
|
+
# Coming soon - use npm install for now
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Option 2: npm Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g @xortex/xcode
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Option 3: Manual Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/XortexAI/XCode.git ~/.xcode
|
|
29
|
+
cd ~/.xcode
|
|
30
|
+
bun install
|
|
31
|
+
ln -s ~/.xcode/bin/xcode ~/.local/bin/xcode
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## First Run
|
|
35
|
+
|
|
36
|
+
### 1. Set Your API Key
|
|
37
|
+
|
|
38
|
+
**For OpenRouter (recommended for multi-model access):**
|
|
39
|
+
```bash
|
|
40
|
+
export OPENROUTER_API_KEY=sk-or-v1-...
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**For Anthropic Claude:**
|
|
44
|
+
```bash
|
|
45
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**For Google Gemini:**
|
|
49
|
+
```bash
|
|
50
|
+
export GEMINI_API_KEY=...
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Start XCode
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Default mode (uses Anthropic or Gemini if configured)
|
|
57
|
+
xcode
|
|
58
|
+
|
|
59
|
+
# Use specific models via OpenRouter
|
|
60
|
+
xcode --model gemini-2.5-pro
|
|
61
|
+
xcode --model kimi-k2.5
|
|
62
|
+
xcode --model deepseek-v3.2
|
|
63
|
+
|
|
64
|
+
# Enable OpenRouter mode explicitly
|
|
65
|
+
CLAUDE_CODE_USE_OPENROUTER=1 xcode
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
Create `~/.bashrc` or `~/.zshrc` entries:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# XCode configuration
|
|
74
|
+
export OPENROUTER_API_KEY=sk-or-v1-your-key-here
|
|
75
|
+
export XMEM_API_URL=http://localhost:8000
|
|
76
|
+
alias xc='xcode' # Short alias
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then reload:
|
|
80
|
+
```bash
|
|
81
|
+
source ~/.bashrc # or ~/.zshrc
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Using XMem Memory
|
|
85
|
+
|
|
86
|
+
For the best experience, run the XMem memory server:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Terminal 1: Start XMem
|
|
90
|
+
git clone https://github.com/XortexAI/XMem.git
|
|
91
|
+
cd XMem
|
|
92
|
+
pip install -e .
|
|
93
|
+
uvicorn src.api.app:create_app --factory --host 0.0.0.0 --port 8000
|
|
94
|
+
|
|
95
|
+
# Terminal 2: Start XCode with XMem
|
|
96
|
+
export XMEM_API_URL=http://localhost:8000
|
|
97
|
+
xcode
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Common Commands
|
|
101
|
+
|
|
102
|
+
Once inside XCode:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
/model gemini-2.5-pro # Switch model
|
|
106
|
+
/memory # Edit memory files
|
|
107
|
+
/compact # Compact conversation
|
|
108
|
+
/clear # Clear history
|
|
109
|
+
/quit # Exit
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Troubleshooting
|
|
113
|
+
|
|
114
|
+
### "xcode: command not found"
|
|
115
|
+
|
|
116
|
+
Add to PATH:
|
|
117
|
+
```bash
|
|
118
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### "Bun not found"
|
|
122
|
+
|
|
123
|
+
Install Bun:
|
|
124
|
+
```bash
|
|
125
|
+
curl -fsSL https://bun.sh/install | bash
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Or use Node.js:
|
|
129
|
+
```bash
|
|
130
|
+
npm install -g tsx
|
|
131
|
+
# XCode will auto-detect and use npx tsx
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### API Errors
|
|
135
|
+
|
|
136
|
+
Check your API key:
|
|
137
|
+
```bash
|
|
138
|
+
export OPENROUTER_API_KEY=sk-or-v1-...
|
|
139
|
+
xcode --model gemini-2.5-pro
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Next Steps
|
|
143
|
+
|
|
144
|
+
- Read the [full documentation](docs/)
|
|
145
|
+
- Explore [XMem integration](docs/xmem.md)
|
|
146
|
+
- Configure [custom models](docs/models.md)
|
|
147
|
+
- Set up [plugins](docs/plugins.md)
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
**Need help?** Open an issue: https://github.com/XortexAI/XCode/issues
|