No project description provided
Project description
Universal Initializer
A versatile tool for initializing software projects from templates. Create React, Python, C++, Node.js, iOS, Android, and more projects with a single command.
Features
- Configurable template-based project creation
- Support for multiple project types (React, Vue, Flutter, and many more)
- Parameter-based customization
- Variable replacement in template files
- Post-processing support for additional setup tasks
- JSON output for integration with other tools
Installation
# Install with pip
pip install universalinit
# Or install directly from source
git clone https://github.com/Kavia-ai/universalinit.git
cd universalinit
pip install -e .
Usage
Create a new project using the command-line interface:
uniinit --name my-app --type react --output ./my-app --author "Your Name" --parameters typescript=true,styling_solution=styled-components
Command Options
| Option | Description | Example |
|---|---|---|
--author |
Project author (Required) | --author "Your Name" |
--config |
Path to JSON config file | --config ./my-config.json |
--description |
Project description | --description "An awesome app" |
--name |
Project name (Required) | --name my-awesome-app |
--output |
Output directory path (Required) | --output ./my-app |
--parameters |
Additional parameters as key=value pairs | --parameters typescript=true,styling_solution=styled-components |
--type |
Project type (Required) | --type react |
--version |
Project version | --version 0.1.0 |
Available Project Types
android: Android applicationandroidtv: Android TV (Kotlin) applicationangular: Angular applicationastro: Astro websitedjango: Django backenddotnet: .NET applicationexpress: Express backendfastapi: FastAPI backendflask: Flask backendflutter: Flutter applicationkotlin: Kotlin applicationlightningjs: LightningJS Blits applicationmongodb: MongoDB databasemysql: MySQL databasenative: C++ native applicationnativescript: NativeScript applicationnextjs: Next.js applicationnuxt: Nuxt.js applicationpostgresql: PostgreSQL databaseqwik: Qwik applicationreact: React applicationreactnative: React Native applicationremix: Remix applicationremotion: Remotion video projectslidev: Slidev presentationsolananextjs: Solana Next.js applicationspringboot: Spring Boot backendsqlite: SQLite databasesvelte: Svelte applicationtizen: Samsung Tizen TV (React) applicationtypescript: TypeScript applicationvite: Vite applicationvue: Vue application
Parameter Examples
React Project
uniinit --name my-react-app --type react --output ./my-react-app --author "Your Name" --parameters typescript=true,styling_solution=styled-components
Vue Project
uniinit --name myservice --type vue --output ./myservice --author "Your Name"
Flutter Project
uniinit --name my-flutter-app --type flutter --output ./my-flutter-app --author "Your Name"
Android Project
uniinit --name my-android-app --type android --output ./my-android-app --author "Your Name" --parameters min_sdk=24,target_sdk=34,gradle_version=8.12
Android TV Project
uniinit --name my-android-tv-app --type androidtv --output ./my-android-tv-app --author "Your Name" --parameters min_sdk=24,target_sdk=35
Tizen TV Project
uniinit --name my-tizen-tv-app --type tizen --output ./my-tizen-tv-app --author "Your Name"
Astro Project
uniinit --name my-astro-site --type astro --output ./my-astro-site --author "Your Name" --parameters typescript=true
Next.js Project
uniinit --name my-nextjs-app --type nextjs --output ./my-nextjs-app --author "Your Name" --parameters typescript=true,styling_solution=tailwind
Solana Next.js Project
uniinit --name my-solana-nextjs-app --type solananextjs --output ./my-solana-nextjs-app --author "Your Name" --parameters typescript=true,styling_solution=tailwind
Nuxt Project
uniinit --name my-nuxt-app --type nuxt --output ./my-nuxt-app --author "Your Name"
NativeScript Project
uniinit --name my-ns-app --type nativescript --output ./my-ns-app --author "Your Name" --parameters typescript=true
Slidev Project
uniinit --name my-slides --type slidev --output ./my-slides --author "Your Name"
Svelte Project
uniinit --name my-svelte-app --type svelte --output ./my-svelte-app --author "Your Name" --parameters typescript=true,styling_solution=css
Remix Project
uniinit --name my-remix-app --type remix --output ./my-remix-app --author "Your Name" --parameters typescript=true,styling_solution=tailwind
TypeScript Project
uniinit --name my-ts-app --type typescript --output ./my-ts-app --author "Your Name"
Remotion Project
uniinit --name my-remotion-app --type remotion --output ./my-remotion-app --author "Your Name"
Angular Project
uniinit --name my-angular-app --type angular --output ./my-angular-app --author "Your Name"
Qwik Project
uniinit --name my-qwik-app --type qwik --output ./my-qwik-app --author "Your Name"
Vite Project
uniinit --name my-vite-app --type vite --output ./my-vite-app --author "Your Name" --parameters typescript=true,framework=react
Django Project
uniinit --name my-django-app --type django --output ./my-django-app --author "Your Name"
Express Project
uniinit --name my-express-app --type express --output ./my-express-app --author "Your Name" --parameters typescript=true
FastAPI Project
uniinit --name my-fastapi-app --type fastapi --output ./my-fastapi-app --author "Your Name"
Flask Project
uniinit --name my-flask-app --type flask --output ./my-flask-app --author "Your Name"
Springboot Project
uniinit --name my-springboot-app --type springboot --output ./my-springboot-app --author "Your Name"
JSON Configuration
Instead of command-line parameters, you can use a JSON configuration file:
{
"name": "my-app",
"version": "1.0.0",
"description": "My awesome application",
"author": "Your Name",
"project_type": "react",
"output_path": "./my-app",
"parameters": {
"typescript": true,
"styling_solution": "styled-components"
}
}
Then use:
uniinit --config ./my-config.json
Environment Variable Mapping (env.template Syntax)
Framework templates can define how environment variables are mapped using an env.template file. This allows you to control how your common environment variables are translated to framework-specific ones.
Syntax
There are two supported mapping syntaxes:
1. Direct Mapping
Map a specific framework environment variable to a common variable:
FRAMEWORK_SPECIFIC_VAR = COMMON_VAR
Example:
REACT_CUSTOM_PREFIX_SAMPLE_ENV_FOR_UNIINIT = SAMPLE_ENV_FOR_UNIINIT
2. Wildcard Mapping (Prefix)
Map all common environment variables to a framework-specific prefix using a wildcard:
FRAMEWORK_PREFIX_* = *
Example:
REACT_APP_* = *
This will map any common environment variable (e.g. DATABASE_URL) to a framework variable with the prefix (e.g. REACT_APP_DATABASE_URL).
3. Wildcard Mapping (Complex)
You can also use wildcards in both the framework and common variable names for more advanced mapping:
FRAMEWORK_PATTERN_*_SUFFIX = *_COMMON_PATTERN
Example:
API_*_KEY = *_API_KEY
This will map USER_API_KEY to API_USER_KEY.
Example env.template
# Direct mapping
REACT_CUSTOM_PREFIX_SAMPLE_ENV_FOR_UNIINIT = SAMPLE_ENV_FOR_UNIINIT
# Wildcard mapping (prefix)
REACT_APP_* = *
Notes
- You can combine direct and wildcard mappings in the same file.
- Only prefix and complex wildcard patterns are supported (not suffix-only patterns).
- Unknown variables not covered by any mapping will be ignored.
FAQ
How is Android TV different from Tizen?
Android TV apps target the Android ecosystem and use standard Android tooling with TV-specific APIs, such as Leanback and Jetpack TV libraries. The androidtv template initializes a Kotlin-based Android project configured for TV with the correct launcher category and SDK levels. Tizen is a separate Samsung TV operating system with different tooling and packaging. The new tizen template creates a minimal React-based Tizen web app scaffold, suitable as a base for generating a .wgt package.
Development
Running Tests
# Install dev dependencies
pip install pytest
# Run tests
pytest
Adding New Templates
- Create a new directory in
src/universalinit/templates/for your template - Add a
config.ymlfile with template configuration - Add new template type in
ProjectTypeenum insrc/universalinit/templateconfig.py - Add new replaceable parameters if necessary in the function
ProjectConfig.get_replaceable_parametersinsrc/universalinit/templateconfig.py - Add new environment parameters if necessary in the function
TemplateConfigProvider.get_init_infoinsrc/universalinit/templateconfig.py - Add new template at
TEMPLATE_MAPinsrc/universalinit/templates.py - Register the template class in the
ProjectInitializerconstructor insrc/universalinit/universalinit.py - Create a new template class in
src/universalinit/universalinit.py - Update the epilog in
maininsrc/universalinit/cli.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file universalinit-0.1.100.tar.gz.
File metadata
- Download URL: universalinit-0.1.100.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.11.12 Darwin/25.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fe698a38bd532f90560652c39bc246acfeb89756f93bea198a33492738a4b8b
|
|
| MD5 |
18967f80aa9bc0b3d639a65f3f16abac
|
|
| BLAKE2b-256 |
2ec4cd53339f135ea8aa8f701ca6faae57724e3ff807e98078b547a553fc6ffe
|
File details
Details for the file universalinit-0.1.100-py3-none-any.whl.
File metadata
- Download URL: universalinit-0.1.100-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.11.12 Darwin/25.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc82fc8579de5bff86e8ad3e3a243e1964eb4ec5a62d71b9a47f4c39e496e81b
|
|
| MD5 |
9c862753b4c1d087f4bc141924de78c8
|
|
| BLAKE2b-256 |
602caa374ad578dd52de53cf0c4dd99de12af8958fab3be33bde63c7a87ff3b6
|