https://github.com/cozy/create-cozy-app
A CLI to bootstrap a "zero-configuration" application for the Cozy V3 platform
https://github.com/cozy/create-cozy-app
cli cozy template yarn zero-configuration
Last synced: 12 months ago
JSON representation
A CLI to bootstrap a "zero-configuration" application for the Cozy V3 platform
- Host: GitHub
- URL: https://github.com/cozy/create-cozy-app
- Owner: cozy
- License: mit
- Created: 2017-10-19T21:03:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-03T11:09:48.000Z (about 1 year ago)
- Last Synced: 2025-06-25T10:49:36.688Z (about 1 year ago)
- Topics: cli, cozy, template, yarn, zero-configuration
- Language: JavaScript
- Homepage: https://docs.cozy.io/en/tutorials/app/
- Size: 13.4 MB
- Stars: 16
- Watchers: 10
- Forks: 15
- Open Issues: 60
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
Create Cozy App
Start quickly your Cozy application
### What's create-cozy-app?
`create-cozy-app` is a command line tool that creates a skeleton of an application for Cozy, using Cozy libraries.
This tool can be run as an installed CLI or by using `yarn create`, see below for more information.
By default, `create-cozy-app` will use the [`cozy-scripts`](https://github.com/cozy/create-cozy-app/tree/master/packages/cozy-scripts) scripts bundle to build your app based on React.
__You can find a complete tutorial about creating a Cozy application using `create-cozy-app` in [the official documentation (docs.cozy.io)](https://docs.cozy.io/en/tutorials/app/).__
#### Requirements
- NodeJS version 20+
- [Yarn](https://yarnpkg.com): a NodeJS package manager, like `npm`;
- a running [Cozy development environment](https://docs.cozy.io/en/tutorials/app/#install-the-development-environment)
### Bootstrap an application
You can use `create-cozy-app` without installing it globally using `yarn create`
([yarn create documentation](https://yarnpkg.com/lang/en/docs/cli/create/)):
```
yarn create cozy-app mycozyapp
```
You can also install the package globally.
```
yarn global add create-cozy-app
create-cozy-app mycozyapp
```
⚠️ By using a locally installed CLI, you will have to update it regularly to keep the app
template up to date. It is why we recommend to use directly `yarn create` which will always uses
the latest version of the CLI.
It will
* download dependencies (it may take a while, you can go grab a coffee)
* ask you a few questions
* then create an application skeleton inside `mycozyapp`.
### Start developing
ℹ️ See [this tutorial](https://docs.cozy.io/en/tutorials/app/) for more information on
how to develop a cozy-app. Below, you'll find just the essential.
You can start developing with:
```
cd mycozyapp
yarn start
```
This starts a `webpack-dev-server` that continuously builds the application
into the `build` folder.
If not already started, you should start a `cozy-stack` serving this folder:
```bash
touch ~/cozy.yaml # You can edit this file to configure the stack
docker run -ti --rm -p 8080:8080 -p 5984:5984 -p 8025:8025 -v (pwd)/build:/data/cozy-app/mycozyapp -v ~/cozy.yaml:/etc/cozy/cozy.yaml cozy/cozy-app-dev
```
You app should now be available at `http://mycozyapp.cozy.tools:8080`.
### Options
##### `--scripts-source` (useful for hacking)
You can pass a custom scripts package using the optional `--scripts-source` option, it can be one of:
- a __relative local path__ to a tarball (`fileRel:` prefix): `fileRel:./a-folder/my-cozy-scripts.tar.gz`
- an __absolute local path__ to a tarball (`fileAbs:` prefix): `fileAbs:/root/my-cozy-scripts.tar.gz`
- an __URL__ to a tarball (`url:` prefix): `url:https://myurl.com/my-cozy-scripts.tar.gz`
- a specific __npm version__ (`version:` prefix): `version:0.1.5`
- a specific __git commit/branch__ with name provided after the '#' (`git:` prefix): `git://github.com/cozy/cozy-scripts.git#master`
##### `--verbose`
Using this options, `create-cozy-app` will be run in a more verbose way, useful for debugging or understanding what the script does.
## Community
### What's Cozy?
[Cozy] is a platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.
### Get in touch
You can reach the Cozy Community by:
- Chatting with us on IRC `#cozycloud` on [Libera.Chat][libera]
- Posting on our [Forum][forum]
- Posting issues on the [Github repos][github]
- Say Hi! on [Twitter][twitter]
## License
`create-cozy-app` is distributed under the MIT license.
CCA logo by [@CPatchane](https://github.com/CPatchane).
[cozy]: https://cozy.io "Cozy Cloud"
[libera]: https://web.libera.chat/#cozycloud
[forum]: https://forum.cozy.io/
[github]: https://github.com/cozy/
[twitter]: https://twitter.com/cozycloud