{"id":30801866,"url":"https://github.com/stiliajohny/historikeeper","last_synced_at":"2025-09-05T21:10:38.639Z","repository":{"id":250192404,"uuid":"833747454","full_name":"stiliajohny/historikeeper","owner":"stiliajohny","description":"A ZSH plugin that captures history in a database","archived":false,"fork":false,"pushed_at":"2024-11-20T16:32:45.000Z","size":560,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-20T17:34:07.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stiliajohny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-07-25T16:59:46.000Z","updated_at":"2024-11-20T16:32:48.000Z","dependencies_parsed_at":"2024-07-28T22:42:27.386Z","dependency_job_id":"18d32831-a940-4267-ba8d-c8f03008e677","html_url":"https://github.com/stiliajohny/historikeeper","commit_stats":null,"previous_names":["stiliajohny/historykeeper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stiliajohny/historikeeper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stiliajohny%2Fhistorikeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stiliajohny%2Fhistorikeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stiliajohny%2Fhistorikeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stiliajohny%2Fhistorikeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stiliajohny","download_url":"https://codeload.github.com/stiliajohny/historikeeper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stiliajohny%2Fhistorikeeper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273820972,"owners_count":25174125,"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-09-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2025-09-05T21:10:04.206Z","updated_at":"2025-09-05T21:10:38.636Z","avatar_url":"https://github.com/stiliajohny.png","language":"Shell","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows"],"readme":"\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![GPL3 License][license-shield]][license-url]\n[![LinkedIn][linkedin-shield]][linkedin-url]\n[![Ask Me Anything][ask-me-anything]][personal-page]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/stiliajohny/historikeeper\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/stiliajohny/historikeeper/master/.assets/history-keeper.png\" alt=\"Main Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003ehistorikeeper\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A ZSH plugin that captures history in a database\n    \u003cbr /\u003e\n    \u003ca href=\"./README.md\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/stiliajohny/historikeeper/issues/new?labels=i%3A+bug\u0026template=1-bug-report.md\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/stiliajohny/historikeeper/issues/new?labels=i%3A+enhancement\u0026template=2-feature-request.md\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [About The Project](#about-the-project)\n  - [Built With](#built-with)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Usage](#usage)\n- [Roadmap](#roadmap)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n- [Acknowledgements](#acknowledgements)\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\n\u003c!-- [![historikeeper Screen Shot][product-screenshot]](./.assets/screenshot.png) --\u003e\n\n### Built With\n\n- [Zsh](https://www.zsh.org)\n- [PostgreSQL](https://www.postgresql.org)\n- [SQLite](https://www.sqlite.org)\n- [Docker](https://www.docker.com)\n- [Python](https://www.python.org)\n\n---\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\n### Prerequisites\n\n- Docker\n- PostgreSQL client (optional, for manual access to the database)\n- SQLite (optional, for local file-based logging)\n- Python 3.6+ \n- `pip` (Python package installer)\n\n### Installation\n\n1. **Clone the repo**\n\n   ```sh\n   git clone https://github.com/stiliajohny/historikeeper.git \\$ZSH_CUSTOM/plugins/historikeeper\n   ```\n\n2. **Deploy PostgreSQL with Docker (optional if using PostgreSQL)**\n\n   ```sh\n   docker pull postgres\n   docker run --name postgres-db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=historykeeper -p 5432:5432 -d postgres\n   ```\n\n3. **Install Python dependencies**\n\n   ```sh\n   pip install -r \\$ZSH_CUSTOM/plugins/historikeeper/requirements.txt\n   ```\n\n4. **Add the plugin to your .zshrc configuration**\n\n   ```sh\n   plugins=(... historikeeper)\n   ```\n\n5. **Set variables in your .zshrc**\n\n   ```sh\n   HISTORIKEEPER_PRINT_DETAILS=true\n   HISTORIKEEPER_LOG_METHOD=\"postgres\" # Options: \"postgres\" or \"sqlite\"\n   # if postgress is used then set the following variables\n   PG_HOST=localhost\n   PG_PORT=5432\n   PG_USER=postgres\n   PG_DB=historykeeper\n   PG_PASSWORD=mysecretpassword\n   # if sqlite is used then set the following variables\n   SQLITE_DB_PATH=~/.zsh_history.db\n   ```\n\n6. **Source your .zshrc to apply the changes**\n\n   ```sh\n   source ~/.zshrc\n   ```\n\n---\n\n## Usage\n\n### Import existing history \n\n1. CD in the plugin folder \n   ```bash\n   cd \\$ZSH_CUSTOM/plugins/historikeeper/\n   ```\n2. Run the import command \n   ```bash \n   python3 ./parse_zsh_history.py -vvvv --input-file ~/.zsh_history --pg-host localhost --pg-port 5432 --pg-user postgres --pg-password mysecretpassword --pg-db historykeeper\n   ```\n\n### Normal Plugin Usage\nThe plugin captures each command run in your terminal and logs it to the specified database method (PostgreSQL or SQLite) based on the value of `HISTORIKEEPER_LOG_METHOD`. \n\nYou can view the details of the last command executed directly in your terminal if `HISTORIKEEPER_PRINT_DETAILS` is set to `true`.\n\nExample of what is captured:\n```shell\njohnstilia in ~/.config/oh-my-zsh/custom/plugins/historikeeper on master ● ● λ ls\nHistoriKeeper.plugin.zsh LICENSE.txt              README.md                _config.yml\n\u003e--------------------------------------------------\nLast Command Details:\nEpoch Timestamp: 1721927239\nTimestamp: 2024-07-25T18:07:19+0100\nCommand: ls\nCommand Arguments:\nExit Code: 0\nExecution Time (milliseconds): 12\nHostname: Johns-MacBook-Pro.local\nUsername: johnstilia\nOutput:\nHistoriKeeper.plugin.zsh\nLICENSE.txt\nREADME.md\n_config.yml\nIP Address: Johns-MacBook-Pro.local\nPPID: 58531\nTTY: /dev/ttys055\nWorking Directory: /Users/johnstilia/.config/oh-my-zsh/custom/plugins/historikeeper\nShell Type: /bin/zsh\nSession Start Time: 2024-07-25T18:07:17+0100\nPublic IP Address: 152.37.89.249\nPublic Hostname: 89.37.152.249.bcube.co.uk\n\u003e--------------------------------------------------\nToggling Variables:\nHISTORIKEEPER_PRINT_DETAILS: true\nHISTORIKEEPER_LOG_METHOD: postgres\n\u003e--------------------------------------------------\n```\n\n---\n\n## Roadmap\n\nSee the [open issues](https://github.com/stiliajohny/historikeeper/issues) for a list of proposed features (and known issues).\n\n---\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n---\n\n## License\n\nDistributed under the GPLv3 License. See `LICENSE` for more information.\n\n## Contact\n\nJohn Stilia - stilia.johny@gmail.com\n\n---\n\n## Acknowledgements\n\n- [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet)\n- [Img Shields](https://shields.io)\n- [Choose an Open Source License](https://choosealicense.com)\n- [GitHub Pages](https://pages.github.com)\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/stiliajohny/historikeeper.svg?style=for-the-badge\n[contributors-url]: https://github.com/stiliajohny/historikeeper/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/stiliajohny/historikeeper.svg?style=for-the-badge\n[forks-url]: https://github.com/stiliajohny/historikeeper/network/members\n[stars-shield]: https://img.shields.io/github/stars/stiliajohny/historikeeper.svg?style=for-the-badge\n[stars-url]: https://github.com/stiliajohny/historikeeper/stargazers\n[issues-shield]: https://img.shields.io/github/issues/stiliajohny/historikeeper.svg?style=for-the-badge\n[issues-url]: https://github.com/stiliajohny/historikeeper/issues\n[license-shield]: https://img.shields.io/github/license/stiliajohny/historikeeper?style=for-the-badge\n[license-url]: https://github.com/stiliajohny/historikeeper/blob/master/LICENSE.txt\n[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge\u0026logo=linkedin\u0026colorB=555\n[linkedin-url]: https://linkedin.com/in/john.stilia/\n[product-screenshot]: .assets/screenshot.png\n[ask-me-anything]: https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg?style=for-the-badge\n[personal-page]: https://github.com/stiliajohny\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstiliajohny%2Fhistorikeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstiliajohny%2Fhistorikeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstiliajohny%2Fhistorikeeper/lists"}