{"id":15021630,"url":"https://github.com/hyde46/hoard","last_synced_at":"2025-05-15T16:06:25.547Z","repository":{"id":36985349,"uuid":"382835373","full_name":"Hyde46/hoard","owner":"Hyde46","description":"cli command organizer written in rust","archived":false,"fork":false,"pushed_at":"2024-09-09T01:19:46.000Z","size":9053,"stargazers_count":557,"open_issues_count":28,"forks_count":25,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T02:01:33.598Z","etag":null,"topics":["bash","cli","command","command-line-tool","gpt","gpt-3","organizer","rust","tool","zsh"],"latest_commit_sha":null,"homepage":"https://hyde46.github.io/hoard/","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/Hyde46.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2021-07-04T11:32:51.000Z","updated_at":"2025-03-21T01:59:42.000Z","dependencies_parsed_at":"2023-01-17T12:16:02.064Z","dependency_job_id":"413be6eb-8195-42f2-9062-160f6225190e","html_url":"https://github.com/Hyde46/hoard","commit_stats":{"total_commits":275,"total_committers":14,"mean_commits":"19.642857142857142","dds":0.3418181818181818,"last_synced_commit":"15f3ccd6442de5fa2f48d18c494738a5cef3bc76"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyde46%2Fhoard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyde46%2Fhoard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyde46%2Fhoard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hyde46%2Fhoard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hyde46","download_url":"https://codeload.github.com/Hyde46/hoard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246131300,"owners_count":20728301,"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":["bash","cli","command","command-line-tool","gpt","gpt-3","organizer","rust","tool","zsh"],"created_at":"2024-09-24T19:56:48.853Z","updated_at":"2025-03-29T03:01:31.915Z","avatar_url":"https://github.com/Hyde46.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=img/hoard_icon.png width=\"400\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Hyde46/hoard/actions/workflows/test.yml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/hyde46/hoard/test.yml?style=flat-square\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/hoard-rs\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/crates/v/hoard-rs?style=flat-square\"\n      alt=\"Crates.io version\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Hyde46/hoard/issues\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/github/issues/Hyde46/hoard?style=flat-square\"\n      alt=\"Crates.io version\"\n  /\u003e\u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/hoard-rs\"\n    \u003e\u003cimg\n      src=\"https://img.shields.io/github/license/Hyde46/hoard?style=flat-square\"\n      alt=\"Crates.io version\"\n  /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cem\u003e command organizer tool to hoard all your precious commands 💎🐉\u003c/em\u003e\n\u003c/p\u003e\n\n![Example usage](img/hoard_usage_example.gif)\n\n#### What is a command organizer?\n\nA command organizer lets you save commands that you often use, but are too complicated or long to remember.\nFor every **hoarded** command, `hoard` saves\n\n- the command ( parameterized with a customizable token, default `#` )\n- name\n- description\n- namespace where it lives in\n- tags ( Optional )\n\nIf you get lost in your massive command history, and can't find for example a specific `docker` command out of thousand `docker` commands you've already ran,\njust **hoard** it. With a **name** and **description** it will be much easier to find again. When you look for that command again a month later, take a look at your **hoarded** commands.\n\n`hoard` is **not** supposed to replace shell history finder like `fzf` `atuin` or similar utilities. It rather should be used in conjunction with them.\n\nNow with chatGPT integration 💎\n\n## :love_letter: Table of contents\n\n- [📦 Install](#install)\n- [🤸 Usage](#usage)\n- [:zap: Shortcuts](#shortcuts)\n\n\u003ca name=\"install\"/\u003e\n\n## 📦 Install\n\n### From source\n\nIt's best to use [rustup](https://rustup.rs/) to get setup with a Rust\ntoolchain, then you can run:\n\n```\ncargo install hoard-rs\n```\n\nOr build it yourself:\n\n```\ncargo build --release\n```\n\nFind the binaries in `./target/release/hoard`\nMove it to wherever you need it ( Like `/usr/local/bin/hoard` )\nOr run \n```\ncargo install --path .\n```\n\n### Linux\n\nTested on:\n- Ubuntu\n- Arch\n- EndeavourOS\n\nInstall `hoard` by running\n\n```\n./install.sh\n```\n\nIf you are running `fish` shell\n\n```\nLATEST_RELEASE=1.4.2 ./install.fish\n```\n\n### AUR (Arch Linux)\n```\nparu -S hoard\n```\n\n### Homebrew (macOS)\n```\nbrew tap Hyde46/hoard\nbrew install hoard\n```\n\n### MacPorts (macOS)\n```\nsudo port install hoard-cli\n```\n\nMore info [here](https://ports.macports.org/port/hoard-cli/)\n\n### Windows\nBest to install from source, good luck\n\n## Autocomplete with Shell plugin\n\nInstall `hoard` as a plugin to enable autocomplete.\nDepending on your shell, run one of the following commands.\nTo keep it installed for your next shell session, add the `source` command with an absolute path to your `.bashrc` or copy-paste the plugins content to your `.bashrc`.\n\n#### bash\n\n```\nsource src/shell/hoard.bash\n```\n\n#### zsh\n\n```\nsource src/shell/hoard.zsh\n```\n\n#### fish\n\n```\nsource src/shell/hoard.fish\n```\n\n### Nix\n\nThe hoard package is in the [nixpkgs](https://search.nixos.org/packages?channel=unstable\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=hoard) package repository.\n\nEither install it with `nix-env -iA hoard`, get it temporarily with `nix-shell -p hoard` or add it to your configuration.\n\n\n\u003ca name=\"usage\"/\u003e\n\n## 🤸 Usage\n\n#### Save a new command\n\n```\nhoard new\n```\n\nIf a parameter is not known when saving the command, put a `#` ( Or your customized token from your `~/.config/hoard/config.yml` )\nYou can also name your parameters like this:\n```\necho \"My name is #first and I live at #city. Did I tell you my name, #first?\" \n```\nWhen putting `#first` you only have to do it once for each occurrence in the command.\nA parameter name is defined as everything followed by the token until the first space character is found.\nAlternatively you can determine where the named parameter ends by putting a `!` ( Or your customized token from your `~/.config/hoard.config.yml`)\n```\necho \"My name is #first named parameter! and I live at #city. Did I tell you my name, #first?\" \n```\n#### Search through command trove\n\n```\n\u003cCtrl-h\u003e\n```\n\nOr alternatively, if not installed as a plugin, the interactive search can still be performed, though without autocomplete. This assumes the user to copy the command by mouse from the UI\n\n```\nhoard list\n```\n\nWhen running `hoard list` as a shell plugin and selecting a parameterized command, `hoard` will ask for all missing parameters to input before sending the complete command to your shell input. \n\nIf there is a `trove.yml` file present in the local directory, `hoard` will only load this trove file and not display your \"global\" trove!\n( Edit ~/.config/hoard/config.yml `read_from_current_directory` to disable )\n\n#### chatGPT integration\nWhen running `hoard list` or through the hoard shortcut, press `Ctrl-a` to be asked for a prompt.\nDesribe what your command is supposed to do, and chatGPT will create and hoard a new command based on your prompt.\n\nIf you dont already have an OpenAI account to generate an API key, head to [this](https://platform.openai.com/account/api-keys) page. ( Given the low amount of tokens consumed, this is extremly cheap. ~ 0.01$ for 30 generated commands )\n\nYou either need to set the env variable\n```bash\nexport OPENAI_API_KEY=abcabcabc\n```\n\nOr for a permanent solution set `gpt_api_key` in your `~/.config/hoard/config.yml`\n\nchatGPT does not always reply in the same format. Sometimes the resulting command will be added to the description. Use the edit mode `\u003cTAB\u003e/\u003cCtrl-E\u003e` to edit the hoarded command to its correct form.\n\n#### Synchronize commands with another terminal\nYou can keep your commands in sync in multiple terminals by using `hoard sync`\n\nFirst register a new account\n```bash\nhoard sync register\n```\n\nThen login with your new account\n```bash\nhoard sync login\n```\n\nSave your local commands online\n```bash\nhoard sync save\n```\n\nLogin with the same account on a different computer/terminal and then run\n```bash\nhoard sync get\n```\nThis will merge your local trove file with the cloud-based one. You will get prompted how to handle collisions if there are any.\nHowever, if you are unhappy with how the merge happened, you've got the option to revert the latest `hoard sync get` command\n```bash\nhoard sync revert\n```\n\nIf you want to host your own sync server, checkout it's [repository](https://github.com/Hyde46/trove_server).\nThen, update your config file to point to the new server location `~/.config/hoard/config.yml`\n\n#### Delete a command\n\n```\nhoard remove \u003cname\u003e\n```\n\n#### Delete all commands in a namespace\n\n```\nhoard remove_namespace \u003cnamespace_name\u003e\n```\n\n#### Edit a command\n\n```\nhoard edit \u003cname\u003e\n```\n\n#### Info\n\nShows location of config file and trove file\n\n```\nhoard info\n```\n\n#### Set parameter token\n\nChange parameter token of config file\n\n```\nhoard set_parameter_token \u003cparameter_token\u003e\n```\n\n#### Import other trove files from `trove.yml` or urls pointing to a trove.yml file\n\n```\nhoard import /path/to/trove.yml\n```\nor\n```\nhoard import https://troves.com/new_trove.yml\n```\n\n#### Export trove file\n```\nhoard export /path/to/exported/trove.yml\n```\n\n\u003ca name=\"shortcuts\"/\u003e\n\n## :zap: Hoard list shortcuts \n\nShow list of commands in the GUI\n```\n\u003cF1\u003e\n```\n\nNext item in command list\n\n```\n\u003cCtrl-N\u003e / \u003cDown-Arrow\u003e\n```\n\nPrevious item in command list\n\n```\n\u003cCtrl-P\u003e / \u003cCtrl-Y\u003e / \u003cUp-Arrow\u003e\n```\n\nNext namespace tab\n\n```\n\u003cCtrl-L\u003e / \u003cRight-Arrow\u003e\n```\n\nPrevious namespace tab\n\n```\n\u003cCtrl-H\u003e / \u003cLeft-Arrow\u003e\n```\n\nSelect command\n\n```\n\u003cEnter\u003e\n```\n\nQuit\n\n```\n\u003cEsc\u003e / \u003cCtrl-D\u003e / \u003cCtrl-C\u003e / \u003cCtrl-G\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyde46%2Fhoard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyde46%2Fhoard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyde46%2Fhoard/lists"}