From ocaml-dev
Initializes a new OCaml project with dune build config, opam package, CI workflows for GitHub/GitLab/Tangled, library source, tests, LICENSE, README, gitignore, and .ocamlformat.
npx claudepluginhub avsm/ocaml-claude-marketplace --plugin ocaml-devproject-name# Initialize OCaml Project This command creates a new OCaml project with all standard files and configuration. ## Arguments Project name: $ARGUMENTS (defaults to current directory name if not provided) ## Configuration Read user configuration from `~/.claude/ocaml-config.json`. If it doesn't exist, prompt the user for: - Author name - Author email - Preferred license (ISC, MIT, Apache-2.0) - CI platform (github, tangled, gitlab) - Git hosting (github.com/user, tangled.org/@user, gitlab.com/user) - OCaml version minimum (default: 5.2.0) Offer to save configuration to `~/.claude/ocaml-c...
This command creates a new OCaml project with all standard files and configuration.
Project name: $ARGUMENTS (defaults to current directory name if not provided)
Read user configuration from ~/.claude/ocaml-config.json. If it doesn't exist, prompt the user for:
Offer to save configuration to ~/.claude/ocaml-config.json for future use.
(data_only_dirs third_party).github/workflows/build.yml.tangled/workflows/build.yml.gitlab-ci.ymldune build @check to verify setupReplace these in templates:
{{PROJECT_NAME}} - Project name (snake_case){{PROJECT_NAME_KEBAB}} - Project name (kebab-case){{AUTHOR_NAME}} - From config{{AUTHOR_EMAIL}} - From config{{YEAR}} - Current year{{LICENSE}} - License identifier{{OCAML_VERSION}} - Minimum OCaml version{{GIT_URL}} - Full git URL based on hosting config{{SOURCE_STANZA}} - dune source stanza based on hosting:
(source (tangled handle/{{PROJECT_NAME_KEBAB}}))(source (github user/{{PROJECT_NAME_KEBAB}}))(source (gitlab user/{{PROJECT_NAME_KEBAB}}))/init-ocaml my-library
/init-ocaml
Created OCaml project: my-library
Files created:
- dune-project
- dune
- .ocamlformat
- .gitignore
- LICENSE.md
- README.md
- .github/workflows/build.yml
- lib/dune
- lib/my_library.ml
- lib/my_library.mli
- test/dune
- test/test_my_library.ml
Next steps:
1. Run `opam install . --deps-only` to install dependencies
2. Run `dune build` to build the project
3. Run `dune runtest` to run tests