An interactive CLI to bootstrap an Electron application.
Interactive CLI (inspired by create-t3-app) to scaffold an Electron application.
Warning
This project was started as a learning exercise and you should use it accordingly.
The best way to implement new features / improve existing functionality is to participate 🙂
Important
This project was developed and tested entirely on macOS.
Note
-
nvm
To ensure compatibility and smooth development, it's generally recommended to use a Node.js version manager. These help you easily switch between Node.js versions as needed for different projects.This project management is integrated with nvm and it is recommended that you have it installed on your machine when using create-electron-foundation or its scaffolded assets.
-
make
This project uses a makefile to build & manage the project. There can be issues with Node.JS installs vs NVM depending on when each were installed.
Important
Please investigate your own system to confirm you have the ability to run a makefile command.
If you are unsure please do not attempt to automatically install packages after scaffolding.
create-electron-foundation scaffolds a project with a sensible default stack, but gives you the flexibility to opt out of what you don't need.
- Framework:
Electron(with a modern main/renderer process setup) - Frontend:
Reactw/TypeScript(viaVite)
You can choose to include:
- Routing:
TanStack RouterorReact Router - Styling:
TailwindorVanilla CSS - Database:
SQLite* - ORM:
Drizzle ORM**(when SQLite is selected)
*optional
**optional : required if Database selected
To create a new Electron application, run the following command in your terminal:
npx create-electron-foundation@latest
npx create-electron-foundation # will call @latest
# to access other builds
npx create-electron-foundation@beta
npx create-electron-foundation@alphaThe CLI will guide you through a few interactive prompts to configure your project.
To skip the prompts and scaffold a project with the default options, use the -y flag:
npx create-electron-foundation -yYou can also customize your project setup directly via command-line arguments.
| Argument | Alias | Description | Options | Default |
|---|---|---|---|---|
[project_name] |
Name of the project (positional) | string | - | |
--project_name |
Name of the project (option) | string | - | |
--router |
Router to use | 'tanstack-router', 'react-router' |
- | |
--styles |
Styles to use | 'tailwind', 'none' |
- | |
--database |
Database to use | 'sqlite', 'none' |
- | |
--orm |
ORM to use | 'drizzle', 'none' |
- | |
--ide |
IDE to use | 'cursor', 'vscode', 'none' |
- | |
--pkg_manager |
Package manager to use | 'npm' |
'npm' |
|
--initialize_git |
--git |
Initialize Git repository | boolean | - |
--install_packages |
Install packages after scaffolding | boolean | - | |
--ci |
Run in CI mode (non-interactive) | boolean | false |
|
-y, --yes |
Skip prompts and use defaults | boolean | false |
|
-h, --help |
Show help | - | - |
This project was built to accelerate my own learning and hopefully help others. Contributions, feedback, and suggestions are highly encouraged!
Please see our Contributing Guide for more details on how to get started.
If you have an idea for an improvement or find a bug, please open an issue or submit a pull request. Your interaction is greatly appreciated.
This project is licensed under the MIT License.