seakleang-codex-setup
v1.0.30
Published
Configure an isolated SLAI Codex home for Codex CLI and Codex App
Readme
Seakleang Codex Setup
Set up an isolated SLAI profile for Codex without changing your normal Codex profile.
After setup, you get three commands:
| Command | Use it for |
| --- | --- |
| codex-slai | Codex CLI with SLAI |
| codex-slai-app | Codex App with SLAI |
| codex-slai-vscode | VS Code with the Codex extension using SLAI |
Your normal codex command and default Codex data stay separate.
Install
Run:
npx seakleang-codex-setupThe setup asks for your SLAI_API_KEY, creates ~/.codex-slai, writes the SLAI provider config, and creates the launcher commands.
You can also choose whether to import old Codex conversations and project state from ~/.codex into the isolated SLAI profile. The original ~/.codex data is not changed.
Daily Use
Use normal Codex as usual:
codexUse SLAI with Codex CLI:
codex-slaiUse SLAI with Codex App:
codex-slai-appOpen a project in VS Code with the Codex extension using SLAI:
codex-slai-vscode /path/to/projectThe VS Code launcher starts a separate VS Code user profile for SLAI while reusing your normal VS Code extensions directory.
What Setup Creates
The isolated SLAI profile lives in ~/.codex-slai and includes:
| Path | Purpose |
| --- | --- |
| ~/.codex-slai/config.toml | SLAI Codex model/provider config |
| ~/.codex-slai/.env | SLAI_API_KEY |
| ~/.codex-slai/auth.json | Codex auth data for SLAI |
| ~/.codex-slai/electron-user-data | Separate Codex App profile |
| ~/.codex-slai/vscode-user-data | Separate VS Code user profile for SLAI |
The generated SLAI provider config uses:
[model_providers.slai]
name = "SLAI"
base_url = "https://api.slai.shop/v1"
wire_api = "responses"
env_key = "SLAI_API_KEY"Platform Support
The setup script supports macOS, Ubuntu/Linux, and Windows when run with Node.js.
| Platform | Launcher location |
| --- | --- |
| macOS / Ubuntu / Linux | ~/.local/bin |
| Windows | %LOCALAPPDATA%\Microsoft\WindowsApps |
On macOS and Ubuntu/Linux, the launchers are:
~/.local/bin/codex-slai
~/.local/bin/codex-slai-app
~/.local/bin/codex-slai-vscodeOn Windows, the launchers are:
codex-slai.cmd
codex-slai-app.cmd
codex-slai-vscode.cmdIf ~/.local/bin is not in your shell PATH, add it:
export PATH="$HOME/.local/bin:$PATH"For Bash on Ubuntu, make it permanent and reload your shell:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcOr run the launcher by full path:
~/.local/bin/codex-slai-vscode /path/to/projectImporting Old Conversations
If you approve the import prompt, setup copies compatible Codex data from ~/.codex into ~/.codex-slai, including:
- Codex App workspace state and prompt history
- session and archived session files
- compatible SQLite thread databases
- project conversation hints used by Codex App
Copied legacy provider metadata is relabeled to slai, and copied rollout paths are repointed into ~/.codex-slai so the isolated profile can open the imported conversations.
For non-interactive setup, use:
SLAI_COPY_OLD_CONVERSATIONS=y npx seakleang-codex-setupIf SLAI_COPY_OLD_CONVERSATIONS is not set during a non-interactive run, old conversation import is skipped.
Full SQLite conversation migration requires a Node.js version that includes node:sqlite. If node:sqlite is unavailable, setup still writes credentials, config, and launchers, but skips SQLite database migration.
Notes
- Keep your SLAI API key private. Anyone with the raw key can use your account credits.
codex-slai-appuses a separate Electron profile so it does not reuse the default Codex App instance.codex-slai-vscodeuses a separate VS Code user profile so the Codex extension can read the SLAI environment from process startup, while reusing your normal VS Code extension installs from~/.vscode/extensions.- If you rerun setup, existing SLAI config, sessions, copied metadata, and app state are updated or merged without overwriting SLAI-only data.
- The original
~/.codexconfig and databases are never relabeled by this setup flow.
Remove
On macOS, Ubuntu, or Linux, delete:
rm -rf ~/.codex-slai ~/.local/bin/codex-slai ~/.local/bin/codex-slai-app ~/.local/bin/codex-slai-vscodeOn Windows, delete:
%USERPROFILE%\.codex-slai
%LOCALAPPDATA%\Microsoft\WindowsApps\codex-slai.cmd
%LOCALAPPDATA%\Microsoft\WindowsApps\codex-slai-app.cmd
%LOCALAPPDATA%\Microsoft\WindowsApps\codex-slai-vscode.cmdLicense
MIT (c) Seakleang
