Skip to content

feat(install): add a famstack command that works from any directory - #137

Merged
arthware-dev merged 1 commit into
mainfrom
feat/famstack-command
Sep 26, 2026
Merged

arthware-dev merged 1 commit into
mainfrom
feat/famstack-command

Conversation

@arthware-dev

@arthware-dev arthware-dev commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Remote install run: green. script/test remote install feat/famstack-command on 050107a: 11 passed, including "the printed commands work as typed in a new terminal" (no longer xfail). The final screen printed famstack up photos, famstack status, and the reset left the Mac pristine.

Summary

  • The installer puts a famstack command in Homebrew's bin directory: a two-line script that execs this checkout's ./stack, so famstack status works from any directory. The final screen prints famstack ...; when another famstack is already on PATH it is left alone and the screen prints ./stack .... Re-running the installer writes nothing. ./stack is unchanged.
  • stack uninstall removes the command when it is ours and the instance being uninstalled is the checkout's own; a STACK_DIR instance (test run, sandbox) leaves it. The name is fixed, not taken from [core] name.
  • The strict xfail on "the printed commands work as typed in a new terminal" is gone, and that test now runs them from the home directory. The remote lane's reset removes the command it created.

Two changes outside the new module:

  • find_repo_root in lib/stack/cli.py: outside any checkout it now falls back to the checkout the CLI runs from. Before, it only walked up from the working directory, so famstack from ~ failed with "Can't find stack directory". Inside a checkout, and with STACK_DIR set, nothing changes; the fallback does not select an instance.
  • handle_uninstall reused name as a loop variable, so the closing line printed "users.toml uninstalled" instead of the product name. The loop variable is now filename.

Squash merge.

The installer's final screen printed `stack up photos` and `stack
status`, which no shell could run: the launcher is `./stack` and only
works from the checkout.

The installer now puts a `famstack` script in Homebrew's `bin`
directory that execs the checkout's `./stack`, and the final screen
prints `famstack ...`. The name is fixed, so docs, hook messages and
support can state it; `[core] name` does not change it. When another
`famstack` is already on PATH it is left alone and the screen prints
`./stack ...` instead. Running the installer again changes nothing.
`stack uninstall` of the checkout's own instance removes the script if
it is ours, and only then.

The script names the checkout, never the instance: `STACK_DIR` still
selects it. Outside any checkout the CLI now falls back to the checkout
it runs from, so the command finds its stacklets from any directory.
@arthware-dev
arthware-dev merged commit 924b7ae into main Sep 26, 2026
1 check passed
@arthware-dev
arthware-dev deleted the feat/famstack-command branch October 7, 2026 11:51
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.

1 participant