create-webview-cli
v1.0.6
Published
CLI to generate WebView projects
Readme
create-webview-cli
Overview
create-webview-cli is a command-line tool that helps you quickly scaffold new Expo applications with WebView integration. It's designed to streamline the process of creating mobile apps that display web content within a native WebView component.
Features
- ⚡ Fast Setup - Generate a complete Expo WebView project in seconds
- 🎨 Customizable - Configure app name, package name, and WebView URL
- 🖼️ Icon Support - Optional custom app icons
- 📦 Flexible Dependencies - Choose your preferred package manager (pnpm, npm, yarn)
- 🎯 TypeScript Ready - Built with TypeScript for type safety
- 💅 Beautiful CLI - Modern command-line experience with colors and spinners
Installation
pnpm create webview-cli@latestOr use npx:
npx create-webview-cli@latestUsage
Run the CLI without arguments to start the interactive prompt:
pnpm create webview-cliThe CLI will guide you through:
- App Name - Display name for your application
- Project Folder - Directory name for the generated project
- Package Name - Android/iOS package identifier (e.g.,
com.company.app) - WebView URL - The URL to load in the WebView
- Custom Icons - Option to add custom app icons
- Install Dependencies - Choose whether to install dependencies
- Package Manager - Select your preferred package manager
Generated Project
The CLI generates a complete Expo project with:
app.json- Expo configuration with your app settings- WebView component - Ready-to-use WebView integration
- Asset handling - Icons and splash screen support
- All Expo dependencies pre-configured
Quick Start
After generating your project:
cd your-project-name
pnpm install
pnpm expo install
pnpm startRequirements
- Node.js 18+
- pnpm (recommended), npm, or yarn
- Expo CLI (installed automatically)
Tech Stack
- Node.js - JavaScript runtime
- TypeScript - Type-safe JavaScript
- Commander - CLI framework
- @clack/prompts - Modern prompts
- Kleur - Terminal colors
- Ora - Loading spinners
- Figlet - ASCII banners
Development
# Install dependencies
pnpm install
# Build the project
pnpm build
# Run in development mode
pnpm dev
# Link for local testing
npm link
create-webview-cliLicense
MIT License - feel free to use in your projects.
