IntelligenceX
Command

Invoke-IntelligenceXCommand

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

Executes a command through the app-server.

Syntax

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

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

Parameters

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

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.