Skip to content

Commit a2813e9

Browse files
ArthurDEV44claude
andcommitted
feat(cli): improve setup command with CLAUDE.md support and npx config
- Fix setup to not pre-select detected IDEs (let users choose explicitly) - Add updateClaudeMd function to append Distill directives to existing CLAUDE.md - Require CLAUDE.md to exist before updating (prompt user to run /init first) - Use npx -y for Cursor, Windsurf, and Antigravity configs (recommended format) - Keep direct command for Claude Code - Update documentation for all IDEs (FR/EN) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 025d2fe commit a2813e9

File tree

14 files changed

+330
-125
lines changed

14 files changed

+330
-125
lines changed

apps/web/src/content/docs/guides/antigravity.en.mdx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,21 @@ If automatic setup didn't work:
3030
3. Click the **"..."** menu at the top of the panel
3131
4. Select **MCP Servers**
3232
5. Click **Manage MCP Servers** then **View raw config**
33-
6. Edit the file `~/.gemini/antigravity/mcp_config.json`:
34-
35-
```json
36-
{
37-
"mcpServers": {
38-
"distill": {
39-
"command": "distill-mcp",
40-
"args": ["serve"]
41-
}
42-
}
43-
}
44-
```
45-
46-
Or with npx (no global install):
33+
6. Edit the file `mcp_config.json`:
4734

4835
```json
4936
{
5037
"mcpServers": {
5138
"distill": {
5239
"command": "npx",
53-
"args": ["distill-mcp", "serve"]
40+
"args": ["-y", "distill-mcp", "serve"]
5441
}
5542
}
5643
}
5744
```
5845

46+
The `-y` flag allows npx to automatically install the package if needed.
47+
5948
## Verify Installation
6049

6150
Restart Antigravity, then ask in the chat:

apps/web/src/content/docs/guides/antigravity.mdx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,21 @@ Si la configuration automatique n'a pas fonctionné :
3030
3. Cliquez sur le menu **"..."** en haut du panneau
3131
4. Sélectionnez **MCP Servers**
3232
5. Cliquez sur **Manage MCP Servers** puis **View raw config**
33-
6. Éditez le fichier `~/.gemini/antigravity/mcp_config.json` :
34-
35-
```json
36-
{
37-
"mcpServers": {
38-
"distill": {
39-
"command": "distill-mcp",
40-
"args": ["serve"]
41-
}
42-
}
43-
}
44-
```
45-
46-
Ou avec npx (sans installation globale) :
33+
6. Éditez le fichier `mcp_config.json` :
4734

4835
```json
4936
{
5037
"mcpServers": {
5138
"distill": {
5239
"command": "npx",
53-
"args": ["distill-mcp", "serve"]
40+
"args": ["-y", "distill-mcp", "serve"]
5441
}
5542
}
5643
}
5744
```
5845

46+
Le flag `-y` permet à npx d'installer automatiquement le package si nécessaire.
47+
5948
## Vérifier l'installation
6049

6150
Redémarrez Antigravity, puis demandez dans le chat :

apps/web/src/content/docs/guides/claude-md-setup.en.mdx

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,40 @@ Use Distill for token optimization:
144144

145145
## Auto-Install with CLI
146146

147-
Instead of manually creating the file, you can use the CLI:
147+
Instead of manually adding the template, use the CLI:
148+
149+
### Prerequisite: Create CLAUDE.md
150+
151+
If you don't have a `CLAUDE.md` file yet, create it first with Claude Code:
152+
153+
```
154+
/init
155+
```
156+
157+
### Add Distill Directives
158+
159+
```bash
160+
distill-mcp setup --claude
161+
```
162+
163+
Or via interactive mode:
164+
165+
```bash
166+
distill-mcp setup
167+
# Select Claude Code
168+
```
169+
170+
The setup will automatically add Distill directives to your existing `CLAUDE.md`.
171+
172+
### With Hooks (optional)
173+
174+
For maximum integration, also add hooks:
148175

