Skip to content

Latest commit

Β 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Codex CLI Portable Setup Kit

No sermons. No stalling. Just execution.
Streamline the workflow. Maximize execution.
An anti-lecture Codex profile that cuts task-irrelevant commentary and turns more of every session into tool use, verified changes, and finished results.

Verification Latest release MIT license Windows 10 and 11 PowerShell 5.1 and 7 Python 3.10+ LINUX DO

Highlights | What changes | Quick start | re-toolkit | Decoupled Pipeline | Security

Note

This is a community-maintained Codex configuration and installer. It is not Codex itself and is not an official OpenAI product.

Setup Kit Family

Project Target Agent Tool Primary Deployment Surface Core Capabilities
🟒 codex-cli-portable-setup-kit OpenAI Codex CLI Global ~/.codex + AGENTS.md TURBO.cmd zero-friction execution, re-toolkit, Two-Stage Decoupled Pipeline
🟣 claude-code-portable-setup-kit Anthropic Claude Code Workspace CLAUDE.md + .agents/ CLAUDE_TURBO.cmd autonomous execution, re-toolkit, Two-Stage Decoupled Pipeline

Highlights

  • Action over advice. Codex is told to use available tools and change the real target instead of replying with a tutorial you still have to execute.
  • Deterministic Reverse Engineering (re-toolkit). Integrated pure-Python subsystem for PE32/PE32+ analysis, x86/x64 disassembly, AOB pattern scanning, CPU micro-emulation, Protobuf/TLV wireformat dissection, and Frida dynamic hook generation.
  • Dual-Stage Decoupled Pipeline. Eliminates token degeneration and robotic placeholder artifacts (ROLE_A, ROLE_B) by separating structural planning from high-fidelity rendering.
  • Zero-Friction Elevated Execution (TURBO Mode). Pre-approves runtime tools, configures Windows elevated sandboxing, enables non-interactive autonomy (approval_policy = "never"), and marks workspaces as fully trusted.
  • Native Configuration Inheritance. Dynamically inherits user settings from ~/.codex/config.toml without reinventing custom configuration formats.
  • Fault-Tolerant Tool Fallback. Automatically leverages high-performance C extensions (Capstone, Frida) when available, while seamlessly degrading to native pure-Python engines when missing.
  • Unified Multi-Agent Compatibility. Ships native out-of-the-box instructions for both OpenAI Codex CLI (AGENTS.md) and Anthropic Claude Code (CLAUDE.md).
  • Transactional Verification & Rollback. SHA-256 manifest checks, transactional backups, receipts, and one-click rollback (rollback.ps1 / ROLLBACK.sh).

What this profile changes

This project is not mainly a migration utility. Portability is the delivery mechanism. The product is a tuned operating style for Codex. Do the work, then report the result.

Common assistant behavior This execution-first profile
Explains which commands you should run Runs the relevant commands with tools
Stops after writing a plan Continues into implementation when the next action is available
Responds with generic moral advice or boilerplate Keeps only constraints that materially affect the task
Degenerates into placeholder tokens (ROLE_A/B) Uses dual-stage pipeline for natural, full-fidelity generation
Halts on missing external tools Uses pure-Python fallback engines in re-toolkit
Asks before looking at the workspace Inspects files, tests, and context first
Says a change should work Executes tests and reads the result
Hands a failed check back to you Diagnoses, fixes, and reruns it
Loses the thread after compaction Writes bounded checkpoints for validated continuation

Quick start

1. One-Click TURBO Launch (Zero Friction)

Extract the release ZIP and double-click:

TURBO.cmd

This automatically validates the workspace, configures elevated execution policies, inherits your native model settings, and launches Codex ready for work.

2. Manual Transactional Installation

Set-ExecutionPolicy -Scope Process Bypass
.\install.ps1 -ProjectRoot 'C:\path\to\your-workspace' -KeysmithPreset unrestricted -SkipPlugins

3. Verify Package Integrity

.\verify.ps1
# Or verify installed workspace:
.\verify.ps1 -Installed -ProjectRoot 'C:\path\to\your-workspace'

re-toolkit Subsystem

The built-in re-toolkit (payload/project/.agents/tools/re-toolkit/) provides deterministic ground truth for systems engineering and security analysis:

re-toolkit/
β”œβ”€β”€ pe_parser.py          # PE32/PE32+ Header, Section Table, Imports/Exports, RVA translation
β”œβ”€β”€ disasm.py             # x86/x64 Disassembler, AOB wildcard scanner, binary patch generator
β”œβ”€β”€ emulator.py           # Micro-architecture CPU register and stack sandbox emulator
β”œβ”€β”€ protocol_parser.py    # Schema-less Protobuf wire format and TLV frame dissectors
β”œβ”€β”€ frida_bridge.py       # Frida Interceptor hook & anti-debug bypass script generator
β”œβ”€β”€ pipeline/             # Dual-stage decoupled planning & rendering engine
└── cli.py                # Unified CLI entry point

CLI Command Reference

# 1. Inspect PE headers, imported DLLs, and exported symbols
python .agents/tools/re-toolkit/cli.py parse-pe sample.exe --json

