Windows-focused PowerShell module that provides thin wrappers around agent CLIs, including the OpenAI Codex CLI plus experimental Gemini and Qwen task execution, named sessions, and lightweight local state inspection.
Eigenverft.Manifested.Agent exists to put agent CLIs like Codex, Gemini, and Qwen inside a controllable PowerShell wrapper, so agent runs can be steered from scripts, jobs, and repeatable tooling instead of only by hand. The goal is simple: make sandboxed, programmable agentic work practical, with enough structure to automate tasks, preserve context, and reliably continue where a run left off.
π Key Features:
- Wraps
codex execandcodex exec resumefor repeatable PowerShell-driven runs - Adds experimental
Invoke-GeminiTasksupport for Gemini CLI headless runs - Adds experimental
Invoke-QwenTasksupport for Qwen CLI headless runs - Persists named wrapper sessions in
%LOCALAPPDATA%\Eigenverft.Manifested.Agent\sessions\named-sessions.json - Tracks the last working directory per named session
- Captures the last agent message from JSON output for lightweight inspection
- Exposes simple session and state helpers for listing, updating, and clearing wrapper metadata
- Windows
- PowerShell 5.1 or newer
- A working
codexorcodex.cmdonPATHif you use the Codex commands - A working
gemini,gemini.cmd, orgemini.ps1onPATHif you useInvoke-GeminiTask - A working
qwen,qwen.cmd, orqwen.ps1onPATHif you useInvoke-QwenTask - Any Codex CLI, Gemini CLI, or Qwen CLI authentication/account setup required by your environment
Use the supported bootstrap entrypoint:
iwr -useb https://raw.githubusercontent.com/eigenverft/Eigenverft.Manifested.Agent/refs/heads/main/iwr/bootstrapper.ps1 | iexThe bootstrapper installs PowerShellGet, PackageManagement, and Eigenverft.Manifested.Agent from PSGallery, opens a new Windows PowerShell console, imports the module, and runs Get-CodexVersion.
Install-Module -Name Eigenverft.Manifested.Agent -Repository PSGallery -Scope CurrentUser -Force
Import-Module Eigenverft.Manifested.Agent -Force
Get-CodexVersionIf you want to use this project inside a disposable Windows Sandbox session, Eigenverft.Manifested.Sandbox is the fastest companion setup. It can bootstrap a fresh sandbox into an agent-ready environment, provision the CLI and supporting runtimes, and give Eigenverft.Manifested.Agent a clean place to run programmable agent workflows safely and repeatably.
Import-Module Eigenverft.Manifested.Agent -Force
Get-CodexVersion
Get-CodexState
# One-shot task in the current directory
Invoke-CodexTask -Prompt "summarize this repository"
# One-shot task in a specific directory
Invoke-CodexTask -Prompt "list the first file you see" -Directory "C:\work"
# Experimental Gemini one-shot task in the current directory
Invoke-GeminiTask -Prompt "summarize this repository"
# Experimental Qwen one-shot task in the current directory
Invoke-QwenTask -Prompt "summarize this repository"# Start or continue a named wrapper session
Invoke-CodexTask -Prompt "read the repo and remember context" -Directory "C:\work\repo" -SessionName "repo1"
# Continue without respecifying the directory
Invoke-CodexTask -Prompt "apply the requested change" -SessionName "repo1"# Start or continue a named Gemini wrapper session
Invoke-GeminiTask -Prompt "read the repo and remember context" -Directory "C:\work\repo" -SessionName "gemini-repo1"
# Continue without respecifying the directory
Invoke-GeminiTask -Prompt "apply the requested change" -SessionName "gemini-repo1"# Start or continue a named Qwen wrapper session
Invoke-QwenTask -Prompt "read the repo and remember context" -Directory "C:\work\repo" -SessionName "qwen-repo1"
# Continue without respecifying the directory
Invoke-QwenTask -Prompt "apply the requested change" -SessionName "qwen-repo1"π‘ Use
Get-Help <FunctionName>for parameters, examples, and command details.
Get-CodexVersionResolve the availablecodexcommand and return version information.Invoke-CodexTaskRun a one-shot Codex task or resume a named wrapper session.Invoke-GeminiTaskRun an experimental Gemini headless task or resume a named wrapper session backed by Gemini session ids.Invoke-QwenTaskRun an experimental Qwen headless task or resume a named wrapper session backed by Qwen session ids.
Get-CodexStateReturn wrapper readiness, local paths, and session-store status.Resolve-CodexCommandPathResolvecodexorcodex.cmdfromPATH.Resolve-CodexDirectoryNormalize and validate the working directory for a task run.Get-CodexSessionStorePathReturn the JSON file used for named wrapper sessions.
Get-CodexSessionList all stored named sessions or fetch a specific one.Set-CodexSessionDirectoryUpdate the stored last directory for an existing session.Remove-CodexSessionRemove a single stored wrapper session.Clear-CodexSessionsClear all stored wrapper-managed sessions.
Get-CodexState returns lightweight wrapper state:
LocalRootSessionStorePathSessionStoreExistsSessionCountCodexCommandPathCodexAvailableReadyToRun
Default local state path:
%LOCALAPPDATA%\Eigenverft.Manifested.Agent%LOCALAPPDATA%\Eigenverft.Manifested.Agent\sessions\named-sessions.json
Invoke-CodexTaskpreserves the wrapper contract for both one-shot and named-session flows.- Named sessions store only wrapper-side metadata: session name, thread id, last directory, and update timestamp.
- Advanced session maintenance helpers remain available if you need to inspect or clear wrapper-managed session metadata.
- The wrapper defaults to
--dangerously-bypass-approvals-and-sandbox. Use-AllowDangerous:$falseif you want the initial run to use Codex sandboxing instead. - Resume runs temporarily change the PowerShell working directory because
codex exec resumedoes not expose--cd. Invoke-GeminiTaskis experimental and intentionally keeps a smaller public surface than the Codex wrapper.- Gemini named sessions are stored separately at
%LOCALAPPDATA%\Eigenverft.Manifested.Agent\sessions\named-gemini-sessions.json. - Gemini session continuity is project-scoped. The wrapper keeps a friendly session name that maps to the last observed Gemini session id for that directory.
- Before resuming a named Gemini session, the wrapper runs
gemini --list-sessionsin the effective directory and starts a fresh session if the stored Gemini id is no longer listed. Invoke-GeminiTaskuses--approval-mode yolowhen-AllowDangerous:$trueand--sandboxwhen-AllowDangerous:$false.- Gemini trust, auth, and session availability remain controlled by the Gemini CLI itself, so wrapper resumes are best-effort if the native session state changes outside PowerShell.
Invoke-QwenTaskis experimental and intentionally keeps a smaller public surface than the Codex wrapper.- Qwen named sessions are stored separately at
%LOCALAPPDATA%\Eigenverft.Manifested.Agent\sessions\named-qwen-sessions.json. Invoke-QwenTaskuses--output-format stream-jsonfor structured runs so it can capture the Qwensession_idand final assistant message from streamed events.Invoke-QwenTaskalways uses--approval-mode yoloto stay non-interactive for automation, and adds--sandboxwhen-AllowDangerous:$false.- Qwen named-session resumes fail fast if the stored Qwen session id cannot be resumed.
This project is licensed under the MIT License. See LICENSE for details.
For questions and support:
- π Open an issue in this repository
- π€ Submit a pull request with improvements