package oskel
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b8ae65e5caa2baaafa267fddd78f6f04707c213dbac3e3622f292a6ee1cc3d7c
sha512=a4cf293c63d322ac393dbd236900a7ad6632b0cf25943f9a44cf0cb6ffcb773e32e40b82ba660e40a543d5921ed90fd227c7752ba38117d2bc2fe78e0f87fb75
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: 13 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 viadune-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 foropam
.
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 inbin/
, making use of a tested library inlib/
.
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 pin add --yes https://github.com/CraigFe/oskel.git
opam install oskel
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"