Skip to content

vercel: link --yes should not pull env vars (add --no-env flag) #7

@exisz

Description

@exisz

Source: vercel/vercel#15713 (1 reaction, open since 2026-03-25)
Pain
vercel link --yes always pulls env vars to .env.local after linking. In CI and agent scenarios this is unwanted: agents linking to test connectivity, devs linking ephemeral preview projects, scripts that want link-only. No flag to skip.
Our solution
avercel link --no-env flag:
Patch the link command in our wrapper

Run vercel link --yes but inject env to redirect output away from .env.local, OR run a stripped-down REST-API-based link (POST to /v9/projects/$ID/link) and write .vercel/project.json ourselves

Skip the env pull step entirely

Add config option avercel.yaml: link.pullEnv: false for project-default

Bonus: avercel link --print — link and print project.json contents to stdout instead of writing files (read-only mode for inspection).
DoD
[ ] --no-env flag works

[ ] Config option link.pullEnv respected

[ ] .env.local is untouched when --no-env is set

[ ] Test with existing .env.local (must be byte-identical after link)


Migrated from NEBULA-96 | Parent: NEBULA-18 | Original status: To Do

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions