Skip to main content

Local Development Setup

Developer Information Only

This section is for developers contributing to Saarthi or those who wish to build and run the extension from source.

To set up Saarthi for local development:

  1. Clone the repository:

    git clone https://github.com/godspeedsystems/Saarthi.git
    cd Saarthi
  2. Install dependencies: Saarthi uses pnpm for package management.

    pnpm install
  3. Run the extension for development: You have two primary methods:

    • Directly in VS Code (Recommended for active development):

      • Open the cloned Saarthi folder in VS Code.
      • Press F5 (or select RunStart Debugging from the menu). This opens a new VS Code window (Extension Development Host) with Saarthi running.
      • Changes to the webview code (under webview-ui/) will often update live.
      • Changes to the core extension code (under src/) typically require restarting the Extension Development Host window.
    • Building and Installing a VSIX package: This method is useful for testing the packaged extension or distributing development builds.

      1. Build the VSIX file:

        pnpm build

        A .vsix file (e.g., saarthi-<version>.vsix) will be created in the bin/ directory.

      2. Install the VSIX in VS Code:

        • Using the command line:
          code --install-extension bin/saarthi-<version>.vsix
          (Replace <version> with the actual version number in the filename).
        • Using the VS Code interface:
          • Open the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
          • Click the "..." (More Actions) menu in the Extensions view sidebar.
          • Select "Install from VSIX..."
          • Browse to and select the generated .vsix file from the bin/ directory.

VS Code&#39;s Install from VSIX dialog Installing a development VSIX using VS Code's "Install from VSIX..." dialog.