en-US/about_PSAITerminal.help.txt

TOPIC
    about_PSAITerminal

SHORT DESCRIPTION
    An AI assistant inside PowerShell: ask questions or describe tasks in natural language,
    and approve each command the AI proposes before it runs.

PLATFORMS
    Windows PowerShell 5.1 (x64/x86) and PowerShell 7.4 or later on Windows only.

GETTING STARTED
    Type ai and press Enter to open settings, then add a model under Models.
    Type ai mode Auto to switch to the recommended mode (new installs start in Off).
    Type ai <text> in any mode to send text to the AI explicitly.

MODES
    Auto Runnable PowerShell commands run unchanged. Natural language, misspelled
          commands, and syntax errors go to the AI.
    AI All input goes to the AI, including valid commands and incomplete code.
    Off Plain PowerShell.
    Auto does not guess whether you want an answer or an action; the model decides.
    Incomplete code keeps native continuation in Auto and Off. An English sentence that
    starts with a command name (for example "where is ...") runs as a command; use F2.

APPROVAL
    For each proposed command the purpose, full command, and local risk are shown:
        [Y] Run [A] Always allow <names> this session [E] Edit in prompt [N] Reject
    Y Run. Enter defaults to Y for Low and Medium risk. High risk has no default and
        asks for a second confirmation.
    A Run and skip approval for the same command names for the rest of this session.
        Not offered for High risk.
    E Do not run; place the command in the next input line for you to edit and run.
    N Reject. Optionally tell the AI what to do instead; press Enter to cancel the task.
    Commands run in your current session, so location, variables, and functions persist.
    Output is returned to the model, which continues or finishes in a sentence or two.
    One task runs at most 12 commands (Set-PSAITerminalOption -MaxAgentSteps).

RISK
    Risk is computed locally; model claims are ignored.
    Low Queries (Get-*, Test-*, Select-*, ...), cd, ipconfig, ping, whoami, git status/log/diff.
    High Remove/Stop/Uninstall/Clear commands, rm, del, taskkill, Invoke-Expression,
            download-and-run, nested cmd/powershell, registry, service and disk changes,
            git clean, git reset --hard, forced push.
    Medium Everything else, including writes, installs, starting programs, unknown commands.
    Aliases and functions redefined in the session are classified by their real target.

AUTO-APPROVE
    Set-PSAITerminalOption -AutoApprove 'Get-*', 'git'
    Matching Low and Medium commands run without approval. High risk always asks.

FAILURES
    In Auto and AI mode a failed command shows "Command failed · press F7 to diagnose
    and fix". F7 asks the AI to explain the cause and propose a fix, which you approve as
    usual. The AI is never called automatically.

SHORTCUTS
    F2 Send the current input to the AI.
    F3 Run the current input as PowerShell.
    F6 Cycle Off, AI, and Auto.
    F7 Diagnose and fix the last command if it failed; otherwise explain it.
    On some laptops, hold Fn together with the function key.

MODELS
    Choose OpenAI, Anthropic, Google Gemini, DeepSeek, a local service (Ollama, LM Studio),
    or another OpenAI-compatible service. Everything except Anthropic uses the OpenAI-
    compatible API. Endpoints that already contain a version segment (/v1, /api/v3) are
    used as is; otherwise /v1 is appended. Local endpoints may omit the API key.
    API keys are stored in Windows Credential Manager, never in the JSON configuration.

COMMON COMMANDS
    ai help | ai clear | ai new <title> | ai mode Off|AI|Auto
    Get-PSAIModel, Select-PSAIModel, Test-PSAIModel
    Get-PSAISession, New-PSAISession, Clear-PSAISession
    Get-PSAITerminalOption, Set-PSAITerminalOption
    Test-PSAIConfiguration, Get-PSAIIntegrationStatus
    Uninstall-PSAITerminal [-PurgeUserData]

SAFETY
    Commands run with your permissions in your session; this is not a sandbox.
    Risk levels and purposes are aids; read the full command before approving.
    Commands containing literal secrets that masking would change are refused; use
    variables or credential references instead.

UNINSTALL
    Uninstall-PSAITerminal removes the module and the profile autoload block and keeps
    configuration and credentials. -PurgeUserData also deletes verified configuration,
    sessions, and the PSAITerminal/Model/<name> credentials of configured models only.
    Both uninstall entries check paths and ownership first. If loaded DLLs block removal,
    close the terminal and run Uninstall-PSAITerminal.ps1 from pwsh -NoProfile.