package oskel

  1. Overview
  2. Docs
Skeleton generator for OCaml projects

Install

Dune Dependency

Authors

Maintainers

Sources

oskel-0.2.0.tbz
sha256=aaea2ff830518c17399f40df4d1d7c1d4c08867ea0506e41b78acdfea655f5cb
sha512=61edf40c42d2fa8e33554848bab1eaf951064050b14a2768d5e83d1adbb79e23021b4310a51e9553b5ae875f86729c5d7fd0aca03a97cab7b0164b30006b00c1

Description

Skeleton generator for OCaml projects

oskel is a tool for generating stubs of OCaml projects pre-equipped with the standard boilerplate: OCamlformat config file, Alcotest scaffolding, auto-generation of [*.opam] files via [dune-project] etc. It supports generating binaries with Cmdliner, Fmt and Logs support. The resulting projects are compliant with [dune-release lint].

Published: 27 Jan 2020

README

:skull: oskel: skeleton generator for OCaml projects

> oskel --synopsis "My very own OCaml skeleton" my_project

Creating new project:

my_project
|-- .git
|-- src
|   |-- dune
|   |-- my_project.ml
|   `-- my_project.mli
|
|-- test
|   |-- dune
|   |-- main.ml
|   `-- main.mli
|
|-- .gitignore
|-- .ocamlformat
|-- LICENSE
|-- README.md
|-- dune-project
`-- my_project.opam

The standard project type is initialised with:

  • .opam file autogeneration via dune-project;

  • OCamlformat config file;

  • Alcotest testing boilerplate, with pre-configured Logs initialisation.

  • Git repository with an initial commit;

  • OCaml .gitignore;

  • README.md with installation instructions for opam.

Choice of project layouts

There are multiple project structures, which can be selected via the --kind flag:

  • library (default): library-only package;

  • executable: a single binary with minimal configuration;

  • binary: package providing a Cmdliner binary in bin/, making use of a tested library in lib/.

Examples of each layout can be seen in the examples/ directory. You can also use e.g. oskel --dry-run --kind executable to see a preview of the project structure.

Installation

opam install oskel

If you want to contribute to the project, please read CONTRIBUTING.md.

Configuration

oskel is very configurable (see oskel --help for details). Most options can be set via environment variables. In particular, you can set your personal metadata in your shell .profile:

export OSKEL_FULL_NAME="Joe Bloggs"
export OSKEL_EMAIL="joe@example.com"
export OSKEL_GITHUB_ORG="JoeBlo"

Dependencies (5)

  1. stdlib-shims
  2. logs
  3. fmt >= "0.8.7"
  4. cmdliner
  5. dune >= "2.0"

Dev Dependencies (1)

  1. cmdliner with-test & < "1.1.0"

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.