Skip to content

Commit 9118f5a

Browse files
github-actions[bot]Fredrik Rombach Ekelund
andcommitted
docs: Update API documentation for CLI installation IPC handlers
- Document new CLI installation IPC handlers (isStudioCliInstalled, installStudioCli, uninstallStudioCli) - Add detailed installedAppsApi endpoint documentation - Update RTK Query API section with CLI installation hooks - Update last modified date to 2025-11-10 Co-authored-by: Fredrik Rombach Ekelund <undefined@users.noreply.github.com>
1 parent 303d163 commit 9118f5a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/ai-instructions.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ window.ipcApi.openSiteURL(id) // Send (one-way)
146146
// Main (src/ipc-handlers.ts) handles:
147147
ipcMain.handle('startServer', async (event, siteId) => { ... })
148148
ipcMain.on('openSiteURL', (event, id) => { ... })
149+
150+
// CLI Installation API (delegated to src/modules/cli/lib/installation):
151+
window.ipcApi.isStudioCliInstalled() // Check CLI installation status
152+
window.ipcApi.installStudioCli() // Install the CLI
153+
window.ipcApi.uninstallStudioCli() // Uninstall the CLI
149154
```
150155

151156
### 3. WordPress Provider Pattern (Strategy Pattern)
@@ -169,8 +174,17 @@ Both implement the `WordPressProvider` interface with methods:
169174
- provider constants: WordPress/PHP versions
170175
- RTK Query APIs for data fetching:
171176
- wpcomApi: WordPress.com API calls
172-
- installedAppsApi: System apps detection
177+
- installedAppsApi: System apps detection, CLI installation status
173178
- wordpressVersionsApi: Available WP versions
179+
180+
// installedAppsApi endpoints (src/stores/installed-apps-api.ts):
181+
- getStudioCliIsInstalled: Query CLI installation status
182+
- getInstalledApps: Query installed editors and terminals
183+
- getUserEditor: Get user's preferred editor
184+
- getUserTerminal: Get user's preferred terminal
185+
- saveStudioCliIsInstalled: Mutation to install/uninstall CLI
186+
- saveUserEditor: Mutation to save preferred editor
187+
- saveUserTerminal: Mutation to save preferred terminal
174188
```
175189

176190
### 5. Site Management
@@ -353,6 +367,6 @@ Local component state used for temporary UI interactions.
353367

354368
---
355369

356-
Last Updated: 2025-11-05
370+
Last Updated: 2025-11-10
357371
Repository: https://github.com/Automattic/studio
358372
License: GPLv2 or later

0 commit comments

Comments
 (0)