Skip to content

Intelligence-Factory-LLC/Buffaly.CodexEmbedded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

257 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 Buffaly Codex Embedded

Unofficial Windows-first UI for OpenAI Codex
Run the official Codex agent in a beautiful browser UI - on your desktop, from your phone, or alongside the CLI.

Windows .NET License Release Workflow

🌟 What is Buffaly Codex Embedded?

The Windows-first UI that makes OpenAI Codex even easier to use.

Run the official Codex agent in a clean browser interface on your desktop, from your phone, or right next to the CLI.

You get:

  • Multiple projects open at once (no more switching between terminals)
  • Natural editing, image paste, and full history
  • Seamless switching between desktop, web, and phone
  • Same powerful Codex agent under the hood

⚑ Quick Start

This is the fastest path on Windows:

Requires: Codex CLI installed and signed in.

  1. Install Codex CLI and verify it works:
codex --version
codex login
  1. Open the latest release and download the .msi asset named Buffaly.CodexEmbedded-win-x64-<version>.msi.
  2. Run the installer.
  3. Launch Buffaly Codex Embedded from the Start Menu shortcut created by the installer.

Optional terminal launch:

buffaly-codex-web

The installer adds buffaly-codex and buffaly-codex-web to your PATH, creates a Start Menu shortcut, and launches or reuses the local web server when you open the app.

That is all most users need. Sessions started from the CLI or the web UI will appear in the same app.

For advanced portable, CLI, or source-based setup, see Advanced Install, CLI, and Source Options. For install issues, see Troubleshooting.

✨ What's New in the Latest Release

Visual Studio stays in the loop

The workspace now works much more naturally with Visual Studio. You can see bridge status, pull selected code directly into a prompt, and send build errors back to Codex without manually copying text between tools.

Visual Studio bridge connected inside the workspace

Selected editor text ready to include in a prompt

Build errors ready to send back to Codex for a fix

New 5.4 model availability

Model selection is easier to trust because the workspace surfaces newer model options directly in the picker, including the new 5.4 option when it is available in your runtime.

New model availability surfaced directly in the model picker

See diffs and give feedback from the workspace

You can now review working tree diffs, inspect what changed, and steer the next step without leaving the workspace. That makes it much easier to guide Codex through cleanup, review, and follow-up edits while the context is still fresh.

Working tree diff view inside the Codex workspace

Inline feedback flow for guiding the next change

πŸ“Έ See It In Action

Use the UI in your browser to manage all of your codex session, even those started by the CLI. Start a session in the terminal, then watch it appear in the web UI with full context and timeline. Or start a session in the web UI and manage it from any browser. Use Tailscale to securely access the same UI from your phone, and keep the same session state and thread context across devices.

Animated walkthrough of Buffaly Codex Embedded across web, CLI, and mobile

Release Notes

Start here:

Recent releases:

✨ Major Features

The application is designed to mirror the Desktop Codex experience while also making the same experience available on mobile. Core features include:

1. Multi-project / multi-session management

The project sidebar lets you organize your Codex tasks by working directory and sessions. The same session names you use in the CLI appear in the sidebar, and you can have multiple sessions open at once without losing context.

Multi-project workspace with sidebar and active conversation

Desktop project list with multiple active sessions.

Detailed project list with multiple active sessions

The same project model works on desktop and mobile, with active status and quick actions. Mobile project list over private tailnet access.

Project list on phone over private tailnet access

2. Prompting that feels native

Type naturally, edit freely, use voice to text and attach images directly in the composer. Easily select and copy / paste text, make edits before sending, and let Codex see images without extra steps. No arrow key editing or painful windows CLI based copy paste.

Queue, guide, cancel the Codex assistant with key commands and buttons in the UI.

Prompt composer with natural text input and controls

Image preview chip in the composer before send.

Image preview chip in the composer before send

Image context is carried into the message so Codex can use it immediately.

Sent prompt with attached image visible in conversation

3. Persistent timeline and context continuity

Every session keeps a readable timeline so you can resume old work without terminal scrollback hunting.

State stays visible, including what ran, what failed, what changed, and what to do next.

Conversation timeline with assistant and tool entries.

Conversation timeline with assistant and tool entries

Timeline showing resumed task context and follow-up actions.

Timeline showing resumed task context and follow-up actions

4. Hybrid web plus terminal workflow

Use the web UI for context and review, while running focused CLI commands in parallel.

Web gives visibility while the terminal gives precision, both on the same Codex workflow.

Desktop web interface during an active coding session.

Desktop web interface during an active coding session

Terminal window running commands for the same work session.

Terminal window running commands for the same work session

5. True cross-device continuation

Start on desktop, continue on phone, keep the same session state and thread context.

Desktop, terminal, and phone stay in one shared workflow with no context reset.

Desktop web UI for an active Codex session.

Desktop web UI for an active Codex session

CLI window running focused commands for the same work.

CLI window running focused commands for the same work

Mobile view continuing the same session over Tailscale.