149176
```bash
150-
distill-mcp setup --hooks
177+
distill-mcp setup --claude --hooks
151178
```
152179

153-
This will:
154-
1. Create or update your `CLAUDE.md` with the recommended configuration
155-
2. Install prompt hooks for automatic reminders
180+
Hooks add automatic reminders to use MCP tools.
156181

157182
## IDE-Specific Notes
158183

apps/web/src/content/docs/guides/claude-md-setup.mdx

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,40 @@ Utilisez Distill pour l'optimisation des tokens :
144144

145145
## Auto-installation avec la CLI
146146

147-
Au lieu de créer manuellement le fichier, vous pouvez utiliser la CLI :
147+
Au lieu d'ajouter manuellement le template, utilisez la CLI :
148+
149+
### Prérequis : Créer CLAUDE.md
150+
151+
Si vous n'avez pas encore de fichier `CLAUDE.md`, créez-le d'abord avec Claude Code :
152+
153+
```
154+
/init
155+
```
156+
157+
### Ajouter les directives Distill
158+
159+
```bash
160+
distill-mcp setup --claude
161+
```
162+
163+
Ou via le mode interactif :
164+
165+
```bash
166+
distill-mcp setup
167+
# Sélectionnez Claude Code
168+
```
169+
170+
Le setup va automatiquement ajouter les directives Distill à votre `CLAUDE.md` existant.
171+
172+
### Avec les hooks (optionnel)
173+
174+
Pour une intégration maximale, ajoutez aussi les hooks :
148175

149176
```bash
150-
distill-mcp setup --hooks
177+
distill-mcp setup --claude --hooks
151178
```
152179

153-
Cela va :
154-
1. Créer ou mettre à jour votre `CLAUDE.md` avec la configuration recommandée
155-
2. Installer des hooks de prompt pour des rappels automatiques
180+
Les hooks ajoutent des rappels automatiques pour utiliser les outils MCP.
156181

157182
## Notes spécifiques aux IDE
158183

apps/web/src/content/docs/guides/cursor.en.mdx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,19 @@ If the automatic setup didn't work:
2929