# 2. Disassemble raw opcodes or binary sections
python .agents/tools/re-toolkit/cli.py disasm 90505831C0C3 --arch x86_64

# 3. Dissect undocumented Protobuf wireformat payloads
python .agents/tools/re-toolkit/cli.py decode-protobuf 089601120474657374

# 4. Emulate CPU registers and stack execution in isolated memory sandbox
python .agents/tools/re-toolkit/cli.py emulate --code B82A000000505BC3

# 5. Generate Frida dynamic API interceptor and anti-debug scripts
python .agents/tools/re-toolkit/cli.py gen-hook --symbol CryptHashData --module advapi32.dll --output hook.js

# 6. Format aligned hexadecimal dumps
python .agents/tools/re-toolkit/cli.py hexdump target.bin --offset 0x100 --length 128

Dual-Stage Decoupled Pipeline

Traditional adversarial constraint checklists often overload LLMs, resulting in attention collapse, generic placeholder tokens (ROLE_A, ROLE_B), and truncated outputs.

The Dual-Stage Decoupled Pipeline resolves this through structural separation:

flowchart LR
    A[User Request] --> B[Stage 1: Structural Planner]
    B -->|SceneBlueprint & Plot Beats| C[Stage 2: High-Fidelity Renderer]
    C -->|Natural, Uninhibited Output| D[Delivered Result]
Loading
python .agents/tools/re-toolkit/cli.py pipeline "Your complex scenario or system architecture prompt"

Why not copy .codex manually?

A one-line prompt or copied config.toml can change tone, but the full behavior also depends on instructions, project rules, skills, hooks, feature flags, and continuity tools. This kit installs that tested stack together and gives you a way back.

Capability One prompt or manual copy Portable Setup Kit
Prefer execution over explanation Inconsistent User + project instructions
Keep routine output concise Prompt-dependent model_verbosity = "low"
Inspect, edit, test, and retry Ad hoc Explicit execution loop
Deterministic binary analysis None Built-in re-toolkit
Zero-friction elevated execution Manual One-click TURBO.cmd
Preserve long-task handoff state Usually no Hooks + context tools
Verify source files before writing No SHA-256 manifest
Back up every replaced destination Manual Automatic
Reverse a completed install Manual rollback.ps1 / ROLLBACK.sh
Exercise the release in CI Usually no 9-step test suite (Test-All.ps1)

What gets installed

Scope Destination Installed content Purpose
Codex user %CODEX_HOME% or ~/.codex config.toml, AGENTS.md, portable instructions, starter rules, skills Shared model, UI, instruction, tool, and skill defaults
Agent user ~/.agents User-level agent skills Makes selected reusable skills available outside one repository
Project Explicit -ProjectRoot AGENTS.md, CLAUDE.md, .codex, .agents, .gitignore, context workflow, re-toolkit Adds repository instructions for Codex and Claude Code, hooks, context tools, binary analysis suite, and Git guard
Git repository Local Git config core.hooksPath=.agents/git-hooks Activates the packaged pre-commit guard for that repository
Codex CLI Global npm installation, only when needed Compatibility-pinned @openai/codex Makes Codex available when it is missing
Optional plugins Current Codex installation Browser, Visualize, and Sites when available Extends the environment without making plugin failure fatal

How it works

release ZIP or clone
        |
        v
project-root validation
        |
        v
SHA-256 manifest verification
        |
        v
timestamped backup + operation journal
        |
        v
user files -> skills -> project files (including re-toolkit) -> path substitution
        |
        v
project trust + Git hooksPath + optional plugins
        |
        v
receipt.json + last-receipt.txt

install.ps1 records each file operation before replacing its destination. If a later step fails, the operation list is replayed in reverse and the previous Git hook binding is restored. On success, the same operation list is saved in the receipt for a later explicit rollback.

Rollback

Restore the latest installation receipt:

.\rollback.ps1

Restore a specific receipt:

.\rollback.ps1 -Receipt 'C:\path\to\receipt.json'

From Git Bash:

./ROLLBACK.sh

Rollback removes files added by the installer, restores files that existed before installation, and restores or unsets the repository's previous core.hooksPath value.

Security model

The public edition starts with reviewable defaults:

approval_policy = "on-request"
sandbox_mode = "workspace-write"

The public starter rules contain no pre-approved command prefixes unless TURBO mode is explicitly chosen. The installer verifies its manifest before writing, blocks manifest path traversal, records reversible operations, and excludes machine-bound runtime data.

The release does not include or migrate:

  • Codex authentication or OAuth data;
  • sessions, history, logs, caches, or SQLite databases;
  • cookies, access tokens, API keys, or private keys;
  • browser runtime data or desktop binary paths;
  • context runtime state from the source computer.

Official Codex documentation

Community & Acknowledgements

License

MIT - see LICENSE.

About

Autonomous Systems & Security Toolkit for OpenAI Codex CLI. Deterministic binary analysis, decoupled pipeline, and zero-friction execution.

Topics

Resources

Contributing

Security policy

Stars

28 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages