{"id":23185763,"url":"https://github.com/ckampfe/shelldb","last_synced_at":"2026-04-12T15:44:19.320Z","repository":{"id":268284487,"uuid":"869829465","full_name":"ckampfe/shelldb","owner":"ckampfe","description":"Record your zsh command history to a SQLite database","archived":false,"fork":false,"pushed_at":"2025-03-02T21:03:50.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T22:19:04.562Z","etag":null,"topics":["database","history","shell","sqlite","zsh"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ckampfe.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-10-09T00:52:15.000Z","updated_at":"2025-03-02T21:03:53.000Z","dependencies_parsed_at":"2024-12-15T19:39:46.801Z","dependency_job_id":"e3ca7d01-6494-4abe-b8b8-e28dd4e73f34","html_url":"https://github.com/ckampfe/shelldb","commit_stats":null,"previous_names":["ckampfe/shelldb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fshelldb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fshelldb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fshelldb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ckampfe%2Fshelldb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ckampfe","download_url":"https://codeload.github.com/ckampfe/shelldb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289398,"owners_count":20914464,"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":["database","history","shell","sqlite","zsh"],"created_at":"2024-12-18T10:12:41.919Z","updated_at":"2026-04-12T15:44:19.261Z","avatar_url":"https://github.com/ckampfe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shelldb\n\nRecord your `zsh` command history to a SQLite database.\n\n## installation\n\nFirst, [install Rust](https://www.rust-lang.org/tools/install).\n\nThen:\n\n```sh\n$ git clone https://github.com/ckampfe/shelldb.git\n$ cd shelldb\n$ cargo install --path . --force\n$ echo \"source /location/of/this_repo/shelldb.sh\" \u003e\u003e ~/.zshrc\n$ source ~/.zshrc\n```\n\n## options\n\nThe environment variable `SHELLDB_HISTORY_DB_PATH` allows you to override the default and set a custom history database location. You should set it in your `.zshrc` before sourcing `shelldb.sh`, and it should look like: `/path/to/your/history.db`.\n\nRun `shelldb -h` to see the other options if you're curious about how `shelldb` works.\n\n## how\n\n`shelldb` hooks in to 2 `zsh` hooks, `preexec` and `precmd` as described [here](https://zsh.sourceforge.io/Doc/Release/Functions.html). The first phase, during `preexec`, records the command, the working directory the command was executed in, and the start time. This first phase returns an id unique to that command that the subsequent `precmd` phase references to then set the exit code and the finish time when the command finishes executing.\n\n## motivation\n\nThis project is like [Atuin](https://github.com/atuinsh/atuin) but _only_ records shell history. \n\nI have no dislike of `Atuin`, but `Atuin` has a lot of features I don't need.\n\nTo that end, `shelldb` is:\n1. _only_ shell history recording, nothing else\n2. a minimal implementation I can 100% understand top-to-bottom\n3. only available for `zsh`, because that's what I use\n\n## is it any good?\n\nyes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckampfe%2Fshelldb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fckampfe%2Fshelldb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fckampfe%2Fshelldb/lists"}