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
{{ message }}
This repository was archived by the owner on Jan 30, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 30, 2026. It is now read-only.
Add a option during the install script to have AI Shell open persistently by adding to the $PROFILE of the user #388
As a user I would like to be able to have AI Shell open up by default when I install the tool. During installation we should prompt the user asking if they would like to have the AI Shell sidecar open (Invoke-AIShell) to open up by default and choose a default agent to use on start up.
Get the current agents and let the user choose the default agent to use on start up
With this information add to the $PROFILE of the user to open whenever PowerShell 7 is ran within Windows terminal
When the user uninstalls we remove the section of code we added to the user profile so include a uniquely identifiable area in the $PROFILE without deleting any of the other code in the $PROFILE file.
There are extensive reasons not to use Invoke (such as Invoke-Expression) for setting profile preferences in PowerShell 7:
Security risks (e.g., code injection)
Debugging is more difficult
Code is harder to maintain and audit
Recommendation:
Instead of using Invoke, it's strongly recommended to configure your profiles through your terminal's configuration file.
For Windows Terminal, profile and default shell preferences should be set in the settings.json file.
This file allows you to safely set:
The default profile
Profile-specific options (such as environment, shell, color scheme)
Side-by-side and split-pane options
To edit it, open Windows Terminal and go to Settings (Ctrl + ,), or open the above path in a text editor.
For PowerShell-specific settings, consider using the PowerShell profile script ($PROFILE), but avoid dynamic approaches with Invoke-Expression for safer, more maintainable configuration.
Information summarized with help from GitHub Copilot Chat Assistant.
Activity
codename-macedon commentedon Jul 23, 2025
Reference: #388
Travis Plunk (@TravisEz13)
Steven Bucher (@StevenBucher98)
There are extensive reasons not to use
Invoke(such asInvoke-Expression) for setting profile preferences in PowerShell 7:Recommendation:
Instead of using
Invoke, it's strongly recommended to configure your profiles through your terminal's configuration file.For Windows Terminal, profile and default shell preferences should be set in the
settings.jsonfile.This file allows you to safely set:
To edit it, open Windows Terminal and go to Settings (Ctrl + ,), or open the above path in a text editor.
For PowerShell-specific settings, consider using the PowerShell profile script (
$PROFILE), but avoid dynamic approaches withInvoke-Expressionfor safer, more maintainable configuration.Information summarized with help from GitHub Copilot Chat Assistant.