Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.

Commit cfc44ab

Browse files
committed
feat(installer): Overhaul with interactive React/Ink CLI
This commit completely revamps the installation process by replacing the basic Node.js script with a modern, interactive command-line interface built with React and Ink. Key enhancements include: - **Interactive UI**: A multi-step, visually appealing installer with spinners, colored output, and clear instructions. - **Real-time API Key Validation**: The installer now communicates with the LeadMagic API to validate the user's API key and displays their remaining credits directly in the terminal. - **Expanded Client Support**: Added a 'Manual Setup' option with clear instructions for generic MCP-compatible clients like Aider, Augment Code, and custom scripts. - **Improved User Experience**: - Clickable hyperlinks for easy access to the dashboard and documentation. - Better error handling and contextual troubleshooting tips. - Refined all UI text for clarity and a more professional feel. - **Code Refactoring**: The installer codebase is now fully TypeScript with JSX (.tsx), cleaner, more modular, and easier to maintain. The 'install-interactive' script in package.json has been updated to run the new src/install.tsx file.
1 parent ae82b1a commit cfc44ab

10 files changed

Lines changed: 3316 additions & 1051 deletions

File tree

README.md

Lines changed: 15 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -55,120 +55,38 @@
5555

5656
### ⚡ Option 1: Interactive Installer (Recommended)
5757

58-
The easiest way to get started - works on **macOS**, **Windows**, and **Linux**:
58+
The easiest way to get started - works on **macOS**, **Windows**, and **Linux**. Our new interactive installer, built with React and Ink, makes setup a breeze.
5959

6060
```bash
6161
# 🔥 Using npx (no installation required)
6262
npx leadmagic-mcp-server install
63-
64-
# 📦 Or install globally first
65-
npm install -g leadmagic-mcp-server
66-
leadmagic-mcp-install
6763
```
6864

6965
**✨ The installer will:**
70-
-Help you get your LeadMagic API key
71-
- ✅ Automatically configure your preferred AI tool
72-
- ✅ Create all necessary config files
73-
- ✅ Provide usage examples and documentation
66+
-**Validate your API key** in real-time and show your remaining credits.
67+
- ✅ Automatically detect and configure your preferred AI tool (Claude, Cursor, VS Code, etc.).
68+
- ✅ Create all necessary config files and a local `.env` for development.
69+
- ✅ Provide usage examples and helpful links.
7470

7571
### 📱 Option 2: Quick Manual Setup
7672

77-
For specific tools, use these one-liner configs:
73+
If you prefer manual setup or are using a client like **Aider**, you can add the server configuration directly to your client's settings file. The interactive installer provides copy-pasteable snippets for this.
7874

79-
#### 🤖 Claude Desktop
75+
Run the installer and choose the "Other (Manual Setup)" option:
8076
```bash
81-
# 🍎 macOS/Linux
82-
echo '{"mcpServers":{"leadmagic":{"command":"leadmagic-mcp-server","env":{"LEADMAGIC_API_KEY":"your-key-here"}}}}' > ~/.config/claude/claude_desktop_config.json
83-
84-
# 🪟 Windows
85-
echo '{"mcpServers":{"leadmagic":{"command":"leadmagic-mcp-server","env":{"LEADMAGIC_API_KEY":"your-key-here"}}}}' > "%APPDATA%\Claude\claude_desktop_config.json"
86-
```
87-
88-
#### 🎯 Cursor (Cline Extension)
89-
Add to your Cursor `settings.json`:
90-
```json
91-
{
92-
"cline.mcpServers": {
93-
"leadmagic": {
94-
"command": "leadmagic-mcp-server",
95-
"env": {
96-
"LEADMAGIC_API_KEY": "your-key-here"
97-
}
98-
}
99-
}
100-
}
101-
```
102-
103-
#### 🏄 Windsurf
104-
Add to your Windsurf `settings.json`:
105-
```json
106-
{
107-
"mcpServers": {
108-
"leadmagic": {
109-
"command": "leadmagic-mcp-server",
110-
"env": {
111-
"LEADMAGIC_API_KEY": "your-key-here"
112-
}
113-
}
114-
}
115-
}
116-
```
117-
118-
#### 🔄 Continue.dev
119-
Add to your `~/.continue/config.json`:
120-
```json
121-
{
122-
"mcpServers": [{
123-
"name": "leadmagic",
124-
"command": "leadmagic-mcp-server",
125-
"env": {
126-
"LEADMAGIC_API_KEY": "your-key-here"
127-
}
128-
}]
129-
}
130-
```
131-
132-
#### 💻 VS Code (Cline/Continue Extensions)
133-
Add to your VS Code `settings.json`:
134-
```json
135-
{
136-
"cline.mcpServers": {
137-
"leadmagic": {
138-
"command": "leadmagic-mcp-server",
139-
"env": {
140-
"LEADMAGIC_API_KEY": "your-key-here"
141-
}
142-
}
143-
}
144-
}
145-
```
146-
147-
#### ⚡ Zed Editor
148-
Add to your Zed `settings.json`:
149-
```json
150-
{
151-
"mcpServers": {
152-
"leadmagic": {
153-
"command": "leadmagic-mcp-server",
154-
"env": {
155-
"LEADMAGIC_API_KEY": "your-key-here"
156-
}
157-
}
158-
}
159-
}
77+
npx leadmagic-mcp-server install
16078
```
16179

16280
### 🔑 Get Your API Key
16381

16482
1. 🌐 Visit [LeadMagic Dashboard](https://app.leadmagic.io/dashboard/api-keys)
16583
2. 📝 Sign up for free (if needed)
16684
3. 🔐 Generate your API key
167-
4. 🔄 Replace `your-key-here` in the configs above
85+
4. 📋 Paste it into the interactive installer when prompted.
16886

16987
### ⚡ npx Usage (Zero Installation)
17088

171-
You can use the server without installing:
89+
You can use the server without installing, which is great for quick tests or containerized environments:
17290

17391
```bash
17492
# 🚀 Run directly with your API key
@@ -301,7 +219,8 @@ npm run inspector
301219
| 💻 **VS Code (Cline)** | VS Code settings.json | ✅ Fully Supported | Requires Cline extension |
302220
| 💻 **VS Code (Continue)** | Continue extension config | ✅ Fully Supported | Requires Continue extension |
303221
|**Zed Editor** | Interactive installer or settings | ✅ Fully Supported | Modern code editor |
304-
| 🤖 **Aider** | Command line with MCP support | ✅ Supported | AI pair programming |
222+
| 🤖 **Aider** | Manual Configuration | ✅ Supported | AI pair programming in your terminal |
223+
|**Augment Code** | Manual Configuration | ✅ Supported | AI coding assistant |
305224
| 🔗 **Any MCP Client** | Manual configuration | ✅ Supported | Standard MCP protocol |
306225

307226
---
@@ -319,11 +238,11 @@ npm run inspector
319238
### 📁 Project Structure
320239
```
321240
├── src/
322-
│ ├── index.ts # 🚀 Main entry point and server startup
241+
│ ├── index.ts # 🚀 Main entry point and CLI command handling
323242
│ ├── server.ts # 🔌 MCP server implementation with all 19 tools
324243
│ ├── client.ts # 🌐 LeadMagic API client wrapper
325-
── types.ts # 📝 TypeScript types and Zod schemas
326-
── install.js # 🛠️ Interactive installer script
244+
── types.ts # 📝 TypeScript types and Zod schemas
245+
│ └── install.tsx # 🎨 The new interactive installer (React/Ink)
327246
├── dist/ # 📦 Compiled JavaScript output
328247
├── .env.example # 🔐 Environment configuration example
329248
└── README.md # 📚 This file

0 commit comments

Comments
 (0)