Mobile view continuing the same session over Tailscale

Why We Built This

We use Codex internally at IntelligenceFactory.ai to build buffa.ly.

We built this tool because we use this tool.

🌟 Why You’ll Love This (vs raw Codex CLI)

What’s hard with the raw CLI How Buffaly Codex Embedded makes it easy
One terminal session at a time Juggle 5-6 projects with persistent sessions open side-by-side
Clunky arrow-key editing Natural browser input - full edit, undo, copy-paste
Images/screenshots are painful Paste screenshots directly into the chat - Codex sees them instantly
History lost in scrollback Clean per-session timeline - scroll back and resume anytime
Hard to mix quick tasks & deep work Run the buffaly-codex CLI and web UI at the same time - both stay in sync
Switching devices is a hassle Start on desktop β†’ continue on phone β†’ same conversation, same files, same agent state

Same official Codex agent. Easier developer experience.

πŸš€ Advanced Install, CLI, and Source Options

1. Prerequisites

  • Windows environment
  • codex CLI installed and authenticated
  • Internet access (for updates)

Confirm Codex is ready:

codex --version

2. Install using the MSI (recommended)

  1. Open the latest GitHub Release and download the .msi asset named Buffaly.CodexEmbedded-win-x64-<version>.msi.
  2. Run the installer.
  3. Open a new terminal so updated PATH is loaded.

MSI installs buffaly-codex and buffaly-codex-web onto your PATH and adds a Start Menu shortcut for Buffaly Codex Embedded.

3. Launch browser UI after install

After install, you can either:

  • Open Start Menu and launch Buffaly Codex Embedded.
  • Open a new terminal and run:
buffaly-codex-web

