Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.
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

Open

Description

Summary of the new feature / enhancement

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.

Proposed technical implementation details (optional)

Requirements:

  • Prompt the user to get consent for
  • 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.

Activity

  1. codename-macedon commented on Jul 23, 2025

    @codename-macedon

    Reference: #388
    Travis Plunk (@TravisEz13)
    Steven Bucher (@StevenBucher98)

    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.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions