What LingCode does — and what you set up
LingCode doesn't re-implement each platform's API. It invokes the platform's official CLI (vercel, netlify, railway, fly, or git push heroku) and streams the output into the progress log. That means:
- LingCode checks that the CLI is installed. If not, the UI shows "{platform} CLI not found. Install with: ..." and you can't deploy until you install it.
- You set up auth — either by running the platform's
logincommand once, or by pasting an API token into LingCode's AutoConfig flow. LingCode passes the token as an env var to the CLI.
Two paths to auth for every platform below. Either (a) run the platform's login command in Terminal once and let the CLI remember you, or (b) generate a token from the platform's dashboard and paste it into LingCode's Magic Deploy AutoConfig pane. Option (b) is better for CI-like setups and when you're on a new machine; option (a) is friction-free for your main dev Mac.
Why does each platform have its own CLI? Deploying a web app isn't one problem — it's five different ones stitched together per platform: build detection (is this Next.js or a Rails app?), build execution, artifact packaging, upload, and runtime configuration. Each vendor has their own opinions on every step, so a universal "deploy to anywhere" tool would have to be the intersection of all of them — which is nothing useful. Each platform's CLI encodes that vendor's specific pipeline. LingCode doesn't replace those CLIs; it just invokes them with the right env var for auth and streams the output into one panel.
Vercel
1. Install the CLI
npm i -g vercel
vercel --version # confirm it works
2. Authenticate — pick one
Option A — CLI login (easiest):
vercel login
Opens your browser, confirms via email, stores credentials in ~/.vercel/auth.json. After this, LingCode deploys without any extra config.
Option B — Paste a token into LingCode:
- Go to vercel.com/account/tokens.
- Click Create Token, name it "LingCode", pick a scope (your team), pick an expiry.
- Copy the token (it's only shown once).
- In LingCode Magic Deploy, paste it into the AutoConfig field. LingCode detects it's a Vercel token and sets
VERCEL_TOKENautomatically.
3. Optional: vercel.json
If your project needs custom build settings or rewrites, add a vercel.json at the project root. If you don't have one, Vercel auto-detects the framework and does the right thing for Next.js, Vite, Astro, SvelteKit, Nuxt, Remix, and dozens of others.
4. What LingCode runs
vercel --prod # if authenticated via CLI login
VERCEL_TOKEN=xxx vercel --prod # if you pasted a token
5. Common errors
- "Vercel CLI not found" — you haven't installed it. Run
npm i -g vercel. - "Not authenticated. Please log in with `vercel login`" — neither option A nor B is set up. Pick one.
- "Project not found" — Vercel doesn't have a project linked to this folder. Run
vercel linkonce in Terminal, pick (or create) a project, and retry. - "Token does not have access to this scope" — the token's team scope doesn't include the project's team. Regenerate the token at the right scope.
Netlify
1. Install the CLI
npm i -g netlify-cli
netlify --version
2. Authenticate — pick one
Option A — CLI login:
netlify login
Stores auth in ~/.netlify/state.json.
Option B — Paste a personal access token:
- Go to app.netlify.com/user/applications#personal-access-tokens.
- Click New access token, name it "LingCode".
- Copy the token, paste into LingCode AutoConfig. LingCode sets
NETLIFY_AUTH_TOKEN. - You also need a site ID. In Netlify, open your site → Site settings → copy the API ID (a UUID). Paste that into AutoConfig too — LingCode sets
NETLIFY_SITE_ID.
3. Optional: netlify.toml
Lets you define build command, publish dir, redirects, headers. Example:
[build]
command = "npm run build"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
4. What LingCode runs
netlify deploy --prod --dir=dist
NETLIFY_AUTH_TOKEN=xxx NETLIFY_SITE_ID=yyy netlify deploy --prod --dir=dist
dist is the default output dir; override in netlify.toml if yours is different (e.g. build/ for CRA, out/ for Next static export).
5. Common errors
- "Error: You are not authenticated" — run
netlify loginor paste the token. - "Error: No site id found" — either run
netlify linkto bind the folder to a site, or paste the API ID as above. - "Deploy path not found: dist" — your build didn't produce
dist/. Check your framework's output dir and set it innetlify.toml.
Railway
1. Install the CLI
npm i -g @railway/cli
railway --version
2. Authenticate — pick one
Option A — CLI login:
railway login
Option B — Paste a token:
- Go to railway.app/account/tokens.
- Click Create Token, name it "LingCode".
- Paste into LingCode AutoConfig. LingCode detects the JWT format and sets
RAILWAY_TOKEN.
3. Link the project
Railway needs the folder linked to a project before railway up works. In Terminal, once per project:
railway link
Pick your project from the list. Railway stores the link in .railway/ — don't delete it.
4. Optional: railway.json
Only needed for custom build/start commands. Most Node/Python/Rails projects work with Railway's defaults.
5. What LingCode runs
railway up
RAILWAY_TOKEN=xxx railway up
6. Common errors
- "Project Token not found" — neither
railway loginnor the token has been set. Do one. - "No linked project found" — run
railway linkonce. - "Environment variable missing" — set required env vars in Railway's dashboard (Project → Variables), not locally.
railway upuses the remote env.
Fly.io
1. Install flyctl
brew install flyctl
fly version
2. Authenticate — pick one
Option A — CLI login:
fly auth login
Option B — Paste a token:
- Go to fly.io/user/personal_access_tokens.
- Click Create access token, name it "LingCode", pick an expiry and org scope.
- Copy it (starts with
fo1_orfo2_). Paste into LingCode AutoConfig — setsFLY_API_TOKEN.
Tip: you can also grab a token from the CLI with fly auth token.
3. Required: fly.toml
Unlike the others, Fly requires a fly.toml in the project root — it defines the app name, primary region, VM size, build strategy, and ports. Generate one the first time:
fly launch --no-deploy
This asks a few questions, creates the app in your Fly org, writes fly.toml, and stops without deploying. After this LingCode can deploy.
4. What LingCode runs
fly deploy
FLY_API_TOKEN=xxx fly deploy
5. Common errors
- "Could not find App ..." —
fly.toml'sappname doesn't match an app in your Fly org. Either editfly.tomlor runfly launchfresh. - "We couldn't find a Dockerfile nor detect a buildpack" — Fly doesn't know how to build your project. Add a
Dockerfile, or re-runfly launchand pick a supported buildpack. - "unauthorized" — token expired or revoked. Regenerate at the token page.
- "Machine in unrecoverable state" — usually a bad previous deploy. Run
fly machine listandfly machine destroy <id>to clean up, then retry.
Heroku
1. Install the CLI
brew tap heroku/brew && brew install heroku
heroku --version
2. Authenticate — pick one
Option A — CLI login:
heroku login
Opens a browser for SSO / email confirm.
Option B — Paste the API key:
- Go to dashboard.heroku.com/account.
- Scroll to API Key, click Reveal, copy it.
- Paste into LingCode AutoConfig — sets
HEROKU_API_KEY.
Alternative: heroku auth:token in Terminal prints the same key.
3. Add Heroku as a git remote (critical!)
Heroku is the odd one out — LingCode deploys via git push heroku main:main, so Heroku must be a git remote. Once per project:
heroku create my-app-name # creates app + adds remote
# or, if the app already exists:
heroku git:remote -a my-app-name
4. Optional: Procfile
Tells Heroku how to start your app. Node projects usually auto-detect from package.json's start script. For anything non-standard:
web: node dist/server.js
worker: node dist/worker.js
5. What LingCode runs
git push heroku main:main
HEROKU_API_KEY=xxx git push heroku main:main
6. Common errors
- "fatal: 'heroku' does not appear to be a git repository" — you haven't added the remote. Run
heroku git:remote -a <app>. - "! Your account has no verified credit card" — Heroku requires a verified card even for free-tier apps. Add one at dashboard.heroku.com/account/billing.
- "App not found" — the app name in the git remote doesn't exist or belongs to another account.
- "Push rejected, failed to compile" — your buildpack failed. Scroll up in the log for the actual error. Usually a missing dependency or mismatched Node/Python version in your manifest.
- Uncommitted changes — Heroku only sees what's committed. Commit your latest changes before deploying from LingCode.
Recap: env vars LingCode sets
| Platform | Env var | Token page |
|---|---|---|
| Vercel | VERCEL_TOKEN | vercel.com/account/tokens |
| Netlify | NETLIFY_AUTH_TOKEN + NETLIFY_SITE_ID | app.netlify.com/.../personal-access-tokens |
| Railway | RAILWAY_TOKEN | railway.app/account/tokens |
| Fly.io | FLY_API_TOKEN | fly.io/user/personal_access_tokens |
| Heroku | HEROKU_API_KEY | dashboard.heroku.com/account |
Security: these tokens are the equivalent of your password for each platform. LingCode stores them in UserDefaults and only passes them as env-var prefixes to the platform CLI at deploy time — they never leave your Mac except to the platform itself. Revoke any token from its dashboard if it leaks.
Further reading
Each platform's official CLI / API reference — bookmark whichever you're using:
- LingCode deploy glossary — terms like JWT, OAuth 2.0, and more.
- Vercel CLI · Vercel deployment docs
- Netlify CLI · netlify.toml reference
- Railway CLI · railway.json reference
- flyctl reference · fly.toml reference
- Heroku CLI · Heroku Git deploy
Shipping to a store or your own server?
See the App Store Connect guide (iOS + macOS), the Google Play guide, or the Before-launch & After-deploy script cookbook.
Download LingCode for Mac