Skip to main content

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 application
  • angular: Angular application
  • astro: Astro website
  • flutter: Flutter application
  • nativescript: NativeScript application
  • nextjs: Next.js application
  • nuxt: Nuxt.js application
  • qwik: Qwik application
  • react: React application
  • remix: Remix application
  • remotion: Remotion video project
  • slidev: Slidev presentation
  • svelte: Svelte application
  • typescript: TypeScript application
  • vite: Vite application
  • vue: 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

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

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

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

Development

Running Tests

# Install dev dependencies
pip install pytest

# Run tests
pytest

Adding New Templates

  1. Create a new directory in src/universalinit/templates/ for your template
  2. Add a config.yml file with template configuration
  3. Add new template type in ProjectType enum in src/universalinit/templateconfig.py
  4. Add new replaceable parameters if necessary in the function ProjectConfig.get_replaceable_parameters in src/universalinit/templateconfig.py
  5. Add new environment parameters if necessary in the function TemplateConfigProvider.get_init_info in src/universalinit/templateconfig.py
  6. Add new template at TEMPLATE_MAP in src/universalinit/templates.py
  7. Register the template class in the ProjectInitializer constructor in src/universalinit/universalinit.py
  8. Create a new template class in src/universalinit/universalinit.py
  9. Update the epilog in main in src/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

universalinit-0.1.11.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

universalinit-0.1.11-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file universalinit-0.1.11.tar.gz.

File metadata

  • Download URL: universalinit-0.1.11.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.6 Darwin/23.5.0

File hashes

Hashes for universalinit-0.1.11.tar.gz
Algorithm Hash digest
SHA256 785374733382c8deb37c978401f82f6903bcacc38b91cc53f84fa19acf483d79
MD5 49b4072318f08935e4df6d9061decc1f
BLAKE2b-256 33aee2ab6195a0421164713a8606c0b136130ba0b8d15f6d7d02e32ceaca4690

See more details on using hashes here.

File details

Details for the file universalinit-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: universalinit-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.6 Darwin/23.5.0

File hashes

Hashes for universalinit-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 126a2ed8a03ad7ab483656fbab4e95799b19a1464799bfd1fdd7e0f4fa4c4c67
MD5 fa8928aa4a13d8d6f2ba7e0ccd999a3b
BLAKE2b-256 c35a50f7cfb0143a25722bdf0505c755b65ebdd69fe178a3c653edc63e38ca3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page