> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lynxhub.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Post-installation configuration

> Automate extensions installation and configure launch parameters after setup.

Once you flag a card as successfully installed, you can execute post-setup procedures. These include downloading supplementary plugins, enabling automatic updates, setting startup argument presets, or defining launch behaviors.

Access these configurations using the `stepper.postInstall` namespace. Call them after invoking `stepper.setInstalled(targetDir)` in your installation stepper script.

***

## Install supplementary extensions

If your card supports extension directories (e.g. ComfyUI or Stable Diffusion WebUI), you can automate cloning a list of extensions during the installation wizard.

* **Method**: `installExtensions(extensionURLs: string[], extensionsDir: string): Promise<void>`
* **Responsibility**: Clones an array of Git repository URLs to the specified target directory.

### Example

```javascript theme={null}
// Flag card as installed first
stepper.setInstalled(targetDir);

// Define target extension folder and source URLs
const extensionsFolder = `${targetDir}/custom_nodes`;
const repositories = ['https://github.com/ltdrdata/ComfyUI-Manager', 'https://github.com/pythongosssss/ComfyUI-Custom-Scripts'];

stepper.progressBar(true, 'Installing extensions...');
await stepper.postInstall.installExtensions(repositories, extensionsFolder);
```

***

## Configure WebUI settings

Configure auto-update policies, pre-launch dependencies, execution arguments, and browser parameters.

* **Method**: `config(configs: ModuleConfigOptions): void`
* **Responsibility**: Saves launch and configuration presets for the card.

### Enable automatic updates

Configure whether the card or its installed extensions should check for and apply updates automatically on startup.

```javascript theme={null}
stepper.postInstall.config({
  autoUpdateCard: true, // Pull updates for the WebUI itself
  autoUpdateExtensions: true, // Pull updates for all installed extensions
});
```

### Pre-defined arguments presets

You can register custom CLI argument configurations for your card.

```javascript theme={null}
stepper.postInstall.config({
  customArguments: {
    presetName: 'Low VRAM GPU',
    customArguments: [
      {name: '--lowvram', value: ''}, // Empty string for boolean parameters
      {name: '--precision', value: 'full'},
    ],
  },
});
```

### Custom launch commands

If you need to execute a custom CLI sequence when running the card, define `customCommands` to override the default runner commands.

```javascript theme={null}
stepper.postInstall.config({
  customCommands: ['call .venv\\Scripts\\activate.bat', 'python main.py --listen 0.0.0.0 --port 8188'],
});
```

### Pre-launch commands and path opening

Execute setup shell commands or open folder locations in the OS file explorer before booting the card process.

```javascript theme={null}
stepper.postInstall.config({
  preLaunch: {
    preCommands: ['echo "Booting server process..."', 'conda activate base'],
    openPath: [{path: targetDir, type: 'folder'}],
  },
});
```
