{"id":16744150,"url":"https://github.com/zshipko/ocamlformat-auto","last_synced_at":"2025-03-16T01:13:16.440Z","repository":{"id":55455189,"uuid":"476811994","full_name":"zshipko/ocamlformat-auto","owner":"zshipko","description":"Automatic ocamlformat version selection","archived":false,"fork":false,"pushed_at":"2022-12-17T03:13:48.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T14:08:32.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zshipko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-01T17:28:38.000Z","updated_at":"2024-02-14T12:11:01.000Z","dependencies_parsed_at":"2023-01-29T16:30:56.278Z","dependency_job_id":null,"html_url":"https://github.com/zshipko/ocamlformat-auto","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Focamlformat-auto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Focamlformat-auto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Focamlformat-auto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zshipko%2Focamlformat-auto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zshipko","download_url":"https://codeload.github.com/zshipko/ocamlformat-auto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809883,"owners_count":20351407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T01:42:32.522Z","updated_at":"2025-03-16T01:13:16.418Z","avatar_url":"https://github.com/zshipko.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ocamlformat-auto\n\n`ocamlformat-auto` is an application inspired by [ocamlformat-vmux](https://github.com/CraigFe/ocamlformat-vmux)\nthat can be used to manage multiple versions of [ocamlformat](https://github.com/ocaml-ppx/ocamlformat)\n\nIt will create an executable script named `ocamlformat` that will select the proper version for each\nproject.\n\n## Installation\n\nUsing [opam](https://github.com/ocaml/opam):\n\n```shell\n$ opam pin add git+https://github.com/zshipko/ocamlformat-auto.git\n```\n\nUsing [dune](https://dune.build):\n\n```shell\n$ dune exec ./main.exe init\n```\n\n## Typical usage\n\nIn the root of an existing project (with an `.ocamlformat` file) you can run the following\nto ensure the proper `ocamlformat` version is installed and `ocamlformat` will work as\nexpected:\n\n```shell\n$ ocamlformat-auto install --init\n```\n\n## More examples\n\nInitialize the shim:\n\n```shell\n$ ocamlformat-auto init\n```\n\nInstall the detected version (or latest if no .ocamlformat file is present):\n\n```shell\n$ ocamlformat-auto install\n```\n\nInstall a specific version:\n\n```shell\n$ ocamlformat-auto install 0.20.0\n```\n\nList installed versions:\n\n```shell\n$ ocamlformat-auto list\n```\n\nExecute ocamlformat on a file (this will try to detect the correct version\nby checking the `.ocamlformat` file for your project):\n\n```shell\n$ ocamlformat-auto exec -- ./bin/main.ml -i\n```\n\nOnce the installed (using the `init` command), you can run `ocamlformat`\nlike normal and the correct version will automatically be selected:\n\n```shell\n$ ocamlformat ./bin/main.ml -i\n```\n\nFor more information run `ocamlformat-auto --help`\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzshipko%2Focamlformat-auto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzshipko%2Focamlformat-auto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzshipko%2Focamlformat-auto/lists"}