# Setup
This guide will walk you through the initial setup of a new Kha Plugins project using the Kha Plugins Command Line Interface (CLI). This process involves defining various parameters for your plugin, which will be used in the KhaCloud platform.
# Prerequisites
Before beginning the setup process, ensure you have successfully installed the Kha Plugins CLI. If you haven't installed it yet, please refer to the Installation Guide.
# Starting a New Project
Initialize a New Project:
- Open your command line interface (CLI).
- Navigate to the directory where you want to create your new plugin project.
- Run the command
khap init
. This command starts the process of creating a new Kha Plugins project.
Provide Project Details: As you run
khap init
, the CLI will prompt you to enter several pieces of information about your plugin:- Name of the plugin: Enter a name for your plugin, for example,
My test project
. This name is used for identification and display purposes. - Key of the plugin: Input a unique key for your plugin, like
mytestproject
. This key is used internally by the system to reference your plugin. - Description of the plugin: Provide a brief description of your plugin, such as
A plugin for the KhaCloud platform
. - URL of the app (Optional): If available, enter the URL of your application, like
https://my-website.com
. This URL is used for linking your plugin to a specific web application. - Token of the app (Optional): Enter the authentication token provided by CyberOcean. This token is necessary for your plugin to interact securely with the KhaCloud platform.
- Token for OpenAI (Optional): If you plan to use OpenAI's GPT-3 API for development within your plugin, enter your OpenAI API key here.
- Admin UI: Specify whether your plugin will have an administrative user interface. Answer
Yes
if it does. - API: Indicate if your plugin will have an API component by answering
Yes
. - Config: Confirm if your plugin requires a configuration file by answering
Yes
.
- Name of the plugin: Enter a name for your plugin, for example,
Project Creation:
- After you provide all the necessary information, the CLI will create the project structure for your new plugin.
- Your new Kha Plugins project is now set up and ready for further development.
Next Steps:
- Navigate to the newly created project directory to begin customizing your plugin.
- Start adding components, defining APIs, setting up the admin UI, and configuring other elements as needed.
# Additional Information
- CyberOcean Credentials: The URL and token for your app are critical for integrating your plugin with the KhaCloud platform. These are provided by CyberOcean and should be kept secure.
- OpenAI Integration: If you intend to use OpenAI's capabilities to create (Models, API routes, Components, Pages, ...), ensure you have a valid API key. This feature can speed up your coding with the help of AI.