• Stars
    star
    297
  • Rank 140,075 (Top 3 %)
  • Language
    OCaml
  • License
    ISC License
  • Created almost 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OCaml project generator.

Logo

OCaml project generator.

Build Status npm version

Features β€’ Installation β€’ Templates β€’ Usage β€’ Roadmap β€’ Contributing β€’ License β€’ Acknowledgements

Demo

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:

  • bin - Native project containing a binary.
  • cli - Command Line Interface releasable on Opam.
  • lib - Library releasable on Opam.
  • ppx - PPX library.
  • c-bindings - Bindings to a C library.
  • js - Js application with Js_of_ocaml.

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:

  • Support windows
  • Support CLI options/args for configurations
  • Minimal hello template
  • Generators for lib/bin/test for all templates

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.

More Repositories

1

inquire

🎨 Create beautiful interactive command line interface in OCaml
OCaml
42
star
2

omigrate

Database migrations for Reason and OCaml
OCaml
34
star
3

js-bindings

High-quality JavaScript bindings for OCaml
OCaml
30
star
4

dream-cli

Command Line Interface for Dream applications.
OCaml
23
star
5

dream-livereload

Live reloading for Dream applications
OCaml
21
star
6

yoshi

Convert Markdown and YAML Data to OCaml Modules
OCaml
19
star
7

spin-templates

Official templates for Spin.
Reason
17
star
8

dream-encoding

Encoding primitives for Dream applications.
OCaml
16
star
9

ocaml-node

NodeJS bindings for OCaml
OCaml
15
star
10

elixir-reasonml-blog-tutorial

πŸŽ“ A tutorial to build a blog app using Elixir, ReasonML and GraphQL
Elixir
9
star
11

tyxml-components

Components for Tyxml, built with TailwindCSS and AlpineJS.
OCaml
9
star
12

dream-analytics

Analytics framework and dashboard for your Dream applications.
OCaml
9
star
13

opam-tailwindcss

Tailwind CSS prebuild command line as an opam package
Shell
7
star
14

gettext

Internationalization and localization support for OCaml
OCaml
7
star
15

device-detector

User-agent and referer parser for HTTP queries.
OCaml
6
star
16

tf_datasets

Python scripts to download public datasets and generate tfrecords.
Python
5
star
17

ocaml-http-benchmark

Benchmark of different HTTP servers in OCaml
OCaml
5
star
18

ocaml-harfbuzz

Work in Progress OCaml bindings for Harfbuzz
OCaml
4
star
19

retable

A sortable selectable *table for ReasonReact.
OCaml
4
star
20

dream-accept

OCaml
3
star
21

mirage-demo

Demo of an HTTP server built with MirageOS, deployed on GCP
HCL
3
star
22

opium-demo

Demo of a fullstack application with Opium
OCaml
2
star
23

opam-esbuild

esbuild prebuild binaries packaged as an opam package
2
star
24

tron-js

A simple Tron game in Javascript
JavaScript
2
star
25

bs-react-dropzone

ReasonML bindings for react-dropzone
OCaml
1
star
26

spin-web

Experimental web server template for Spin
OCaml
1
star
27

lwd-svg-repro

Repro of a bug rendering SVG with Lwd
Makefile
1
star
28

repro-eio-monorepo

OCaml
1
star
29

spin-python-cli

A spin template to generate Python CLIs.
Python
1
star
30

ocaml-qdrant

OCaml client for Qdrant vector search engine
OCaml
1
star
31

demo-mdx-mld

1
star