{"id":19650962,"url":"https://github.com/dkolmakov/hm","last_synced_at":"2025-08-26T07:05:14.453Z","repository":{"id":50364414,"uuid":"206357004","full_name":"dkolmakov/hm","owner":"dkolmakov","description":"Command line history manager for bash","archived":false,"fork":false,"pushed_at":"2023-03-11T18:32:23.000Z","size":2410,"stargazers_count":29,"open_issues_count":9,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-28T07:36:27.944Z","etag":null,"topics":["bash","bash-history","command-history","directory-history","history-management","history-manager","session-history","zsh","zsh-history"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkolmakov.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}},"created_at":"2019-09-04T15:52:10.000Z","updated_at":"2025-05-04T23:31:36.000Z","dependencies_parsed_at":"2022-09-17T18:56:41.684Z","dependency_job_id":null,"html_url":"https://github.com/dkolmakov/hm","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/dkolmakov/hm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolmakov%2Fhm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolmakov%2Fhm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolmakov%2Fhm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolmakov%2Fhm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkolmakov","download_url":"https://codeload.github.com/dkolmakov/hm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkolmakov%2Fhm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272186306,"owners_count":24888355,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","bash-history","command-history","directory-history","history-management","history-manager","session-history","zsh","zsh-history"],"created_at":"2024-11-11T15:04:38.753Z","updated_at":"2025-08-26T07:05:14.429Z","avatar_url":"https://github.com/dkolmakov.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/dkolmakov/hm/actions/workflows/build-and-test.yml/badge.svg)\n![Code Style](https://github.com/dkolmakov/hm/actions/workflows/code-style.yml/badge.svg)\n\n# hm\nCommand line history manager for bash. \n\n## About\nHistory manager provides an alternative command line history storage with the ability to select a subset of commands and load it into the current Bash session so the \u003ckbd\u003eCtrl\u003c/kbd\u003e\u003ckbd\u003er\u003c/kbd\u003e search is performed on the selected subset. It has an [SQLite](https://www.sqlite.org) database under the hood and, besides the executed command line, stores time, working directory, returned code and a unique terminal session identifier. All additional information may be used as a selection criterion.\n\n## Motivation\n\nThere are two main usage scenarios:\n\n### Recover history\n\nIt is a quite common issue when you need to repeat some actions with a previously developed project but don't remember exact commands you have used for it. History manager provides a way to recover command history related to the specific directory, particular session or both.\n\n### Synchronize history\n\nThe recovery of a history can be assumed as synchronization between previously existed session and the current one. But it may be also useful to synchronize histories of several simultaneously opened terminal sessions so any executed command can be easily shared. History manager solves this by using the same command selection mechanism as for the history recovery case.\n\n## Installation\n\nHistory manager is available as a python package:\n\n```Shell\npip install history-manager\n```\n\nFor other installation options please follow the [link](docs/installation.md)\n\n## Configuration\n\nAt the configuration step the history manager generates configuration file with:\n\n```Shell\nhm-init\n```\nTo enable `hm` in the current session execute:\n\n```Shell\n. ~/.hm/configuration\n```\n\nAnd modify `~/.bashrc` to enable `hm` by default in future sessions:\n\n```Shell\necho \". ~/.hm/configuration\" \u003e\u003e ~/.bashrc\n```\n\nMore details are [here](docs/configuration.md).\n\n## Usage\n\n### Per-directory history recovery\n\nRecovering command history related to the specific directory is performed with:\n\n```Shell\nhm /path/of/interest\n```\nor for the current working directory:\n\n```Shell\nhm .\n```\n\n### Terminal session command history recovery\n\nTo set a terminal session name and to recover the command history related to this name run the following:\n```Shell\nhm -s \"Session Name\"\n```\n\nTo synchronize history with the database using the previously given name:\n```Shell\nhm -s\n```\n\nMore usage examples are [here](docs/usage.md).\n\n## Acknowledgements\n\nHistory manager utilizes the following thirdparty projects:\n- [SQLite](https://www.sqlite.org) - SQL database\n- [apathy](https://github.com/dlecocq/apathy) - header-only path manipulation library\n- [clipp](https://github.com/muellan/clipp) - header-only arguments parsing library\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkolmakov%2Fhm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkolmakov%2Fhm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkolmakov%2Fhm/lists"}