Home

Awesome

<p align="center"> <img width="300" src="https://raw.githubusercontent.com/tmattio/spin/main/doc/logo.svg?sanitize=true" alt="Logo"> <br><br> OCaml project generator. </p> <p align="center"> <a href="https://github.com/tmattio/spin/actions"> <img src="https://github.com/tmattio/spin/workflows/CI/badge.svg" alt="Build Status" /> </a> <a href="https://badge.fury.io/js/%40tmattio%2Fspin"> <img src="https://badge.fury.io/js/%40tmattio%2Fspin.svg" alt="npm version" /> </a> </p> <p align="center"> <a href="#features">Features</a> • <a href="#installation">Installation</a> • <a href="#templates">Templates</a> • <a href="#usage">Usage</a> • <a href="#roadmap">Roadmap</a> • <a href="#contributing">Contributing</a> • <a href="#license">License</a> • <a href="#acknowledgements">Acknowledgements</a> </p> <div align="center"> <img src="https://raw.githubusercontent.com/tmattio/spin/main/doc/demo.svg?sanitize=true" alt="Demo"> </div>

Features

🚀 Quickly start new projects that are ready for the real world.

❤️ Have a great developer experience when developing with OCaml.

🏄 Be as productive as Ruby-on-Rails or Elixir's Mix users.

🔌 Establish a convention for projects organizations to make it easy to get into new projects.

Installation

Using Homebrew (macOS)

brew install tmattio/tap/spin

Using Opam

opam install spin

Using a script

curl -fsSL https://github.com/tmattio/spin/raw/main/script/install.sh | bash

Templates

You can generate a new project using a template with spin new. For instance:

spin new bin my_app

Will create a new binary application in the directory ./my_app/

Anyone can create new Spin templates, but we provide official templates for a lot of use cases.

Official templates

The official Spin templates templates are the following:

If you'd like to add an official template, don't hesitate to open a PR!

Other OCaml templates

You can find community Spin templates for various projects here: https://github.com/ocaml-templates

Here are some non-official Spin templates that you can use:

Other non-OCaml templates

Although the focus of Spin is to offer a great project generator for the OCaml ecosystem, it can also be used to generate non-OCaml templates. Here are a few examples:

Usage

For a detailed documentation of Spin's CLI, run spin --help, or refer to the CLI documentation.

spin new TEMPLATE [PATH] [--default] [--ignore-config]

Create a new ReasonML/Ocaml project from a template.

PATH defaults to the current working directory.

When --default is passed, the user will not be prompted for configurations that have a default value.

When --ignore-config is passed, the configuration file will be ignored and the user will be prompted for all the configurations.

spin ls

List the official Spin templates.

spin config

Prompt the user for values that can be saved in the configuration file.

If a value is present in the configuration file, it will not be prompted when generating a new project.

Roadmap

See our development board for a list of selected features and issues.

Here are some of the improvements we'll be working on as well in for next releases:

Contributing

We'd love your help improving Spin!

Take a look at our Contributing Guide to get started.

License

Distributed under the ISC License. See LICENSE for more information.

Acknowledgements

Thanks to everyone who contributed to Spin!

Special thanks to @wesoudshoorn for creating Spin's logo.