IntelligenceX
Cmdlet

Invoke-IntelligenceXCommand

Namespace IntelligenceX.PowerShell
Inputs
IntelligenceX.OpenAI.IntelligenceXClient
Outputs
IntelligenceX.Json.JsonValue IntelligenceX.OpenAI.AppServer.Models.CommandExecResult

Executes a command through the app-server.

Examples

Example 1


Invoke-IntelligenceXCommand -Command @("git","status") -WorkingDirectory "C:\repo"
        

Run a command in the repository root

Example 2


Invoke-IntelligenceXCommand -Command @("dotnet","test") -SandboxType "workspace" -WorkingDirectory "C:\repo"
        

Run a command in a sandboxed workspace

Example 3


Invoke-IntelligenceXCommand -Command @("git","status") -TimeoutMs 5000
        

Run a command with a timeout

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Invoke-IntelligenceXCommand -Command <string[]> [-Client <IntelligenceXClient>] [-NetworkAccess] [-Raw] [-SandboxType <string>] [-TimeoutMs <int>] [-WorkingDirectory <string>] [-WritableRoot <string[]>] [<CommonParameters>]
#

Parameters

Command string[] requiredposition: namedpipeline: false
Command and arguments.
Client IntelligenceXClient optionalposition: namedpipeline: true (ByValue)
Client instance to use. Defaults to the active client.
NetworkAccess SwitchParameter optionalposition: namedpipeline: false
Enable network access for sandboxed runs.
Raw SwitchParameter optionalposition: namedpipeline: false
Return raw JSON response.
SandboxType string optionalposition: namedpipeline: false
Sandbox type for execution.
TimeoutMs int optionalposition: namedpipeline: false
Command timeout in milliseconds.
WorkingDirectory string optionalposition: namedpipeline: false
Working directory for the command.
WritableRoot string[] optionalposition: namedpipeline: false
Writable root paths for sandboxed runs.

Outputs

IntelligenceX.Json.JsonValue, IntelligenceX.OpenAI.AppServer.Models.CommandExecResult