Source: vercel/vercel#14972
Pain
Piping a multiline secret (private keys, certs, JSON service-account files) to vercel env add truncates everything after the first \n. Common case: cat service-account.json | vercel env add GOOGLE_KEY production stores only the first line. Users discover this at runtime when auth fails.
Our solution
Detect multiline stdin in avercel env add and warn loudly BEFORE forwarding: ⚠️ avercel: stdin contains N newlines — vercel CLI will truncate. Using REST API instead.
Use the same REST API path as NEBULA-92 to upload the full multiline value (REST API accepts \n in value field correctly).
Add avercel env add NAME --file path/to/secret shorthand (reads file binary, sends via REST API). Mirrors the official documented vercel env add NAME env < file pattern but for non-interactive use.
DoD
[ ] Multiline detection in stdin
[ ] Auto-route multiline values to REST API
[ ] --file flag for explicit file upload
[ ] Test with: PEM private key, JSON service account, multiline cert chain
Migrated from NEBULA-93 | Parent: NEBULA-18 | Original status: To Do
Source: vercel/vercel#14972⚠️ avercel: stdin contains N newlines — vercel CLI will truncate. Using REST API instead.
Pain
Piping a multiline secret (private keys, certs, JSON service-account files) to vercel env add truncates everything after the first \n. Common case: cat service-account.json | vercel env add GOOGLE_KEY production stores only the first line. Users discover this at runtime when auth fails.
Our solution
Detect multiline stdin in avercel env add and warn loudly BEFORE forwarding:
Use the same REST API path as NEBULA-92 to upload the full multiline value (REST API accepts \n in value field correctly).
Add avercel env add NAME --file path/to/secret shorthand (reads file binary, sends via REST API). Mirrors the official documented vercel env add NAME env < file pattern but for non-interactive use.
DoD
[ ] Multiline detection in stdin
[ ] Auto-route multiline values to REST API
[ ] --file flag for explicit file upload
[ ] Test with: PEM private key, JSON service account, multiline cert chain
Migrated from NEBULA-93 | Parent: NEBULA-18 | Original status: To Do