{"id":13566455,"url":"https://github.com/zwilias/elm-json","last_synced_at":"2025-04-05T13:05:55.457Z","repository":{"id":34744284,"uuid":"182570601","full_name":"zwilias/elm-json","owner":"zwilias","description":"Install, upgrade and uninstall Elm dependencies","archived":false,"fork":false,"pushed_at":"2023-07-26T17:32:26.000Z","size":411,"stargazers_count":180,"open_issues_count":20,"forks_count":9,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-05-02T12:40:56.493Z","etag":null,"topics":["elm","elm-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zwilias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-04-21T18:50:29.000Z","updated_at":"2024-03-19T12:45:40.000Z","dependencies_parsed_at":"2024-01-05T22:00:55.355Z","dependency_job_id":"252d1347-8b39-408e-b9c1-203cd15018b0","html_url":"https://github.com/zwilias/elm-json","commit_stats":{"total_commits":198,"total_committers":6,"mean_commits":33.0,"dds":"0.045454545454545414","last_synced_commit":"352ae1e275403788e53f2e2eda0711262a080307"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwilias%2Felm-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwilias%2Felm-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwilias%2Felm-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zwilias%2Felm-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zwilias","download_url":"https://codeload.github.com/zwilias/elm-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339155,"owners_count":20923014,"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":["elm","elm-lang"],"created_at":"2024-08-01T13:02:10.058Z","updated_at":"2025-04-05T13:05:55.439Z","avatar_url":"https://github.com/zwilias.png","language":"Rust","funding_links":[],"categories":["Other tools","Rust"],"sub_categories":["Unmaintained"],"readme":"[![CI Workflow](https://github.com/zwilias/elm-json/actions/workflows/ci.yaml/badge.svg)](https://github.com/zwilias/elm-json/actions/workflows/ci.yaml) [![npm version](https://badge.fury.io/js/elm-json.svg)](https://badge.fury.io/js/elm-json)\n\n\u003e Deal with your elm.json\n\n\u003e **NOTE:** This is very much a work in progress. May mess up your files\n\u003e completely. Use with care.\n\n`elm-json` provides a bunch of tools to make common tasks involving your\n`elm.json` files a little easier: upgrading your dependencies, installing\nspecific versions of packages, removing dependencies or initializing new\npackages, to name a few.\n\n`elm-json` never writes to files used by the official toolchain, except\n`elm.json` itself. It may, however, read some files from your `ELM_HOME` when\npossible, to prevent downloading things you may already have on your filesystem.\n\n\u003c!--ts--\u003e\n   * [Installation](#installation)\n   * [Usage](#usage)\n      * [elm-json help](#elm-json-help)\n      * [Adding dependencies: elm-json install](#adding-dependencies-elm-json-install)\n         * [Example: Installing the latest available version of a package](#example-installing-the-latest-available-version-of-a-package)\n         * [Example: Installing the latest available 2.x.x version of a package](#example-installing-the-latest-available-2xx-version-of-a-package)\n         * [Example: Installing as a test-dependency](#example-installing-as-a-test-dependency)\n         * [Example: Installing multiple dependencies to a specified elm.json file](#example-installing-multiple-dependencies-to-a-specified-elmjson-file)\n      * [Removing dependencies: elm-json uninstall](#removing-dependencies-elm-json-uninstall)\n         * [Example: Uninstalling a package](#example-uninstalling-a-package)\n      * [Upgrading dependencies: elm-json upgrade](#upgrading-dependencies-elm-json-upgrade)\n         * [Example: Safely updating all dependencies](#example-safely-updating-all-dependencies)\n         * [Example: Major version upgrades for your dependencies](#example-major-version-upgrades-for-your-dependencies)\n      * [Initializing applications/packages: elm-json new](#initializing-applicationspackages-elm-json-new)\n      * [Deeply listing all dependencies: elm-json tree](#deeply-listing-all-dependencies-elm-json-tree)\n      * [For tooling: elm-json solve](#for-tooling-elm-json-solve)\n      * [Generating shell completions: elm-json completions](#generating-shell-completions-elm-json-completions)\n\n\u003c!-- Added by: ilias, at: Fri Jun  5 19:07:47 CEST 2020 --\u003e\n\n\u003c!--te--\u003e\n\n# Installation\n\nBinaries are attached to the github releases and distributed for Windows, OS X\nand Linux (statically linked with musl).\n\nFor ease of installation, an npm installer also exists:\n\n```\nnpm install --global elm-json\n```\n\n# Usage\n\n`elm-json` offers a bunch of subcommands to make life a little easier.\n\n## `elm-json help`\n\n```\nUSAGE:\n    elm-json [FLAGS] \u003cSUBCOMMAND\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n        --offline    Enable offline mode, which means no HTTP traffic will\n                     happen\n    -V, --version    Prints version information\n    -v, --verbose    Sets the level of verbosity\n\nSUBCOMMANDS:\n    help         Prints this message or the help of the given subcommand(s)\n    install      Install a package\n    new          Create a new elm.json file\n    tree         List entire dependency graph as a tree\n    uninstall    Uninstall a package\n    upgrade      Bring your dependencies up to date\n```\n\nGives a quick overview of the more common subcommands. This can also be used for\nfinding documentation about specific subcommands.\n\n## Adding dependencies: `elm-json install`\n\n```\nUSAGE:\n    elm-json install [FLAGS] \u003cPACKAGE\u003e... [-- \u003cINPUT\u003e]\n\nFLAGS:\n    -h, --help       Prints help information\n        --test       Install as a test-dependency\n    -V, --version    Prints version information\n        --yes        Answer \"yes\" to all questions\n\nARGS:\n    \u003cPACKAGE\u003e...    Package to install, e.g. elm/core or elm/core@1.0.2\n    \u003cINPUT\u003e         The elm.json file to upgrade [default: elm.json]\n```\n\n`elm-json install` allows installing dependencies, at the latest version that\nworks given your existing dependencies, or a particular version if you so\nchoose. By adding the `--test` flag, the chosen package(s) will be added to your\n`test-dependencies` rather than your regular `dependencies`.\n\n### Example: Installing the latest available version of a package\n\n```\nelm-json install elm/http\n```\n\nAdds the latest version of `elm/http` to your dependencies.\n\nFor packages, it will use the latest possible version as the lowerbound, and the\nnext major as the exclusive upper bound. This mirrors the behaviour of `elm\ninstall`.\n\nFor applications, this will pick the latest available version, adding all\nindirect dependencies as well.\n\n### Example: Installing the latest available 2.x.x version of a package\n\n```\nelm-json install elm/http@2\n```\n\nAdds the latest version of `elm/http` with `2` as its major version number to\nyour dependencies.\n\n### Example: Installing as a test-dependency\n\n```\nelm-json install --test elm/http@2.0.0\n```\n\nAdds version 2.0.0 of `elm/http` to your test-dependencies.\n\nFor packages, the provided version is used as the lower bound, with the next\nmajor being used as the exclusive upper bound.\n\nFor applications, this will install exactly the specified version.\n\n### Example: Installing multiple dependencies to a specified `elm.json` file\n\n```\nelm-json install elm/http elm/json -- elm/elm.json\n```\n\nAdd the latest possible versions of `elm/http` and `elm/json` to\n`./elm/elm.json`.\n\n## Removing dependencies: `elm-json uninstall`\n\n```\nUSAGE:\n    elm-json uninstall [FLAGS] \u003cPACKAGE\u003e... [-- \u003cINPUT\u003e]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n        --yes        Answer \"yes\" to all questions\n\nARGS:\n    \u003cPACKAGE\u003e...    Package to uninstall, e.g. elm/html\n    \u003cINPUT\u003e         The elm.json file to upgrade [default: elm.json]\n```\n\nUninstall dependencies. This is the inverse of `elm-json install` and its API is\nsimilar but slightly simpler.\n\nVersion bounds may not be specified and `--test` is not an allowed flag for this\ncommand.\n\n### Example: Uninstalling a package\n\n```\nelm-json uninstall elm/html\n```\n\nRemoves the `elm/html` package from your dependencies.\n\n## Upgrading dependencies: `elm-json upgrade`\n\n```\nUSAGE:\n    elm-json upgrade [FLAGS] [INPUT]\n\nFLAGS:\n    -h, --help       Prints help information\n        --unsafe     Allow major versions bumps\n    -V, --version    Prints version information\n        --yes        Answer \"yes\" to all questions\n\nARGS:\n    \u003cINPUT\u003e    The elm.json file to upgrade [default: elm.json]\n```\n\nBy default, this will only allow patch and minor changes for direct (test)\ndependencies.\n\nWhen the `--unsafe` flag is provided, major version bumps are also allowed. Note\nthat this may very well break your application. Use with care!\n\n\u003e **NOTE**: This subcommand does not yet support `elm.json` files with type\n\u003e `package`.\n\n### Example: Safely updating all dependencies\n\n```\nelm-json upgrade\n```\n\nThis command will check if any updates can safely be applied. In practice this\nmeans that for your direct dependencies and direct test-dependencies, we'll look\nfor newer versions with the same major version number. Your indirect\ndependencies and indirect test-dependencies may be modified in more ways,\ndepending on the constraints set by your direct dependencies.\n\n### Example: Major version upgrades for your dependencies\n\n```\nelm-json upgrade --unsafe\n```\n\nIf major version changes are available, this will attempt to apply them. Note\nthat this may still not update all dependencies to their latest release, if you\nhave another dependency preventing to do so.\n\nIf you want to upgrade a specific package to a specific version, try running\n`elm-json install author/project@version`, which will tell you what package(s)\nare preventing this from happening.\n\n## Initializing applications/packages: `elm-json new`\n\n```\nUSAGE:\n    elm-json new\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n```\n\nCreate a new `elm.json` file, for applications or packages.\n\nThis is very rudimentary right now.\n\n## Deeply listing all dependencies: `elm-json tree`\n\n```\nUSAGE:\n    elm-json tree [FLAGS] [PACKAGE] [-- \u003cINPUT\u003e]\n\nFLAGS:\n    -h, --help       Prints help information\n        --test       Promote test-dependencies to top-level dependencies\n    -V, --version    Prints version information\n\nARGS:\n    \u003cPACKAGE\u003e    Limit output to show path to some (indirect) dependency\n    \u003cINPUT\u003e      The elm.json file to solve [default: elm.json]\n```\n\nLists the entire dependency graph (with test-dependencies included when `--test`\nis passed) as a tree.\n\nExample output:\n\n```\nproject\n├── elm/core @ 1.0.2\n├── elm/http @ 1.0.0\n│   ├── elm/core @ 1.0.2 *\n│   └── elm/json @ 1.1.3\n│       └── elm/core @ 1.0.2 *\n├── elm-community/json-extra @ 4.0.0\n│   ├── elm/core @ 1.0.2 *\n│   ├── elm/json @ 1.1.3 *\n│   ├── elm/time @ 1.0.0\n│   │   └── elm/core @ 1.0.2 *\n│   └── rtfeldman/elm-iso8601-date-strings @ 1.1.3\n│       ├── elm/core @ 1.0.2 *\n│       ├── elm/json @ 1.1.3 *\n│       ├── elm/parser @ 1.1.0\n│       │   └── elm/core @ 1.0.2 *\n│       └── elm/time @ 1.0.0 *\n└── lukewestby/elm-http-builder @ 6.0.0\n    ├── elm/core @ 1.0.2 *\n    ├── elm/http @ 1.0.0 *\n    ├── elm/json @ 1.1.3 *\n    ├── elm/time @ 1.0.0 *\n    └── elm/url @ 1.0.0\n        └── elm/core @ 1.0.2 *\n\nItems marked with * have their dependencies ommitted since they've already\nappeared in the output.\n```\n\nSpecifying a package-name will filter the tree so only paths leading to the\nspecified package, in direct and indirect dependencies, will be shown.\n\n## For tooling: `elm-json solve`\n\n```\nUSAGE:\n    elm-json solve [FLAGS] [OPTIONS] [--] [INPUT]\n\nFLAGS:\n    -h, --help        Prints help information\n    -m, --minimize    Choose lowest available versions rather than highest\n        --test        Promote test-dependencies to top-level dependencies\n    -V, --version     Prints version information\n\nOPTIONS:\n    -e, --extra \u003cPACKAGE\u003e...    Specify extra dependencies, e.g. elm/core or\n                                elm/core@1.0.2\n\nARGS:\n    \u003cINPUT\u003e    The elm.json file to solve [default: elm.json]\n```\n\nDocumentation TBD. Intended for other tooling to use, not meant for human\nconsumption.\n\n## Generating shell completions: `elm-json completions`\n\n```\nUSAGE:\n    elm-json completions \u003cSHELL\u003e\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nARGS:\n    \u003cSHELL\u003e    The shell to generate the script for [possible values: bash,\n               fish, zsh]\n```\n\nCreate completion scripts for `elm-json` for `bash`/`fish`/`zsh`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwilias%2Felm-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzwilias%2Felm-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzwilias%2Felm-json/lists"}