feat: one-command setup scripts for macOS/Linux and Windows - #27
Open
jcartagenamartinez-legaltech wants to merge 3 commits into
Open
feat: one-command setup scripts for macOS/Linux and Windows#27jcartagenamartinez-legaltech wants to merge 3 commits into
jcartagenamartinez-legaltech wants to merge 3 commits into
Conversation
Adds scripts/setup.sh (macOS/Linux) and scripts/setup.ps1 (Windows) covering the full first-run path in one command: 1. Verify uv, offering to install it from astral.sh if missing (interactive by default; --yes / -Yes for CI or scripted installs) 2. Create .env from .env.example and set LLM_PROVIDER (--provider / -Provider, claude-cli by default, codex-cli supported) 3. uv sync 4. Verify the chosen provider CLI is on PATH, with a login hint for first-time claude-cli users (headless -p calls fail before /login) 5. Run `mirofish doctor` as a final health check The Windows script additionally sets PYTHONUTF8=1 for the session, since Windows' legacy default code page (cp1252) breaks reading UTF-8 input files; full Windows runtime support for the claude-cli provider also needs the fixes proposed separately in amadad#26. README gains a short "one-command setup" block ahead of the existing manual steps, which remain unchanged.
- Document the ExecutionPolicy Bypass invocation (stock Windows blocks .ps1 execution outright — it is the first command the target user will run) in both the script header and the README. - Fail fast with a clear message when stdin is not interactive and --yes/-Yes was not passed, instead of dying on EOF at the uv prompt. - On Windows, explain the known uv sync failure mode (rapidfuzz >=3.14 without cp312 wheels, fix proposed in amadad#26) and its workaround (uv python pin 3.11) instead of a bare "failed". - Read .env back with the same BOM-less UTF-8 used to write it (Get-Content -Raw on PS 5.1 decodes BOM-less files as ANSI and would corrupt non-ASCII values on the read-modify-write cycle). - Gate ANSI colors on a real TTY and honor NO_COLOR; replace the fragile grep-the-header --help with an explicit usage() heredoc. - Show the claude CLI version on Windows too (parity with setup.sh). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
|
Pushed a follow-up commit addressing first-run edge cases found in a self-review pass:
One reviewer note I chose not to adopt: the script intentionally leaves you at the repo root (it is a bootstrap; the printed next step assumes you are there). |
Replaces curl|sh and irm|iex with download-to-temp-file-then-execute: avoids running a partially received stream on connection drops, keeps an inspectable artifact, and (PowerShell) avoids Invoke-Expression scope pollution from the installer script. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
scripts/setup.sh(macOS/Linux) andscripts/setup.ps1(Windows) so afirst-time user gets from
git cloneto a passingmirofish doctorwith asingle command, plus a short "one-command setup" block in the README (the
existing manual steps are unchanged).
Each script:
(interactive by default;
--yes/-Yesfor scripted installs).envfrom.env.exampleand setsLLM_PROVIDER(
--provider/-Provider;claude-cliby default,codex-clisupported)uv syncfirst-time
claude-cliusers (headless-pcalls fail before/login)mirofish doctoras a final health checkThe Windows script additionally sets
PYTHONUTF8=1for the session, sinceWindows' legacy default code page (cp1252) breaks reading UTF-8 input files.
Relationship to #26
Independent and mergeable in any order. Note that full Windows runtime
support for the
claude-cliprovider needs the fixes proposed in #26; thisPR covers the install/bootstrap path (and is where a Windows user would first
land).
Testing
bash -nclean; script logic mirrors the README's manual steps exactly.setup.ps1parses clean under Windows PowerShell 5.1 and follows itsconstraints (no
&&chaining, explicit$LASTEXITCODEchecks, BOM-lessUTF-8 writes).
.envrewrite, provider detection paths).🤖 Generated with Claude Code