@vdigitalize-cli/viewportly
v1.1.0
Published
Local-first responsive viewport testing CLI with cloud sync
Downloads
358
Maintainers
Readme
Viewportly CLI
Local-first responsive viewport testing tool powered by Playwright.
Install
npm install -g viewportlyQuick Start
# Authenticate (optional, for cloud sync)
viewportly login
# Run local test
viewportly run http://localhost:3000
# Run with cloud sync
viewportly run http://localhost:3000 --sync
# Specific viewports
viewportly run http://localhost:3000 --viewports mobile-small,tablet,desktop
# Network throttling
viewportly run http://localhost:3000 --network slow-4g
# Full page screenshots
viewportly run http://localhost:3000 --full-page
# Open report after test
viewportly run http://localhost:3000 --open-report
# Open latest local report
viewportly report open
# View current config
viewportly configCommands
| Command | Description |
|---------|-------------|
| viewportly login | Authenticate with API token |
| viewportly logout | Remove stored credentials |
| viewportly whoami | Show current user |
| viewportly run <url> | Capture screenshots |
| viewportly report open | Open latest report |
| viewportly config | Show configuration |
Default Viewports
| Name | Slug | Size | |------|------|------| | Mobile Small | mobile-small | 375×667 | | Mobile Large | mobile-large | 430×932 | | Tablet | tablet | 768×1024 | | Laptop | laptop | 1366×768 | | Desktop | desktop | 1440×900 |
Network Profiles
none— No throttling (default)fast-4g— Fast 4Gslow-4g— Slow 4G3g— 3G connection
Configuration
Config stored at ~/.viewportly/config.json
Environment variables:
VIEWPORTLY_API_BASE_URL— API endpoint (default: http://localhost:8000/api)VIEWPORTLY_APP_BASE_URL— Web app URL (default: http://localhost:5173)
Development
npm install
npm link
viewportly --help