Command Reference
This reference documents all available commands and options for ThinkCode's command-line interface (CLI) and internal Command Palette commands. These tools allow you to control and customize ThinkCode through text-based commands, providing efficient alternatives to using the graphical interface.
Command-Line Interface (CLI)
ThinkCode offers a powerful command-line interface that enables launching the application with specific options, opening files or projects, and performing various operations.
Basic Usage
The basic syntax for the ThinkCode CLI is:
Where:
[options]
are command-line flags that modify behavior[path]
is a file, folder, or workspace to open
Global Options
Option | Description |
---|---|
--help , -h | Display help information about available commands and options |
--version , -v | Display ThinkCode version information |
--status | Print process usage and diagnostics information |
--disable-extensions | Disable all installed extensions |
--disable-gpu | Disable GPU hardware acceleration |
--verbose | Print verbose output (implies --wait ) |
--log <level> | Set log level (critical, error, warn, info, debug, trace) |
Window Management
Option | Description |
---|---|
--new-window , -n | Open a new window |
--reuse-window , -r | Force opening a file or folder in an already opened window |
--wait , -w | Wait for the file to be closed before returning |
--diff <file1> <file2> | Compare two files in a diff editor |
--add <folder> | Add a folder to the current workspace |
File/Project Options
Option | Description |
---|---|
--goto <file:line[:character]> | Open a file at a specific line and optional character position |
--folder-uri <uri> | Open a folder from a URI |
--file-uri <uri> | Open a file from a URI |
--workspace <workspacePath> | Open a specific workspace file |
Development Options
Option | Description |
---|---|
--extensions-dir <dir> | Set the root path for extensions |
--user-data-dir <dir> | Specify the directory where user data is stored |
--disable-crash-reporter | Disable crash reporting |
--disable-telemetry | Disable telemetry reporting |
--disable-updates | Disable updates |
--inspect-extensions | Enable debugging of extensions |
--inspect-brk-extensions | Enable debugging of extensions with the extension host being paused after startup |
Extension Management
Option | Description |
---|---|
--install-extension <extension-id>[@<version>] | Install or update an extension |
--uninstall-extension <extension-id> | Uninstall an extension |
--list-extensions | List the installed extensions |
--show-versions | Show versions of installed extensions when using --list-extensions |
--enable-proposed-api <extension-id> | Enable proposed API features for specific extensions |
Advanced Options
Option | Description |
---|---|
--profile | Run with performance profile enabled |
--prof-startup | Run with startup performance profile enabled |
--disable-workspace-trust | Disable workspace trust prompt |
--max-memory <memory> | Max memory size for ThinkCode in MB |
--sync <on/off> | Turn on/off settings sync |
--locate-shell <shell-name> | Locate the specified shell |
Examples
Command Palette
The Command Palette provides access to nearly all ThinkCode functionality through commands. Access it with Ctrl+Shift+P
(Windows/Linux) or ⌘+Shift+P
(macOS).
File Commands
Command | Description |
---|---|
File: New File | Create a new file |
File: New Folder | Create a new folder |
File: Open... | Open a file |
File: Open Folder... | Open a folder |
File: Open Recent | Show recently opened files or folders |
File: Save | Save the current file |
File: Save As... | Save the current file with a different name |
File: Save All | Save all open files |
File: Close | Close the current editor |
File: Close All | Close all open editors |
File: Close Folder | Close the currently opened folder |
File: Revert File | Revert the current file to the saved version |
File: Auto Save | Toggle auto-save feature |
Edit Commands
Command | Description |
---|---|
Edit: Undo | Undo the last edit action |
Edit: Redo | Redo the previously undone action |
Edit: Cut | Cut the selected text |
Edit: Copy | Copy the selected text |
Edit: Paste | Paste from clipboard |
Edit: Find | Search in the current file |
Edit: Replace | Search and replace in the current file |
Edit: Find in Files | Search across all files |
Edit: Replace in Files | Search and replace across all files |
Edit: Toggle Line Comment | Comment/uncomment the current line |
Edit: Toggle Block Comment | Comment/uncomment the selected block |
Edit: Format Document | Format the entire document |
Edit: Format Selection | Format the selected text |
View Commands
Command | Description |
---|---|
View: Toggle Side Bar Visibility | Show or hide the side bar |
View: Toggle Status Bar Visibility | Show or hide the status bar |
View: Toggle Activity Bar Visibility | Show or hide the activity bar |
View: Toggle Panel | Show or hide the panel |
View: Zoom In | Increase the editor font size |
View: Zoom Out | Decrease the editor font size |
View: Reset Zoom | Reset the editor font size to default |
View: Toggle Full Screen | Enter or exit full screen mode |
View: Toggle Zen Mode | Enter or exit zen mode |
View: Toggle Word Wrap | Enable or disable word wrapping |
View: Toggle Minimap | Show or hide the code minimap |
Selection Commands
Command | Description |
---|---|
Select All | Select all content in the file |
Expand Selection | Intelligently expand the current selection |
Shrink Selection | Intelligently shrink the current selection |
Add Cursor Above | Add a cursor one line above |
Add Cursor Below | Add a cursor one line below |
Add Cursors to Line Ends | Add cursors at the end of all selected lines |
Select All Occurrences of Find Match | Select all occurrences matching the find value |
Select All Occurrences of Selected Text | Find and select all occurrences of the selected text |
Add Selection To Next Find Match | Add selection to the next occurrence of the selected text |
AI Commands
Command | Description |
---|---|
AI: Generate Code | Generate code from a description |
AI: Explain Selection | Get an explanation of the selected code |
AI: Optimize Selection | Receive suggestions to optimize the selected code |
AI: Fix Issues | Detect and fix problems in the selected code |
AI: Generate Documentation | Generate documentation for the selected code |
AI: Generate Tests | Create test cases for the selected code |
AI: Convert Code | Convert code from one language to another |
AI: Summarize Code | Get a concise summary of the code's functionality |
AI: Chat | Open the AI chat interface for conversational assistance |
AI: Intent Detection | Analyze your comments to suggest next steps |
AI: Training Mode | Enable/disable training mode for AI-related features |
Navigation Commands
Command | Description |
---|---|
Go to File... | Navigate to a file in the current project |
Go to Symbol... | Navigate to a symbol in the current file |
Go to Symbol in Workspace... | Navigate to a symbol in the workspace |
Go to Definition | Navigate to the definition of the symbol at the cursor |
Go to Declaration | Navigate to the declaration of the symbol at the cursor |
Go to References | Show all references to the symbol at the cursor |
Go to Implementation | Navigate to the implementation of the symbol at the cursor |
Go to Type Definition | Navigate to the type definition of the symbol at the cursor |
Go Back | Navigate back to the previous location |
Go Forward | Navigate forward to the next location |
Go to Line/Column... | Navigate to a specific line and column |
Go to Bracket | Navigate to the matching bracket |
Debug Commands
Command | Description |
---|---|
Debug: Start | Start debugging |
Debug: Start Without Debugging | Run the application without debugging |
Debug: Stop | Stop the current debug session |
Debug: Restart | Restart the current debug session |
Debug: Continue | Continue execution to the next breakpoint |
Debug: Step Over | Execute the current line and move to the next line |
Debug: Step Into | Enter the function called at the current execution point |
Debug: Step Out | Execute the remainder of the current function and return to the caller |
Debug: Toggle Breakpoint | Add or remove a breakpoint at the current line |
Debug: Add Conditional Breakpoint | Add a breakpoint with a condition |
Debug: Add Function Breakpoint | Add a breakpoint triggered when a function is called |
Debug: Enable All Breakpoints | Enable all breakpoints |
Debug: Disable All Breakpoints | Disable all breakpoints |
Debug: Remove All Breakpoints | Remove all breakpoints |
Terminal Commands
Command | Description |
---|---|
Terminal: New Terminal | Create a new terminal instance |
Terminal: Split Terminal | Split the current terminal into multiple panes |
Terminal: Kill Terminal | Terminate the current terminal session |
Terminal: Clear | Clear the terminal content |
Terminal: Rename | Rename the current terminal |
Terminal: Focus Next Terminal | Move focus to the next terminal instance |
Terminal: Focus Previous Terminal | Move focus to the previous terminal instance |
Terminal: Select Default Shell | Configure the default shell used for new terminals |
Extension Commands
Command | Description |
---|---|
Extensions: Install Extensions | Open the extension gallery to find and install extensions |
Extensions: Show Installed Extensions | List all installed extensions |
Extensions: Show Recommended Extensions | Show recommended extensions based on your usage |
Extensions: Show Popular Extensions | Show popular extensions from the marketplace |
Extensions: Update All Extensions | Check for and install updates for all extensions |
Extensions: Enable All Extensions | Enable all installed extensions |
Extensions: Disable All Extensions | Disable all installed extensions |
Extensions: Show Extension Logs | View logs for extension activity |
Workspace Commands
Command | Description |
---|---|
Workspaces: Add Folder to Workspace | Add another folder to the current workspace |
Workspaces: Remove Folder from Workspace | Remove a folder from the current workspace |
Workspaces: Save Workspace As... | Save the current workspace configuration |
Workspaces: Open Workspace... | Open a saved workspace configuration |
Workspaces: Duplicate Workspace | Create a duplicate of the current workspace in a new window |
Workspaces: Close Workspace | Close the current workspace |
Preferences Commands
Command | Description |
---|---|
Preferences: Open Settings | Open the user settings editor |
Preferences: Open Workspace Settings | Open workspace-specific settings |
Preferences: Open Default Settings | View default settings (read-only) |
Preferences: Open Keyboard Shortcuts | Open the keyboard shortcuts editor |
Preferences: Open User Snippets | Configure user-defined code snippets |
Preferences: Color Theme | Change the color theme |
Preferences: File Icon Theme | Change the file icon theme |
Preferences: Configure Language Specific Settings | Configure settings for a specific language |
ThinkCode Specific Commands
Command | Description |
---|---|
ThinkCode: Check for Updates | Check if a new version of ThinkCode is available |
ThinkCode: Show Release Notes | View the release notes for the current version |
ThinkCode: Show AI Models | Display and manage available AI models |
ThinkCode: Configure AI Settings | Customize AI behavior and preferences |
ThinkCode: Start Context Collection | Begin collecting project context for AI assistance |
ThinkCode: Reset Context | Clear the collected context and start fresh |
ThinkCode: Export Settings | Export settings to a file for backup or sharing |
ThinkCode: Import Settings | Import settings from a file |
ThinkCode: View Telemetry | View data being collected for telemetry (if enabled) |
ThinkCode: Configure Proxy | Set up network proxy configuration |
Custom Commands
ThinkCode supports creating custom commands for your specific workflows. You can define custom commands in your settings or through extensions.
Creating Custom Commands
To create a custom command:
- Open the Command Palette (
Ctrl+Shift+P
/⌘+Shift+P
) - Type "Preferences: Open Keyboard Shortcuts (JSON)"
- Add a new entry to define your custom command
Example of a custom command configuration:
This creates a keyboard shortcut (Ctrl+Alt+T
) that opens a new terminal in the directory of the currently focused file.
Tasks
ThinkCode's task system allows you to define and run tasks like building, testing, packaging, or deploying. Tasks can be defined in .vscode/tasks.json
and executed through the Command Palette.
Common Task Commands
Command | Description |
---|---|
Tasks: Run Task | Select and run a configured task |
Tasks: Configure Task | Create or edit task configurations |
Tasks: Restart Running Task | Restart the currently running task |
Tasks: Terminate Task | Stop the currently running task |
Tasks: Run Build Task | Run the default build task |
Tasks: Run Test Task | Run the default test task |
Accessing the Terminal
ThinkCode includes an integrated terminal that you can use to run CLI commands without leaving the application:
- Open the terminal with
Ctrl+`
(Windows/Linux) or⌘+`
(macOS) - Enter ThinkCode CLI commands directly in the terminal
This integrated approach allows you to combine the power of the command line with the visual interface of ThinkCode.