-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
68 lines (57 loc) · 2.23 KB
/
Copy pathinstall.ps1
File metadata and controls
68 lines (57 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[CmdletBinding()]
param(
[Parameter(ValueFromRemainingArguments = $true)]
[string[]]$InstallerArgs
)
$ErrorActionPreference = "Stop"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$installer = Join-Path $scriptDir "scripts/install_codex_integration.py"
function Show-WrapperHelp {
@"
ix-codex-plugin installer wrapper
Usage:
.\install.ps1 --repo C:\path\to\project [--plugin] [--hooks] [--mcp] [--mode copy|symlink] [--force]
.\install.ps1 --home [--plugin] [--hooks] [--mcp] [--mode copy|symlink] [--force]
Examples:
.\install.ps1 --repo C:\path\to\project --plugin
.\install.ps1 --repo C:\path\to\project --plugin --hooks
.\install.ps1 --repo C:\path\to\project --plugin --hooks --mode symlink
.\install.ps1 --home --plugin --hooks
.\install.ps1 --home --hooks --mcp
Flags:
--plugin Copy/register the ix-memory Codex plugin in a local marketplace
--hooks Install the .codex hook bundle (session, prompt, pre/post tool, stop)
--mcp Install the ix-memory MCP server and print the codex mcp add command
Notes:
- If none of --plugin, --hooks, or --mcp is passed, the installer defaults to
--plugin --hooks --mcp.
- --plugin does not activate the plugin in Codex. Restart Codex, then install or enable
'ix-memory' from the marketplace before its skills appear.
- This wrapper forwards all arguments to scripts/install_codex_integration.py.
"@
}
if (Get-Command py -ErrorAction SilentlyContinue) {
if ($InstallerArgs.Count -gt 0 -and ($InstallerArgs[0] -eq "--help" -or $InstallerArgs[0] -eq "-h")) {
Show-WrapperHelp
""
}
& py -3 $installer @InstallerArgs
exit $LASTEXITCODE
}
if (Get-Command python -ErrorAction SilentlyContinue) {
if ($InstallerArgs.Count -gt 0 -and ($InstallerArgs[0] -eq "--help" -or $InstallerArgs[0] -eq "-h")) {
Show-WrapperHelp
""
}
& python $installer @InstallerArgs
exit $LASTEXITCODE
}
if (Get-Command python3 -ErrorAction SilentlyContinue) {
if ($InstallerArgs.Count -gt 0 -and ($InstallerArgs[0] -eq "--help" -or $InstallerArgs[0] -eq "-h")) {
Show-WrapperHelp
""
}
& python3 $installer @InstallerArgs
exit $LASTEXITCODE
}
Write-Error "Python 3 is required to run the installer."