### Create a New NativePHP Project Source: https://docs.nativecli.com/getting-started/start-new-project Initializes a new NativePHP project using NativeCLI. This command assumes you are creating a Laravel project and uses Laravel's Installer library. Any arguments supported by Laravel's installer are also supported here. ```bash cd ~/Code nativecli new MyFirstProject ``` -------------------------------- ### Verify NativeCLI Installation Source: https://docs.nativecli.com/getting-started/start-new-project Confirms that NativeCLI is installed and accessible in your system's PATH. This command outputs the installed version of the NativePHP CLI Tool. ```bash nativecli --version # Output: NativePHP CLI Tool x.x.x ``` -------------------------------- ### Install NativeCLI Globally with Composer Source: https://docs.nativecli.com/getting-started/installation This command installs the NativeCLI package globally using Composer, making its commands accessible from any directory in your terminal. ```bash composer global require nativecli/nativecli ``` -------------------------------- ### Create New NativePHP Project (CLI) Source: https://docs.nativecli.com/commands/new This command initiates a new NativePHP project within a specified directory. It installs Laravel and NativePHP, preparing the project for development. Options allow for further customization of the project's setup. ```bash nativecli new ``` ```bash nativecli new MyProject --vue --pest ``` -------------------------------- ### nativecli new Source: https://docs.nativecli.com/commands/new Creates a new NativePHP project in the specified directory. This command installs Laravel and NativePHP, setting up the project for immediate use. It supports numerous options to customize the project setup, including mobile/desktop configuration, versioning, Git integration, starter kits (Vue, React, Livewire), testing frameworks (Pest, PHPUnit), and more. ```APIDOC ## POST /websites/nativecli/new ### Description Creates a new NativePHP project in the specified directory. This command installs Laravel and NativePHP, setting up the project for immediate use. It supports numerous options to customize the project setup, including mobile/desktop configuration, versioning, Git integration, starter kits (Vue, React, Livewire), testing frameworks (Pest, PHPUnit), and more. ### Method POST ### Endpoint /websites/nativecli/new ### Parameters #### Path Parameters - **directory-name** (string) - Required - The name of the directory where the new project will be created. #### Query Parameters - **mobile** (boolean) - Optional - Sets up the project for NativePHP Mobile. - **dev** (boolean) - Optional - Installs the latest development release. - **git** (boolean) - Optional - Initializes a Git repository. - **branch** (string) - Optional - The branch name for the new Git repository (defaults to 'main'). - **github** (boolean) - Optional - Creates a new repository on GitHub. - **organization** (string) - Optional - The GitHub organization to create the repository for. - **database** (string) - Optional - The database driver to use for the application. - **react** (boolean) - Optional - Installs the React Starter Kit. - **vue** (boolean) - Optional - Installs the Vue Starter Kit. - **livewire** (boolean) - Optional - Installs the Livewire Starter Kit. - **livewire-class-components** (boolean) - Optional - Generates stand-alone Livewire class components. - **workos** (boolean) - Optional - Uses WorkOS for authentication. - **pest** (boolean) - Optional - Installs the Pest testing framework. - **phpunit** (boolean) - Optional - Installs the PHPUnit testing framework. - **npm** (boolean) - Optional - Installs and builds NPM dependencies. - **using** (string) - Optional - Installs a custom starter kit from a community package. - **force** (boolean) - Optional - Forces installation even if the directory already exists. ### Request Example ```bash nativecli new MyProject --vue --pest ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the project was created successfully. #### Response Example ```json { "message": "Project MyProject created successfully." } ``` ``` -------------------------------- ### Install NativePHP for iOS (Deprecated) Source: https://docs.nativecli.com/commands/ios-install This command installs the NativePHP for iOS package, preparing a Laravel application for iOS development. It is deprecated and was available until version 1.1.2. Users should now use the `mobile:install` command. The installation requires a NativePHP license. ```bash nativecli ios:install ``` -------------------------------- ### Install NativePHP for Mobile with NativeCLI Source: https://docs.nativecli.com/commands/mobile-install This command installs the NativePHP for Mobile package into your existing Laravel application. It requires a valid NativePHP license and will prompt for license details if the package has not been previously installed. No additional options are available for this command. ```bash nativecli mobile:install ``` -------------------------------- ### Check for NativePHP Updates (CLI) Source: https://docs.nativecli.com/commands/check-update This command checks for available updates for NativePHP. It compares the currently installed version with the latest available version and notifies the user if a newer version is found. This command does not perform the update. ```bash nativecli check-update ``` -------------------------------- ### Get NativeCLI Update Status in JSON Format Source: https://docs.nativecli.com/commands/self-update Retrieves the update status of NativeCLI in JSON format using the --format json option. This is beneficial for programmatic parsing and integration into scripts or other applications. ```bash nativecli self-update --format json ``` -------------------------------- ### Check for NativePHP Updates with JSON Output (CLI) Source: https://docs.nativecli.com/commands/check-update This command checks for available updates for NativePHP and outputs the status in JSON format, which is useful for programmatic integration. It compares the currently installed version with the latest available version. This command does not perform the update. ```bash nativecli check-update --format json ``` -------------------------------- ### Check for NativeCLI Updates Without Updating Source: https://docs.nativecli.com/commands/self-update Uses the --check option to determine if an update is available for NativeCLI without actually performing the update. This allows users to be informed of new versions without immediate installation. ```bash nativecli self-update --check ``` -------------------------------- ### Execute InertiaJS Compatibility Fix Command (Bash) Source: https://docs.nativecli.com/commands/inertia-fix This command is used to fix InertiaJS compatibility issues within a NativePHP for Mobile project. It removes the existing `@inertiajs/*` packages and reinstalls them from a provided patch URL. This command does not accept any additional options. ```bash nativecli inertia:fix ``` -------------------------------- ### Update NativeCLI to Latest Stable Version Source: https://docs.nativecli.com/commands/self-update Executes the self-update command without any arguments to update NativeCLI to the most recent stable release. This is the simplest way to keep the CLI updated. ```bash nativecli self-update ``` -------------------------------- ### Update NativeCLI to a Specific Version Source: https://docs.nativecli.com/commands/self-update Updates NativeCLI to a precisely specified version by providing the version number as an argument. This is useful for rolling back or testing particular releases. ```bash nativecli self-update 1.0.0-beta.2 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.