buffaly-codex-web opens your browser automatically and targets WebLaunchUrl from apps\web\appsettings.json (default http://127.0.0.1:5170/). If a local server is already running at that URL, it reuses it instead of starting another process.

4. Advanced: install from the zip package (portable fallback)

If you prefer a portable install (or need to run without MSI), download the .zip release asset and run:

pwsh -ExecutionPolicy Bypass -File .\install.ps1

This installs wrapper commands on your PATH, including buffaly-codex-web.

5. Advanced: run from source (developer)

From repo root:

dotnet restore
dotnet build
dotnet run --project Buffaly.CodexEmbedded.Web

If Codex is missing, the app redirects browser traffic to /help/codex-install with setup steps. You can override this with CodexInstallHelpUrl in appsettings.json.

6. Other commands after install

  • buffaly-codex-web: launch the web UI.
  • buffaly-codex: interactive REPL mode.
  • buffaly-codex run --prompt "<text>": one-shot prompt.
  • buffaly-codex-update: download and install latest workflow artifact or tagged release.
  • buffaly-codex-uninstall: remove the local install.

7. Try a real workflow

buffaly-codex-web
# In another terminal window:
buffaly-codex run --prompt "Refactor the payment service and add tests" --cwd "C:\Projects\MyApp"

Troubleshooting

  • Browser opens a Codex setup help page: Codex CLI is missing or not runnable. Install Codex, run codex login, then retry buffaly-codex-web.
  • install.ps1 fails with "release-manifest.json was not found": Run installer from the extracted package root folder that contains release-manifest.json, apps\, and install.ps1.
  • powershell command is not recognized: Use pwsh -ExecutionPolicy Bypass -File .\install.ps1 (PowerShell 7) or use the full Windows PowerShell path shown above.
  • Web UI starts but sessions fail: Confirm codex --version works, then run codex login.
  • buffaly-codex-web is not found after install: Open a new terminal so updated PATH is loaded.

πŸ“± Codex in Your Pocket - Seamless Device Switching

Start a refactoring session on your desktop web UI, grab your phone on the train, open the same Tailscale URL, and continue exactly where you left off - same conversation, same files, same agent state.

(Full Tailscale setup instructions below - same private, secure approach we recommend for all high-trust agent work.)

  1. Install and sign in to Tailscale on:

the machine running this UI

your phone (or other device)

  1. Enable MagicDNS and HTTPS certificates in the Tailscale admin console.

  2. On the machine running this UI, publish the local port to your tailnet only:

tailscale serve --bg 5173
tailscale serve status
  1. On your phone (on the same tailnet), open the URL shown by tailscale serve status, for example: https://win..ts.net/

If the hostname does not resolve on a client, run this on the client:

tailscale set --accept-dns=true

More: docs/tailscale.md (slugs, multiple ports, HTTPS upstream, troubleshooting)

Security

Codex can read, write, and execute code on your machine.
Buffaly Codex Embedded makes it dramatically easier and more pleasant to use - so we made security first-class: localhost-only by default, optional auth token, and Tailscale-only publishing recommended.

Do not expose it to the public internet.

Recommended: bind to 127.0.0.1 only and publish privately via Tailscale Serve.

WebSocket connections require an auth token by default.

More: docs/security.md (threat model, safe deployment patterns, troubleshooting)

Configure After Install

You can edit defaults in:

  • %LOCALAPPDATA%\Buffaly.CodexEmbedded\versions\<active-version>\apps\cli\appsettings.json
  • %LOCALAPPDATA%\Buffaly.CodexEmbedded\versions\<active-version>\apps\web\appsettings.json

Most common settings:

  • CodexPath: command/path for Codex executable (default: codex)
  • DefaultCwd: default working folder
  • TimeoutSeconds or TurnTimeoutSeconds
  • log paths (LogFilePath, LogRootPath)

When you update, installer keeps your existing appsettings.json files.

πŸ‘©β€πŸ’» For Developers & Maintainers

Contributing

Ideas, bug reports, and patches are welcome.

Good first contributions:

  • Improve docs and screenshots.
  • Add small UX improvements in the web UI.
  • Make install and update flows more robust.
  • Add tests around protocol edge cases and session recovery.

How to contribute:

  1. Fork the repo and clone your fork.
  2. Create a branch.
  3. Run the web host from source (see Build From Source (Developer) below).
  4. Open a PR with a clear description and screenshots when applicable.

If you are not sure where to start, open an issue describing your workflow and what you wish Codex UI did better.

Embed Codex in Your .NET App

This repo includes a reusable library, Buffaly.CodexEmbedded.Core, that starts codex app-server and speaks JSON-RPC over JSONL. Use it to embed Codex sessions into your own .NET app (console, service, web app, etc.).

Prereqs:

  • Install the codex CLI and run codex login.
  • Ensure codex --version works in the environment your app runs in.

Add a reference:

  • Same solution: add a project reference to Buffaly.CodexEmbedded.Core/Buffaly.CodexEmbedded.Core.csproj.
  • Different solution: build this repo and reference Deploy/Buffaly.CodexEmbedded.Core.dll.

Minimal example:

using Buffaly.CodexEmbedded.Core;

await using var client = await CodexClient.StartAsync(new CodexClientOptions
{
    CodexPath = "codex",
    WorkingDirectory = @"C:\dev\your-workdir",
    // Optional: isolate sessions/auth/skills for your integration
    // CodexHomePath = @"C:\dev\your-app\.codex"
});

var session = await client.CreateSessionAsync(new CodexSessionCreateOptions
{
    Cwd = @"C:\dev\your-workdir",
    Model = null
});

var deltas = new Progress<CodexDelta>(d => Console.Write(d.Text));
var result = await session.SendMessageAsync("Write a short changelog for my last commit.", progress: deltas);
Console.WriteLine();
Console.WriteLine(result.Text);

More:

  • Buffaly.CodexEmbedded.Core/README.md
  • docs/external-core-api-guide.md

Build From Source (Developer)

Prerequisites

  • .NET SDK 9.x
  • Git
  • codex CLI installed/authenticated

Build, test, run

dotnet restore
dotnet build
dotnet test

Run CLI:

dotnet run --project Buffaly.CodexEmbedded.Cli -- run --prompt "Say hello in one sentence"

Run Web host:

dotnet run --project Buffaly.CodexEmbedded.Web

Release Build and Packaging

Manual release commands:

./scripts/release/build.ps1 -Configuration Release
./scripts/release/publish.ps1 -Runtime win-x64 -Configuration Release -OutputRoot artifacts/publish
./scripts/release/package.ps1 -Runtime win-x64 -Version v1.0.0 -Repository <owner/repo> -PublishRoot artifacts/publish -OutputRoot artifacts/release

Generated files:

  • artifacts/release/Buffaly.CodexEmbedded-win-x64-<version>.zip
  • artifacts/release/SHA256SUMS-win-x64-<version>.txt

GitHub Release Automation

Workflow: .github/workflows/release.yml

  • Push tag v* to build/test/publish/package automatically.
  • Assets are attached to the GitHub release for non-technical users to download.

Project Layout

  • Buffaly.CodexEmbedded.Cli: terminal harness
  • Buffaly.CodexEmbedded.Web: browser-based multi-session UI
  • Buffaly.CodexEmbedded.Core: reusable client library
  • scripts/release: maintainer build/publish/package scripts
  • install/package: installer/update/uninstall scripts bundled into release zip

❀️ Discover Buffaly

Loved this experience?
Buffaly is the production-grade version of the same philosophy: local agents you can actually trust in serious work.

β†’ Stop Prompting. Start Programming Your Agents β†’


Part of the Buffaly ecosystem from Intelligence Factory LLC
Built with the same care we put into safe, auditable agents for medicine and other high-trust domains.
Learn more at buffa.ly

Disclaimers

Experimental software. Protocols and schemas may change as Codex evolves.

No warranty. Use at your own risk.

Not affiliated with OpenAI.

Do not run on machines containing secrets you are not willing to expose to a tool-driven agent.

About

Unofficial Windows/Mobile UI for OpenAI Codex - multi-project + phone access, natural editing, image paste. Built by Matt Furnari w/ Buffa.ly.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors