You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,98 @@ To remove the extension, execute:
24
24
pip uninstall jupyterlab-ai-commands
25
25
```
26
26
27
+
## Available Commands
28
+
29
+
This extension provides the following commands for AI-assisted interactions with JupyterLab:
30
+
31
+
### File Commands
32
+
33
+
-**`jupyterlab-ai-commands:create-file`** - Create a new file of specified type (text, python, markdown, json, etc.)
34
+
- Arguments:
35
+
-`fileName` (string): Name of the file to create
36
+
-`fileType` (string): Type of file to create (e.g., text, python, markdown, json, javascript, typescript, yaml, julia, r, csv)
37
+
-`content` (string, optional): Initial content for the file
38
+
-`cwd` (string, optional): Directory where to create the file
39
+
40
+
-**`jupyterlab-ai-commands:open-file`** - Open a file in the editor
41
+
- Arguments:
42
+
-`filePath` (string): Path to the file to open
43
+
44
+
-**`jupyterlab-ai-commands:delete-file`** - Delete a file from the file system
45
+
- Arguments:
46
+
-`filePath` (string): Path to the file to delete
47
+
48
+
-**`jupyterlab-ai-commands:rename-file`** - Rename a file or move it to a different location
49
+
- Arguments:
50
+
-`oldPath` (string): Current path of the file
51
+
-`newPath` (string): New path/name for the file
52
+
53
+
-**`jupyterlab-ai-commands:copy-file`** - Copy a file to a new location
54
+
- Arguments:
55
+
-`sourcePath` (string): Path of the file to copy
56
+
-`destinationPath` (string): Destination path for the copied file
57
+
58
+
-**`jupyterlab-ai-commands:navigate-to-directory`** - Navigate to a specific directory in the file browser
59
+
- Arguments:
60
+
-`directoryPath` (string): Path to the directory to navigate to
61
+
62
+
-**`jupyterlab-ai-commands:get-file-info`** - Get information about a file including its path, name, extension, and content
63
+
- Arguments:
64
+
-`filePath` (string, optional): Path to the file to read. If not provided, uses the currently active file in the editor
65
+
66
+
-**`jupyterlab-ai-commands:set-file-content`** - Set or update the content of an existing file
67
+
- Arguments:
68
+
-`filePath` (string): Path to the file to update
69
+
-`content` (string): The new content to set for the file
70
+
-`save` (boolean, optional): Whether to save the file after updating (default: true)
71
+
-`showDiff` (boolean, optional): Whether to show a diff view of the changes (default: true)
72
+
73
+
### Notebook Commands
74
+
75
+
-**`jupyterlab-ai-commands:create-notebook`** - Create a new Jupyter notebook with a kernel for the specified programming language
76
+
- Arguments:
77
+
-`language` (string, optional): The programming language for the notebook (e.g., python, r, julia, javascript, etc.). Will use system default if not specified
78
+
-`name` (string): Name for the notebook file (without .ipynb extension)
79
+
80
+
-**`jupyterlab-ai-commands:add-cell`** - Add a cell to the current notebook with optional content
81
+
- Arguments:
82
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
83
+
-`content` (string, optional): Content to add to the cell
84
+
-`cellType` (string, optional): Type of cell to add - "code", "markdown", or "raw" (default: "code")
85
+
-`position` (string, optional): Position relative to current cell - "above" or "below" (default: "below")
86
+
87
+
-**`jupyterlab-ai-commands:get-notebook-info`** - Get information about a notebook including number of cells and active cell index
88
+
- Arguments:
89
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
90
+
91
+
-**`jupyterlab-ai-commands:get-cell-info`** - Get information about a specific cell including its type, source content, and outputs
92
+
- Arguments:
93
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
94
+
-`cellIndex` (number, optional): Index of the cell to get information for (0-based). If not provided, uses the currently active cell
95
+
96
+
-**`jupyterlab-ai-commands:set-cell-content`** - Set the content of a specific cell
97
+
- Arguments:
98
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
99
+
-`cellId` (string, optional): ID of the cell to modify. If provided, takes precedence over cellIndex
100
+
-`cellIndex` (number, optional): Index of the cell to modify (0-based). Used if cellId is not provided. If neither is provided, targets the active cell
101
+
-`content` (string): New content for the cell
102
+
-`showDiff` (boolean, optional): Whether to show a diff view of the changes (default: true)
103
+
104
+
-**`jupyterlab-ai-commands:run-cell`** - Run a specific cell in the notebook by index
105
+
- Arguments:
106
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
107
+
-`cellIndex` (number): Index of the cell to run (0-based)
108
+
-`recordTiming` (boolean, optional): Whether to record execution timing (default: true)
109
+
110
+
-**`jupyterlab-ai-commands:delete-cell`** - Delete a specific cell from the notebook by index
111
+
- Arguments:
112
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
113
+
-`cellIndex` (number): Index of the cell to delete (0-based)
114
+
115
+
-**`jupyterlab-ai-commands:save-notebook`** - Save a specific notebook to disk
116
+
- Arguments:
117
+
-`notebookPath` (string, optional): Path to the notebook file. If not provided, uses the currently active notebook
0 commit comments