CLI for Vercel Slides API
npm install vslidesCommand-line interface for creating and managing Vercel Slides presentations.
``bash`
npm install -g vslides
Or run directly with npx:
`bash`
npx vslides
`bashFirst time: Login to save credentials (valid for 7 days)
vslides login
Authentication
The CLI uses persistent authentication so you don't need to re-authenticate for every new presentation.
$3
####
vslides loginAuthenticate with your Vercel account. Opens a browser for OAuth authentication. Credentials are cached locally and valid for 7 days.
`bash
vslides login
Opens browser for Vercel OAuth
Credentials saved to ~/.vslides/auth.json
`####
vslides logoutSign out and revoke your cached credentials.
`bash
vslides logout
`####
vslides whoamiShow your current authentication status.
`bash
vslides whoami
Output: Logged in as user@vercel.com
Expires: 2/4/2026 (7 days remaining)
Validate token with server
vslides whoami --validate
`$3
1. First-time setup: Run
vslides login to authenticate via Vercel OAuth
2. Credentials cached: Token stored in ~/.vslides/auth.json (valid for 7 days)
3. Automatic use: vslides init uses cached credentials to skip OAuth flow
4. Expiration: After 7 days, run vslides login again$3
- Credentials stored in
~/.vslides/auth.json with restricted permissions (600)
- Directory ~/.vslides/ created with mode 700
- Tokens can be revoked server-side via vslides logout
- Only @vercel.com email addresses are authorizedSession Management
####
vslides initCreate a new presentation session. If you're logged in, the session is created immediately without OAuth. Otherwise, you'll need to authenticate in the browser.
`bash
vslides init
If logged in: Creates authenticated session immediately
If not logged in: Provides AUTH_URL for browser authentication
`Output files created:
-
.vslides.json - Session configuration (do not commit)
- .vslides-guide.md - Layout reference guide
- slides.md - Your presentation (starter template if none exists)####
vslides checkCheck session status. Use
--wait to poll until the sandbox is ready.`bash
Check current status
vslides checkWait for sandbox to be ready (60s timeout)
vslides check --waitRun in background
vslides check --wait &
`####
vslides previewShow or open the preview URL.
`bash
Print preview URL
vslides previewOpen in browser
vslides preview --open
`Content Management
####
vslides pushUpload your local
slides.md to the server.`bash
Push changes
vslides pushForce push (bypass version check)
vslides push --force
`####
vslides getDownload the current slides from the server.
`bash
vslides get
`####
vslides syncSmart bidirectional sync. Checks for remote changes before pushing.
`bash
vslides sync
`####
vslides guidePrint the slide layout guide.
`bash
Print cached guide
vslides guideForce refresh from server
vslides guide --refresh
`Collaboration
####
vslides shareGet a join URL for collaborators.
`bash
vslides share
Output: JOIN_URL: https://...
`####
vslides join Join a shared session.
`bash
vslides join https://slidev-server.vercel.app/join/abc123
`Assets
####
vslides upload Upload an image or media file.
`bash
vslides upload logo.png
Output: Use in slides as:
image: /assets/logo.png
`Supported formats:
.jpg, .jpeg, .png, .gif, .svg, .webp, .icoExport
####
vslides export Export presentation to PDF or PPTX.
`bash
vslides export pdf
vslides export pptx
`Deploy
####
vslides deployDeploy presentation as a permanent static site. The deployed URL works without the sandbox running and loads faster.
`bash
vslides deploy
Output:
DEPLOYED: https://slidev-server.vercel.app/static/happy-blue-ocean
VERSION: 5
DEPLOYED_AT: 2026-01-28T12:00:00.000Z
`Benefits:
- Permanent URL that doesn't expire
- Fast loading (no sandbox startup)
- Works even after sandbox times out
- Can be embedded in docs/wikis
Version History
####
vslides historyList saved versions.
`bash
vslides history
Output:
VERSION TIMESTAMP
3 2026-01-28 10:30:00
2 2026-01-28 10:15:00
1 2026-01-28 10:00:00
`####
vslides revert Revert to a previous version.
`bash
vslides revert 2
`Configuration
$3
| Variable | Description | Default |
|----------|-------------|---------|
|
VSLIDES_API_URL | API server URL | https://slidev-server.vercel.app |$3
| File | Location | Description |
|------|----------|-------------|
|
auth.json | ~/.vslides/ | Cached authentication credentials |
| .vslides.json | Project directory | Session configuration |
| .vslides-guide.md | Project directory | Layout reference guide |
| slides.md | Project directory | Your presentation |Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Conflict (version mismatch, not running) |
| 2 | Authentication required |
| 3 | Network error |
| 4 | Validation error |
Troubleshooting
$3
Your authentication has expired. Run:
`bash
vslides login
vslides init
`$3
You need to complete the OAuth flow:
`bash
vslides check --wait &
Open AUTH_URL in browser and authenticate
`$3
Another collaborator pushed changes. Run:
`bash
vslides get
Review changes in slides.md
vslides push
`Or use sync for automatic handling:
`bash
vslides sync
`$3
Sessions expire after 45 minutes of inactivity. Create a new session:
`bash
rm .vslides.json
vslides init
`Library Commands
Share and reuse curated slide content across presentations.
| Command | Description |
|---------|-------------|
|
vslides library list | List library items |
| vslides library search | Search library |
| vslides library publish | Publish presentation to library |
| vslides library import | Import library item |
| vslides library status | Check import status |
| vslides library upgrade [id] | Upgrade imports |
| vslides library tags | List taxonomy values |
| vslides library info | Show item details |$3
`bash
Interactive (prompts for metadata)
vslides library publishWith flags
vslides library publish \
--name "ISR Deep Dive" \
--department "Engineering" \
--audience "Developers" \
--product "Next.js"
`$3
`bash
Import a library item
vslides library import Creates:
- ./library/.md (the slide content)
- .vslides-library.json (dependency tracking)
`Add to your slides.md:
`markdown
---
src: ./library/.md
---
`$3
`bash
Show import status
vslides library statusUpgrade specific item
vslides library upgrade Upgrade all
vslides library upgrade --all
`$3
| File | Location | Purpose |
|------|----------|---------|
|
library/*.md | Project directory | Imported library content |
| .vslides-library.json | Project directory | Dependency tracking |Slide Format
Slides use Markdown with YAML frontmatter:
`markdown
---
title: My Presentation
------
layout: 1-title
variant: title
---
Welcome
Your presentation starts here
---
layout: 2-statement
variant: large
---
Make a Statement
This is where your content goes
`Run
vslides guide` for the complete layout reference.