
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
@capacitor/cli
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 2 instances in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Socket optimized override available
@capacitor/cli is a command-line interface tool for Capacitor, a cross-platform native runtime that makes it easy to build web apps that run natively on iOS, Android, and the web. The CLI provides commands to create, build, and manage Capacitor projects.
Creating a new Capacitor project
This command initializes a new Capacitor project. It sets up the necessary files and directories to start building a cross-platform application.
npx @capacitor/cli create
Adding a native platform
This command adds the iOS platform to your Capacitor project, allowing you to build and run your app on iOS devices.
npx cap add ios
Building the web assets
This command builds the web assets of your Capacitor project. It compiles the web code and prepares it for deployment to native platforms.
npx cap build
Syncing the project
This command synchronizes the web assets and native platform code. It ensures that the latest web code is copied to the native project directories.
npx cap sync
Opening the native IDE
This command opens the native Android project in Android Studio. It allows you to make native code changes and run the app on an Android emulator or device.
npx cap open android
Apache Cordova is a mobile application development framework that allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development. It provides a set of APIs to access native device functions. Compared to @capacitor/cli, Cordova has been around longer and has a larger plugin ecosystem, but Capacitor offers a more modern development experience and better integration with modern web frameworks.
React Native CLI is a command-line interface for React Native, a framework for building native apps using React. It provides commands to create, build, and run React Native projects. Unlike @capacitor/cli, which focuses on web technologies and cross-platform development, React Native CLI is specifically designed for building native mobile apps with React.
Expo CLI is a command-line tool for Expo, a framework and platform for universal React applications. It provides a set of tools and services to build, deploy, and manage React Native apps. Expo CLI simplifies the development process by providing a managed workflow, but it may have limitations compared to @capacitor/cli in terms of accessing native device features directly.
The Capacitor command-line interface should be installed locally and executed through npm
scripts.
npm install @capacitor/cli --save-dev
Consult the Getting Started guide for information on using the CLI and Capacitor scripts.
7.1.0 (2025-03-12)
FAQs
Capacitor: Cross-platform apps with JavaScript and the web
The npm package @capacitor/cli receives a total of 345,401 weekly downloads. As such, @capacitor/cli popularity was classified as popular.
We found that @capacitor/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.