Skip to content

Make plain vercel follow the active profile, move to Bun, add install.sh - #1

Merged
akrupa-appto merged 1 commit into
mainfrom
bun-install-and-global-link
Sep 2, 2026
Merged

Make plain vercel follow the active profile, move to Bun, add install.sh#1
akrupa-appto merged 1 commit into
mainfrom
bun-install-and-global-link

Conversation

@akrupa-appto

Copy link
Copy Markdown
Collaborator

Problem

`vcx profile use pc-style` followed by `vercel whoami` still showed the old account. vcx only passed `--global-config` to the processes it spawned, so the plain `vercel` command kept using its own global login.

Installing also went through npm, and there was no one-line install.

Fix

  • Whenever the active profile changes (`profile use`, first `add`/`login`, `--activate`, or removing the active profile), vcx links Vercel's default global config directory (`/.local/share/com.vercel.cli`, `/Library/Application Support/com.vercel.cli`, `%APPDATA%\xdg.data\com.vercel.cli`) to that profile's directory. An existing real directory is moved to `.before-vcx` once and never deleted. Link failures are a warning, since `vcx ` still works through `--global-config`. `VCX_VERCEL_GLOBAL_DIR` overrides the path.
  • Bun replaces npm: `bun.lock`, `bun run` scripts, CI installs with `bun install --frozen-lockfile`. Tests still execute under Node because that is the runtime the shebang uses.
  • `install.sh`: `curl -fsSL https://raw.githubusercontent.com/akrupa-appto/vcx/main/install.sh | sh`. Installs Bun if missing, then Vercel CLI, then vcx from the latest release (`VCX_REF` overrides). CI runs it on Linux with Bun preinstalled and on macOS without Bun, plus shellcheck.

Version bumped to 0.3.0. The README pins `github:akrupa-appto/vcx#v0.3.0`, so tag `v0.3.0` after merging.

🤖 Generated with Claude Code

…tall.sh

Plain `vercel` ignored `vcx profile use` because vcx only passed
--global-config to its own child processes. vcx now links Vercel's default
global config directory to the active profile so both commands agree.

Also switch the package manager, scripts, CI, and docs from npm to Bun and add
a curl-able install.sh.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@akrupa-appto
akrupa-appto merged commit 996ebcf into main Sep 2, 2026
42 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.

1 participant