Skip to content

Conversation

@Devdha
Copy link

@Devdha Devdha commented Jan 22, 2026

Issue #685

Summary

Add the ability to customize CLI execution commands for each provider in Settings > Connections. Users can now override:

  • CLI command path
  • Resume flag
  • Default arguments
  • Auto-approve flag (e.g., --yolo for Codex instead of --full-auto)
  • Initial prompt flag

This addresses #659 and similar requests for custom CLI flags.

Changes

  • src/main/settings.ts - Add ProviderCustomConfig type and CRUD functions with cache-safe getters
  • src/main/ipc/connectionsIpc.ts - Add IPC handlers for get/update custom configs
  • src/main/preload.ts - Expose APIs to renderer
  • src/main/services/ptyManager.ts - Add parseShellArgs() for proper shell-style argument parsing (supports quoted strings)
  • src/renderer/components/CustomCommandModal.tsx - New modal with granular flag configuration and live preview
  • src/renderer/components/CliProvidersList.tsx - Add settings gear icon for detected providers
  • src/renderer/types/electron-api.d.ts - TypeScript definitions

Screenshots

CleanShot 2026-01-22 at 19 18 20 CleanShot 2026-01-22 at 18 46 09

- Add ProviderCustomConfig interface for storing custom CLI flags
- Add getProviderCustomConfig and getAllProviderCustomConfigs functions
- Add updateProviderCustomConfig function for CRUD operations
- Return shallow/deep copies from getter functions to prevent cache corruption
- Normalize custom config values in normalizeSettings function
- Add providers:getCustomConfig handler to retrieve single config
- Add providers:getAllCustomConfigs handler to retrieve all configs
- Add providers:updateCustomConfig handler to update/delete config
- Expose APIs to renderer via preload contextBridge
- Add ProviderCustomConfig and ProviderCustomConfigs types
- Add type definitions for getProviderCustomConfig
- Add type definitions for getAllProviderCustomConfigs
- Add type definitions for updateProviderCustomConfig
- Add parseShellArgs function for proper shell argument parsing
- Support single quotes, double quotes, and escape characters
- Apply custom provider config overrides at command execution time
- Use parseShellArgs for resumeFlag, defaultArgs, autoApproveFlag, initialPromptFlag
- Add CustomCommandModal component with granular flag configuration
- Add Escape key handler for modal dismissal
- Add settings button to detected providers in CliProvidersList
- Add command preview, reset to defaults, and save functionality
- Improve accessibility with aria-label on tooltip buttons
@Devdha
Copy link
Author

Devdha commented Jan 22, 2026

cc @JKamsker - This addresses your request in #659 for using --yolo with Codex. With this PR, you can customize the auto-approve flag (and other CLI flags) per provider in Settings > Connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant