Installation Script Support for Containered Environments #143
theepicsaxguy
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Enable users to configure installation/setup scripts that run automatically when setting up repositories or worktrees in containerized environments, similar to how OpenAI Codex handles environment setup scripts.
Problem Statement
When using OpenCode Manager with containerized or remote environments (worktrees), users need a way to:
npm install,pip install -r requirements.txt,go mod download)npm run build,cargo build)Currently, there's no built-in mechanism to automate these setup steps when:
This creates friction similar to what Codex addresses with their local environments feature.
Reference: How OpenAI Codex Implements This
Codex stores setup scripts in
.codex/config.tomlwith the following structure:Key Codex behaviors:
Proposed Approaches:
Some ideas that could work. I'd love to get some feedback.
Approach A: Add to UserPreferences (Global Default)
Where to modify:
shared/src/schemas/settings.ts- AddinstallScriptfield toUserPreferencesSchemabackend/src/services/settings.ts- Settings already handle this schemaPros:
Cons:
Schema addition:
Approach B: Add to Repo Schema (Per-Repository)
Where to modify:
shared/src/schemas/repo.ts- AddinstallScriptfield toRepoSchemashared/src/types/repo.ts- Add typebackend/src/db/queries.ts- Handle new fieldbackend/src/db/migrations.ts- Add migration for new columnPros:
Cons:
Schema addition:
Approach C: Hybrid - Global + Per-Repo Override
Implementation:
Pros:
Cons:
Approach D: Detect from Repository (Codex-style)
Where to modify:
package.json→npm installrequirements.txt/pyproject.toml→pip installgo.mod→go mod downloadCargo.toml→cargo buildpom.xml/build.gradle→ Maven/Gradle commandsPros:
Cons:
Beta Was this translation helpful? Give feedback.
All reactions