3030
**Via file:** Edit `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project):
3131

32-
```json
33-
{
34-
"mcpServers": {
35-
"distill": {
36-
"command": "distill-mcp",
37-
"args": ["serve"]
38-
}
39-
}
40-
}
41-
```
42-
43-
Or with npx (no global install):
44-
4532
```json
4633
{
4734
"mcpServers": {
4835
"distill": {
4936
"command": "npx",
50-
"args": ["distill-mcp", "serve"]
37+
"args": ["-y", "distill-mcp", "serve"]
5138
}
5239
}
5340
}
5441
```
5542

43+
The `-y` flag allows npx to automatically install the package if needed.
44+
5645
## Verify Installation
5746

5847
Restart Cursor, then ask in the AI chat:

apps/web/src/content/docs/guides/cursor.mdx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,19 @@ Si la configuration automatique n'a pas fonctionné :
2929

3030
**Via fichier :** Éditez `~/.cursor/mcp.json` (global) ou `.cursor/mcp.json` (par projet) :
3131

32-
```json
33-
{
34-
"mcpServers": {
35-
"distill": {
36-
"command": "distill-mcp",
37-
"args": ["serve"]
38-
}
39-
}
40-
}
41-
```
42-
43-
Ou avec npx (sans installation globale) :
44-
4532
```json
4633
{
4734
"mcpServers": {
4835
"distill": {
4936
"command": "npx",
50-
"args": ["distill-mcp", "serve"]
37+
"args": ["-y", "distill-mcp", "serve"]
5138
}
5239
}
5340
}
5441
```
5542

43+
Le flag `-y` permet à npx d'installer automatiquement le package si nécessaire.
44+
5645
## Vérifier l'installation
5746

5847
Redémarrez Cursor, puis demandez dans le chat IA :

apps/web/src/content/docs/guides/windsurf.en.mdx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,19 @@ If the automatic setup didn't work:
2929

3030
**Via file:** Edit `~/.codeium/windsurf/mcp_config.json` (macOS/Linux) or `%USERPROFILE%\.codeium\windsurf\mcp_config.json` (Windows):
3131

32-
```json
33-
{
34-
"mcpServers": {
35-
"distill": {
36-
"command": "distill-mcp",
37-
"args": ["serve"]
38-
}
39-
}
40-
}
41-
```
42-
43-
Or with npx (no global install):
44-
4532
```json
4633
{
4734
"mcpServers": {
4835
"distill": {
4936
"command": "npx",
50-
"args": ["distill-mcp", "serve"]
37+
"args": ["-y", "distill-mcp", "serve"]
5138
}
5239
}
5340
}
5441
```
5542

43+
The `-y` flag allows npx to automatically install the package if needed.
44+
5645
## Verify Installation
5746

5847
After modifying the configuration, click the **Refresh** button in the MCP servers panel, then ask:

apps/web/src/content/docs/guides/windsurf.mdx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,19 @@ Si la configuration automatique n'a pas fonctionné :
2929

3030
**Via fichier :** Éditez `~/.codeium/windsurf/mcp_config.json` (macOS/Linux) ou `%USERPROFILE%\.codeium\windsurf\mcp_config.json` (Windows) :
3131

32-
```json
33-
{
34-
"mcpServers": {
35-
"distill": {
36-
"command": "distill-mcp",
37-
"args": ["serve"]
38-
}
39-
}
40-
}
41-
```
42-
43-
Ou avec npx (sans installation globale) :
44-
4532
```json
4633
{
4734
"mcpServers": {
4835
"distill": {
4936
"command": "npx",
50-
"args": ["distill-mcp", "serve"]
37+
"args": ["-y", "distill-mcp", "serve"]
5138
}
5239
}
5340
}
5441
```
5542

43+
Le flag `-y` permet à npx d'installer automatiquement le package si nécessaire.
44+
5645
## Vérifier l'installation
5746

5847
Après avoir modifié la configuration, cliquez sur le bouton **Refresh** dans le panneau MCP servers, puis demandez :

apps/web/src/content/docs/installation.en.mdx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,21 @@ Or with npx (no global install):
8686

8787
### Cursor
8888

89-
Edit `~/.cursor/mcp.json` (or Settings > MCP Servers):
89+
Edit `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project):
9090

9191
```json
9292
{
9393
"mcpServers": {
9494
"distill": {
95-
"command": "distill-mcp",
96-
"args": ["serve"]
95+
"command": "npx",
96+
"args": ["-y", "distill-mcp", "serve"]
9797
}
9898
}
9999
}
100100
```
101101

102+
The `-y` flag allows npx to automatically install the package if needed.
103+
102104
### Windsurf
103105

104106
Edit `~/.codeium/windsurf/mcp_config.json`:
@@ -107,28 +109,32 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
107109
{
108110
"mcpServers": {
109111
"distill": {
110-
"command": "distill-mcp",
111-
"args": ["serve"]
112+
"command": "npx",
113+
"args": ["-y", "distill-mcp", "serve"]
112114
}
113115
}
114116
}
115117
```
116118

119+
The `-y` flag allows npx to automatically install the package if needed.
120+
117121
### Antigravity
118122

119-
Open Antigravity, click **Agent session** > **"..."** menu > **MCP Servers** > **Manage MCP Servers** > **View raw config**, then edit `~/.gemini/antigravity/mcp_config.json`:
123+
Open Antigravity, click **Agent session** > **"..."** menu > **MCP Servers** > **Manage MCP Servers** > **View raw config**, then edit `mcp_config.json`:
120124

121125
```json
122126
{
123127
"mcpServers": {
124128
"distill": {
125-
"command": "distill-mcp",
126-
"args": ["serve"]
129+
"command": "npx",
130+
"args": ["-y", "distill-mcp", "serve"]
127131
}
128132
}
129133
}
130134
```
131135

136+
The `-y` flag allows npx to automatically install the package if needed.
137+
132138
## Verify Installation
133139

134140
```bash

0 commit comments

Comments
 (0)