{"id":13621410,"url":"https://github.com/babarot/afx","last_synced_at":"2025-04-04T22:07:12.701Z","repository":{"id":38021578,"uuid":"447061338","full_name":"babarot/afx","owner":"babarot","description":"📦 Package manager to provide declaretive way to manage CLI commands and shell plugins as code.","archived":false,"fork":false,"pushed_at":"2025-01-14T13:20:52.000Z","size":2925,"stargazers_count":167,"open_issues_count":3,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-28T21:07:00.334Z","etag":null,"topics":["cli","go","package-manager"],"latest_commit_sha":null,"homepage":"https://babarot.me/afx/","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/babarot.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":"2022-01-12T03:18:13.000Z","updated_at":"2025-03-23T03:20:11.000Z","dependencies_parsed_at":"2024-11-15T00:02:47.230Z","dependency_job_id":"b0fd89ba-fd31-44e5-94c3-d28051a2cbe4","html_url":"https://github.com/babarot/afx","commit_stats":{"total_commits":216,"total_committers":4,"mean_commits":54.0,"dds":0.03240740740740744,"last_synced_commit":"9883505b0f9ca5b5047799bdcf46d3be96e4a9c7"},"previous_names":["babarot/afx","b4b4r07/afx"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fafx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fafx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fafx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fafx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babarot","download_url":"https://codeload.github.com/babarot/afx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"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":["cli","go","package-manager"],"created_at":"2024-08-01T21:01:05.789Z","updated_at":"2025-04-04T22:07:12.685Z","avatar_url":"https://github.com/babarot.png","language":"Go","funding_links":[],"categories":["Go","cli"],"sub_categories":[],"readme":"AFX - Package manager for CLI\n---\n\nAFX is a package manager for command-line tools and shell plugins. afx can allow us to manage almost all things available on GitHub, Gist and so on. Before, we needed to trawl web pages to download each package one by one. It's very annoying every time we set up new machine and also it's difficult to get how many commands/plugins we installed. So afx's motivation is coming from that and to manage them with YAML files (as a code).\n\n[![][afx-mark]][afx-link] [![][test-mark]][test-link] [![][release-mark]][release-link]\n\n[afx-mark]: https://img.shields.io/github/v/release/babarot/afx?color=EF2D5E\u0026display_name=release\u0026label=AFX\u0026logo=alchemy\u0026logoColor=EF2D5E\u0026sort=semver\n[afx-link]: https://github.com/babarot/afx/releases\n\n[test-mark]: https://github.com/babarot/afx/actions/workflows/go.yaml/badge.svg\n[test-link]: https://github.com/babarot/afx/actions/workflows/go.yaml\n\n[release-mark]: https://github.com/babarot/afx/actions/workflows/release.yaml/badge.svg\n[release-link]: https://github.com/babarot/afx/actions/workflows/release.yaml\n\nFull document is here: [AFX](https://babarot.me/afx/)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/4442708/224565945-2c09b729-82b7-4829-9cbc-e247b401b689.gif\"\u003e\n\n\u003c!--\n\u003cimg src=\"https://vhs.charm.sh/vhs-577hHga4xJRSvZFshv47y3.gif\" width=\"\"\u003e\n\u003cimg src=\"https://vhs.charm.sh/vhs-46LPru8ovWFCQV6DnyKwGm.gif\" width=\"\"\u003e\n\u003cimg src=\"https://vhs.charm.sh/vhs-6tz3U4NZyh9LBzmTlT98c9.gif\" width=\"\"\u003e\n--\u003e\n\n## Features\n\n- Allows to manage various packages types:\n  - GitHub / GitHub Release / Gist / HTTP (web) / Local\n  - [gh extensions](https://github.com/topics/gh-extension)\n- Manages as CLI commands, shell plugins or both\n- Easy to install/update/uninstall\n- Easy to configure with YAML\n  - Environment variables for each packages\n  - Aliases for each packges\n  - Conditional branches\n  - Build steps\n  - Run snippet code\n  - Dependency between packages\n  - etc...\n- Works on bash, zsh and fish\n\n## Quick Start [\u003csup\u003eplus!\u003c/sup\u003e](https://babarot.me/afx/getting-started/)\n\n- [1. Install packages](#1-install-packages)\n- [2. Load packages](#2-load-packages)\n- [3. Update packages](#3-update-packages)\n- [4. Uninstall packages](#4-uninstall-packages)\n\n### 1. Install packages\n\nWrite YAML file with name as you like in `~/.config/afx/`. Let's say you write this code and then put it into `github.yaml`. After than you can install packages with `install` command.\n```diff\n+ github:\n+ - name: stedolan/jq\n+   description: Command-line JSON processor\n+   owner: stedolan\n+   repo: jq\n+   release:\n+     name: jq\n+     tag: jq-1.5\n+   command:\n+     link:\n+     - from: '*jq*'\n+       to: jq\n```\n\n```console\n$ afx install\n```\n\n### 2. Load packages\n\nYou can enable installed packages to your current shell with this command:\n\n```console\n$ source \u003c(afx init)\n```\n\nTake it easy to run `afx init` because it just shows what to apply in your shell to Stdout.\n\nIf you want to automatically load packages when you start new shell, you need to add above to your shell-rc file.\n\n### 3. Update packages\n\nAll you have to do for updating is just to update version part (release.tag) to next version then run `update` command.\n\n```diff\n  github:\n  - name: stedolan/jq\n    description: Command-line JSON processor\n    owner: stedolan\n    repo: jq\n    release:\n      name: jq\n-     tag: jq-1.5\n+     tag: jq-1.6\n    command:\n      link:\n      - from: '*jq*'\n        to: jq\n```\n\n```console\n$ afx update\n```\n\n### 4. Uninstall packages\n\nUninstalling is also almost same as `install`. Just to remove unneeded part from YAML file then run `uninstall` command.\n\n```diff\n- github:\n- - name: stedolan/jq\n-   description: Command-line JSON processor\n-   owner: stedolan\n-   repo: jq\n-   release:\n-     name: jq\n-     tag: jq-1.6\n-   command:\n-     link:\n-     - from: '*jq*'\n-       to: jq\n```\n\n```console\n$ afx uninstall\n```\n\n## Advanced tips\n\n### Shell completion\n\nFor zsh user, you can enable shell completion for afx:\n\n```bash\n# .zshrc\nsource \u003c(afx completion zsh)\n```\n\nbash and fish users are also available.\n\n## Installation\n\nDownload the binary from [GitHub Release][release] and drop it in your `$PATH`.\n\n- [Darwin / Mac][release]\n- [Linux][release]\n\nOr, bash installer has been provided so you can install afx by running this one command at your own risk ([detail](./hack/README.md)).\n\n```bash\ncurl -sL https://raw.githubusercontent.com/babarot/afx/HEAD/hack/install | bash\n```\n\n[release]: https://github.com/babarot/afx/releases/latest\n[website]: https://babarot.me/afx/\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fafx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabarot%2Fafx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fafx/lists"}