Aller au contenu

Vercel CLI Commandes

Copier toutes les commandes Générer PDF

Commandes et workflows Vercel complets pour le déploiement et le développement sans serveur.

Installation et configuration

Command Description
npm install -g vercel Install Vercel CLI globally
yarn global add vercel Install with Yarn
vercel login Login to Vercel account
vercel logout Logout from Vercel
vercel whoami Show current user
vercel --version Show CLI version
vercel --help Show help information

Gestion de projet

Command Description
vercel Deploy current directory
vercel --prod Deploy to production
vercel --prebuilt Deploy prebuilt static files
vercel init Initialize new project
vercel link Link local directory to Vercel project
vercel unlink Unlink project
vercel ls List all deployments
vercel rm <deployment> Remove deployment

Commandements de déploiement

Command Description
vercel deploy Deploy project
vercel --name <name> Deploy with custom name
vercel --target production Deploy to production
vercel --target preview Deploy to preview
vercel --build-env KEY=value Set build environment variable
vercel --env KEY=value Set runtime environment variable
vercel --regions <regions> Deploy to specific regions
vercel --force Force new deployment

Variables d'environnement

Command Description
vercel env ls List environment variables
vercel env add <name> Add environment variable
vercel env rm <name> Remove environment variable
vercel env pull Download environment variables
vercel env pull .env.local Pull to specific file

Gestion de domaine

Command Description
vercel domains ls List all domains
vercel domains add <domain> Add custom domain
vercel domains rm <domain> Remove domain
vercel domains inspect <domain> Inspect domain configuration
vercel alias <deployment> <domain> Set domain alias
vercel alias rm <alias> Remove alias

Configuration du projet

Command Description
vercel projects ls List all projects
vercel projects add <name> Create new project
vercel projects rm <name> Remove project
vercel switch <project> Switch to project
vercel inspect <deployment> Inspect deployment details

Registres et surveillance

Command Description
vercel logs <deployment> View deployment logs
vercel logs --follow Follow logs in real-time
vercel logs --since 1h Show logs from last hour
vercel logs --until 2h Show logs until 2 hours ago
vercel logs --output raw Show raw log output

Gestion des secrets

Command Description
vercel secrets ls List all secrets
vercel secrets add <name> <value> Add secret
vercel secrets rm <name> Remove secret
vercel secrets rename <old> <new> Rename secret

Équipes et organisations

Command Description
vercel teams ls List teams
vercel teams switch <team> Switch to team
vercel teams add <email> Invite team member
vercel teams rm <email> Remove team member

Serveur de développement

Command Description
vercel dev Start local development server
vercel dev --listen 3000 Start on specific port
vercel dev --debug Start with debug mode
vercel dev --confirm Skip confirmation prompts

Gestion DNS

Command Description
vercel dns ls <domain> List DNS records
vercel dns add <domain> <type> <value> Add DNS record
vercel dns rm <record-id> Remove DNS record
vercel dns import <domain> <file> Import DNS records

Certificats

Command Description
vercel certs ls List SSL certificates
vercel certs add <domain> Add SSL certificate
vercel certs rm <cert-id> Remove certificate
vercel certs issue <domain> Issue new certificate

Configuration de construction

Command Description
vercel build Build project locally
vercel --build-env NODE_ENV=production Set build environment
vercel --no-build Skip build process
vercel --debug Enable debug output

Intégration Git

Command Description
vercel git connect Connect Git repository
vercel git disconnect Disconnect Git repository
vercel git ls List connected repositories

Fonctions et itinéraires API

Command Description
vercel functions ls List serverless functions
vercel functions inspect <function> Inspect function details
vercel functions logs <function> View function logs

Déploiement

Command Description
vercel alias ls List all aliases
vercel alias set <deployment> <alias> Set deployment alias
vercel alias rm <alias> Remove alias

Paramètres du projet

Command Description
vercel --scope <team> Run command in team scope
vercel --token <token> Use specific auth token
vercel --global-config <path> Use custom config path
vercel --local-config <path> Use local config file

Déploiement avancé

Command Description
vercel --archive=tgz Create deployment archive
vercel --public Make deployment public
vercel --regions all Deploy to all regions
vercel --regions sfo1,iad1 Deploy to specific regions

Dépannage

Command Description
vercel --debug Enable debug mode
vercel --verbose Enable verbose output
vercel doctor Run diagnostic checks
vercel status Check Vercel service status

Fichiers de configuration

File Description
vercel.json Project configuration
.vercelignore Files to ignore during deployment
.env.local Local environment variables
.env.production Production environment variables

Commandes d'intégration

Command Description
vercel integrations ls List integrations
vercel integrations add <integration> Add integration
vercel integrations rm <integration> Remove integration

Optimisation des performances

Command Description
vercel --prod --regions sfo1 Deploy to single region
vercel --build-env NEXT_TELEMETRY_DISABLED=1 Disable telemetry
vercel --no-clipboard Disable clipboard copy