Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tmattio/spin
OCaml project generator.
https://github.com/tmattio/spin
dune esy ocaml reason spin template
Last synced: 4 days ago
JSON representation
OCaml project generator.
- Host: GitHub
- URL: https://github.com/tmattio/spin
- Owner: tmattio
- License: isc
- Created: 2019-12-02T05:27:10.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-07T15:13:09.000Z (4 months ago)
- Last Synced: 2025-01-19T13:02:08.405Z (11 days ago)
- Topics: dune, esy, ocaml, reason, spin, template
- Language: OCaml
- Homepage:
- Size: 1.23 MB
- Stars: 295
- Watchers: 10
- Forks: 15
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-list - spin
README
OCaml project generator.
Features •
Installation •
Templates •
Usage •
Roadmap •
Contributing •
License •
Acknowledgements
## 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)
```bash
brew install tmattio/tap/spin
```### Using Opam
```bash
opam install spin
```### Using a script
```bash
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:
```bash
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](https://github.com/ocaml-templates)
Here are some non-official Spin templates that you can use:
- [**spin-sihl**](https://github.com/oxidizing/spin-sihl) - Spin template for [Sihl](https://github.com/oxidizing/sihl) applications
### 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:
- [**spin-python-cli**](https://github.com/tmattio/spin-python-cli) - Spin template for Python CLIs
## Usage
For a detailed documentation of Spin's CLI, run `spin --help`, or refer to the [CLI documentation](https://github.com/tmattio/spin/tree/main/doc/cli.md).
### `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](https://github.com/tmattio/spin/projects/1) 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](CONTRIBUTING.md) to get started.
## License
Distributed under the ISC License. See [LICENSE](LICENSE) for more information.
## Acknowledgements
Thanks to everyone who [contributed](https://github.com/tmattio/spin/graphs/contributors) to Spin!
Special thanks to [@wesoudshoorn](https://github.com/wesoudshoorn) for creating Spin's logo.