{"id":18310134,"url":"https://github.com/kazhuravlev/toolset","last_synced_at":"2025-04-05T17:33:20.543Z","repository":{"id":254753119,"uuid":"847086544","full_name":"kazhuravlev/toolset","owner":"kazhuravlev","description":"Simply manage project-specific tools","archived":false,"fork":false,"pushed_at":"2025-01-03T23:12:38.000Z","size":236,"stargazers_count":16,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T16:16:19.229Z","etag":null,"topics":["go","reproducibility","tools","toolset"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kazhuravlev.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T20:07:41.000Z","updated_at":"2025-03-29T13:59:40.000Z","dependencies_parsed_at":"2024-08-25T22:25:09.132Z","dependency_job_id":"ab387848-5003-4ae1-a430-dccb35a74908","html_url":"https://github.com/kazhuravlev/toolset","commit_stats":null,"previous_names":["kazhuravlev/toolset"],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhuravlev%2Ftoolset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhuravlev%2Ftoolset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhuravlev%2Ftoolset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhuravlev%2Ftoolset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazhuravlev","download_url":"https://codeload.github.com/kazhuravlev/toolset/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247375862,"owners_count":20929126,"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":["go","reproducibility","tools","toolset"],"created_at":"2024-11-05T16:13:19.713Z","updated_at":"2025-04-05T17:33:15.535Z","avatar_url":"https://github.com/kazhuravlev.png","language":"Go","readme":"# Toolset\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/kazhuravlev/toolset.svg)](https://pkg.go.dev/github.com/kazhuravlev/toolset)\n[![License](https://img.shields.io/github/license/kazhuravlev/toolset?color=blue)](https://github.com/kazhuravlev/toolset/blob/master/LICENSE)\n[![Build Status](https://github.com/kazhuravlev/toolset/actions/workflows/release.yml/badge.svg)](https://github.com/kazhuravlev/toolset/actions/workflows/release.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kazhuravlev/toolset)](https://goreportcard.com/report/github.com/kazhuravlev/toolset)\n\n`toolset` is a lightweight utility for managing project-specific tools like linters, formatters, and code generators. It\nensures that your development tools remain up-to-date and allows you to specify exact tool versions for consistent,\nreproducible builds.\n\n## Key Features\n\n- **Centralized Tool Management**: Easily manage and update tools like linters, formatters, and code generators within\n  your project.\n- **Reproducible Builds**: Ensure consistent results by locking tool versions in your project configuration.\n- **Automatic Updates**: Keep your tools up-to-date with a single command, avoiding manual version checks and upgrades.\n\n## Use Cases\n\nWhen developing software, you often rely on various tools—such as linters, formatters, and test runners—that are\ncritical for maintaining code quality. These tools are frequently updated with new features or fixes. To maintain\nstability and ensure that everyone working on the project uses the same toolset, you need a way to lock in specific tool\nversions.\n\nThis is where `toolset` comes in:\n\n- **Version Management**: Specify exact tool versions to avoid breaking changes during updates.\n- **Easy Upgrades**: When you're ready, upgrade all tools to their latest versions with a single command.\n- **Reproducibility**: Enable consistent behavior across machines, making builds and code checks more reliable.\n\n## Installation\n\nYou can install `toolset` using either Go or Homebrew:\n\n### Option 1: Go Install\n\n```shell\ngo install github.com/kazhuravlev/toolset/cmd/toolset@latest\n```\n\n### Option 2: Homebrew\n\n```shell\nbrew install kazhuravlev/toolset/toolset\n```\n\n## Usage\n\n`toolset` allows you to initialize a configuration, add tools, install specific versions, and run or upgrade them. Below\nare the basic commands:\n\n### Initialize Toolset\n\nCreate a toolset.json configuration file in the specified directory:\n\n```shell\ntoolset init .\n```\n\n### Add Tools\n\n### Direct tools\n\nExplicitly add tool to your configuration. They have an priority on top of includes.\n\n```shell\n# Add the latest version (automatically resolves to the most recent version)\ntoolset add go github.com/golangci/golangci-lint/cmd/golangci-lint\n# ... or with @latest\ntoolset add go github.com/golangci/golangci-lint/cmd/golangci-lint@latest\n# Add a specific version\ntoolset add go github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.2\n```\n\n#### Copy from source\n\nWhen you bootstrap a new repository and want to have a copy of the `.toolset.json` file from an existing repository.\n\n```shell\n# ... from local file\ntoolset add --copy-from path/to/another/.toolset.json\n# ... from remote http\ntoolset add --copy-from https://gist.githubusercontent.com/kazhuravlev/3f16049ce3f9f478e6b917237b2c0d88/raw/44a2ea7d2817e77e2cd90f29343788c864d36567/sample-toolset.json\n# ... from git repo (by ssh)\ntoolset add --copy-from git+ssh://git@gist.github.com:3f16049ce3f9f478e6b917237b2c0d88.git:/sample-toolset.json\n# ... from git repo (by https)\ntoolset add --copy-from git+https://gist.github.com/3f16049ce3f9f478e6b917237b2c0d88.git:/sample-toolset.json\n```\n\n#### Include source\n\nThe included source will be explicitly registered. This URL will be added to your `.toolset.json` file.\n\n```shell\n# ... from local file\ntoolset add --include /path/to/.toolset.json\n# ... from remote http\ntoolset add --include https://gist.githubusercontent.com/kazhuravlev/3f16049ce3f9f478e6b917237b2c0d88/raw/44a2ea7d2817e77e2cd90f29343788c864d36567/sample-toolset.json\n# ... from git repo (by ssh)\ntoolset add --include git+ssh://git@gist.github.com:3f16049ce3f9f478e6b917237b2c0d88.git\n# ... from git repo (by https)\ntoolset add --include git+https://gist.github.com/3f16049ce3f9f478e6b917237b2c0d88.git\n```\n\n#### Add tags to tools\n\nAdd one or more tags to each tool. It will allow you to install only selected tools. Tools that have a tag can be\nfiltered in `toolset sync` and `toolset upgrade`. See the docs bellow.\n\n```shell \n# Add linter to group `linters` and `ci`\ntoolset add --tags linters,ci go github.com/golangci/golangci-lint/cmd/golangci-lint\n# Add tools to group `ci`\ntoolset add --tags ci go github.com/jstemmer/go-junit-report/v2@latest\ntoolset add --tags ci go github.com/boumenot/gocover-cobertura\n```\n\n### Install tools\n\nEnsure all specified tools are installed or updated to the defined versions:\n\n```shell\n# Make sure that all tools installed with a correct version.\ntoolset sync\n# ...do it only for some set of tools\ntoolset sync --tags linters\n```\n\nBy default, tools are installed into ./bin/tools.\n\n### Run a tool\n\nExecute any installed tool with its corresponding arguments. For example, to run `golangci-lint`:\n\n```shell\ntoolset run golangci-lint run --fix ./...\n```\n\n### Upgrade tools\n\nTo upgrade all tools to their latest available versions, run:\n\n```shell\n# Upgrade all tools\ntoolset upgrade\n# Upgrade only specific tools\ntoolset upgrade --tags ci\n```\n\nThis command ensures all tools in your toolset.json configuration are updated to the latest version.\n\n## Examples\n\nHere’s an [example](./example) of a directory with the toolset. To try it out, follow these steps:\n\n[Install](#installation) the toolset and run:\n\n```shell\ngit clone git@github.com:kazhuravlev/toolset.git\ncd toolset/example\n# Install all tools\ntoolset sync\n# ... and check installed tools\nls ./bin/tools\n# Run installed tool\ntoolset run gt --repo ../ tag last\n# List installed tools\ntoolset list\n```\n\n## Contributing\n\nContributions are welcome! Feel free to open issues or submit pull requests to improve toolset.\n\n## Questions and Answers\n\n**Which files should be added into git index?**\n\n- `.toolset.json` should be added into git index. This is like `go.mod` or `package.json`.\n- `.toolset.lock.json` should be added into git index. This is like `go.sum` or another lock files.\n- `bin/tools` dir should be excluded from index, because this dir will contain a binaries.\n\n**Is that possible to change directory that contains a binary files?**\n\nYes. You can change it in your `.toolset.json`.\n\n**I have a strange behaviour. What I should do to fix that?**\n\nMain command - `toolset sync`. This should fix the all problems. In case when it is not fixed - create an issue.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazhuravlev%2Ftoolset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazhuravlev%2Ftoolset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazhuravlev%2Ftoolset/lists"}