Skip to content

Antman2023/codex-writable-root-manager

Repository files navigation

Codex Writable Root Manager

release license

简体中文

A small Tauri 2 desktop app for managing Codex writable roots with a GUI instead of hand-editing config.toml.

Why This Exists

Codex supports additional writable directories, but maintaining them in config files is easy to get wrong, especially when you want to:

  • add or remove directories quickly
  • use environment variables in paths
  • verify that a path actually exists before saving
  • switch between English and Chinese in the UI

This project wraps that workflow in a lightweight desktop app.

Highlights

  • Add writable roots manually from a desktop UI
  • Resolve environment variables before saving
  • Support %VAR%, $VAR, ${VAR}, $env:VAR, and leading ~
  • Preview the resolved path before adding it
  • Validate whether the path exists and is a directory
  • Remove duplicates automatically
  • Import directories from a native folder picker
  • Import directories by drag and drop
  • Keep a local JSON backup snapshot for quick recovery
  • Restore the last saved root list back into the UI before writing to Codex again
  • Switch language between Auto, English, and 中文
  • Switch theme between Auto, Light, and Dark
  • Show the app version in the UI

What It Changes

The app updates the top-level sandbox_workspace_write.writable_roots array in:

  • CODEX_HOME/config.toml, if CODEX_HOME is set
  • ~/.codex/config.toml, otherwise

It is intentionally narrow in scope:

  • it manages the global writable root list only
  • it does not edit project-specific trust settings
  • it writes normalized absolute paths for newly added entries
  • it also stores a local JSON snapshot of the managed root list for recovery
  • restore repopulates the app UI first; it does not silently overwrite Codex config

Current Status

Prebuilt releases are published for Windows/macOS/Linux on GitHub Releases. You can also build from source.

Release

This repo includes a GitHub Actions workflow that builds releases from git tags:

  • Push a tag like v0.2.0 to GitHub
  • The workflow syncs the version from the tag, builds for Windows/macOS/Linux, generates release notes, and publishes a GitHub Release

Build From Source

Requirements:

  • Node.js
  • Rust toolchain
  • Tauri 2 prerequisites for your platform

Install dependencies:

npm install

Run in development mode:

npm run tauri dev

Build the frontend bundle:

npm run build

Check the Rust side:

cargo check --manifest-path src-tauri/Cargo.toml

Tech Stack

  • Tauri 2
  • Vite
  • TypeScript
  • Rust
  • toml_edit

Notes

  • Existing values already present in Codex config are loaded and displayed.
  • New entries are validated before they are saved.
  • English is the default GitHub landing page; the Chinese version lives in README.zh-CN.md.

About

Tauri 2 desktop app to manage Codex writable roots (config.toml) with preview, validation, and backups.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors