app generate extension
app generate extension
creates new extension functionality within your app, with standardized code structure and configuration files.
Syntax
bash
genstore app generate extension [options]
Use cases
- Extension Development: Create standardized extension frameworks.
- Multi-Extension Management: Organize extensions in separate directories.
- Automated Configuration: Generate compliant extension configuration files automatically.
Extension structure
New extensions are created in the extensions/
directory:
bash
extensions/
└── your-extension-name/
├── genstore.extension.toml # Extension config
├── package.json # Dependencies
└── ... # Extension code
For details about the app structure and configuration files, see App structure
Implementation guide
Prerequisites
- Execute from app root.
- Determine extension type.
- Prepare extension name.
Generate extension
bash
genstore app generate extension
The system will prompt for:
- Choose extension type
- Set extension name
- Configure required parameters
Next steps
- Navigate to extension directory.
- Install dependencies (if needed).
- Begin extension development.
Configuration options
bash
--client-id <value>
- Environment variable:
GENSTORE_FLAG_CLIENT_ID
- Use: Specify an existing Genstore app's client ID.
- Effect: Create in specified app.
bash
--reset
- Environment variable:
GENSTORE_FLAG_RESET
- Use: Clear saved settings.
- Effect: Fresh configuration
bash
-c, --config <value>
- Environment variable:
GENSTORE_FLAG_APP_CONFIG
- Use: Specify config name.
- Effect: Environment-specific generation.
Examples
Use the client ID option
bash
genstore app generate extension --client-id your-client-id
Use environment variable
bash
export GENSTORE_FLAG_CLIENT_ID=your-client-id
genstore app generate extension