Skip to content

Let mise own .mise.local.toml writes in the ide script#19

Merged
kyleve merged 1 commit into
mainfrom
claude/ide-script-ruby-rewrite-65od55
Jun 11, 2026
Merged

Let mise own .mise.local.toml writes in the ide script#19
kyleve merged 1 commit into
mainfrom
claude/ide-script-ruby-rewrite-65od55

Conversation

@kyleve

@kyleve kyleve commented Jun 11, 2026

Copy link
Copy Markdown
Owner

What

The ide bootstrap script grew a hand-rolled TOML editor — set_team_id() — that munged .mise.local.toml in place with a four-way grep/sed/awk/mktemp branch (no file / key already set / [env] table exists / neither). That was the only genuinely fragile part of the script.

This replaces the whole function with a single mise set --file call, which creates the file and the [env] table as needed:

mise set --file "$LOCAL_MISE" "TUIST_DEVELOPMENT_TEAM=$TEAM_ID"

Why

The original ask was "rewrite ide in Ruby since it's getting long." But the length was almost entirely the in-place TOML editing — the rest is arg parsing and mise exec -- tuist … shell-outs that wouldn't get shorter in Ruby. Rather than take on a Ruby + gem dependency (and a bootstrap chicken-and-egg), the better fix is to stop hand-editing TOML and let mise — already a hard dependency — own its own config file.

Result

  • ide: 102 → 66 lines
  • Removes the sed/awk/mktemp fragility at the source
  • No new dependency

Notes

  • Behavior change: the generated .mise.local.toml no longer gets the explanatory header comments the old heredoc wrote, since mise now writes the TOML. Fine for a gitignored, machine-local file.
  • Not run in CI's absence locally: mise isn't available in the authoring environment, so this was bash-syntax-checked but not executed. Manual check on a dev machine: ./ide --team-id ABCDE12345 --no-open and confirm .mise.local.toml ends up with TUIST_DEVELOPMENT_TEAM under [env].

https://claude.ai/code/session_01G4JWtYvhGrirdefM8LaHbz


Generated by Claude Code

Replace the hand-rolled set_team_id() TOML editor (grep/sed/awk/mktemp
across four edge cases) with a single `mise set --file` call, which
creates the file and [env] table as needed. Drops the script from 102 to
66 lines and removes the in-place TOML-munging fragility.
@kyleve kyleve merged commit e90ac8d into main Jun 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants