DEV Community

Shiono Yoshihide
Shiono Yoshihide

Posted on

create-nextron-app: Create an Electron with Next.js app in one command

Thanks to npx or yarn, you can create Nextron (Electron + Next.js) apps in one command :)

TLDR

Use create-nextron-app.

# with npx
$ npx create-nextron-app test-app

# with yarn
$ yarn create nextron-app test-app

CLI Options

By using --example option, you can specify an example to create.

# with npx
$ npx create-nextron-app test-app --example with-typescript-material-ui

# with yarn
$ yarn create nextron-app test-app --example with-typescript-material-ui

Examples

All examples are listed here.

There are 12 examples for now:

- custom-build-options
- custom-server
- custom-server-nodemon
- custom-server-typescript
- ipc-communication
- parameterized-routing
- with-javascript
- with-javascript-ant-design
- with-javascript-material-ui
- with-typescript
- with-typescript-less
- with-typescript-material-ui

PRs and Contributions are Welcome

I'm new to OSS and have some beliefs for Nextron:

  1. Show a way of developing desktop apps only web knowledge
  2. Easy to use
  3. Be transparent (Open to OSS developers)

GitHub logo saltyshiomix / nextron

⚡ Electron + NEXT.js ⚡

NPM version NPM downloads Package License (MIT) AWESOME NEXTJS

Support

Nextron vs Next.js

nextron next
v5.x v9.x
v4.x v8.x
v2.x / v3.x v7.x
v1.x v6.x
👍 JavaScript frontend/backend
👍 TypeScript frontend/backend
👍 TypeScript frontend/Python backend

Package Manager

npm, yarn and pnpm >= v4 are supported.

My Belief for Nextron

  1. Show a way of developing desktop apps only web knowledge
  2. Easy to use
  3. Be transparent and open to OSS developers

Otherwise Specified

Usage

Install

$ npm install --global nextron@latest

Create Application

To create <MY-APP>, just run the command below:

$ nextron init <MY-APP>

Or, you can use a create-nextron-app command without installing the nextron command globally:

# with npx
$ npx create-nextron-app <MY-APP

GitHub logo saltyshiomix / create-nextron-app

Create nextron (Electron + NEXT.js) apps in one command ⚡

Create Electron + Next.js apps in one command

Usage

With Npm

# `with-javascript` example
$ npx create-nextron-app my-app

# `with-typescript-material-ui` example
$ npx create-nextron-app my-app --example with-typescript-material-ui

With Yarn

# `with-javascript` example
$ yarn create nextron-app my-app

# `with-typescript-material-ui` example
$ yarn create nextron-app my-app --example with-typescript-material-ui

Examples

https://github.com/saltyshiomix/nextron/tree/master/examples

Related

Nextron - Electron + Next.js

Conclusion

Developing Electron apps is sometimes facing a problem, so I hope that nextron or create-nextron-app helps those who want to create Electron with Next.js apps :)

Thank you for your reading this article.

Best,

Top comments (1)

Collapse
 
kumard3 profile image
Kumar Deepanshu

How you make that command line tool , can you share something, it will be very helpful..