TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: HiSHtory: Your shell history in context, synced, and queryable

179 点作者 ddworken超过 2 年前
hiSHtory is a better shell history. It stores your shell history in context (what directory you ran the command it, whether it succeeded or failed, how long it took, etc). This is all stored locally and end-to-end encrypted for syncing to to all your other computers. All of this is easily queryable via Control-R and via the hishtory CLI. This means from your laptop, you can easily find that complex bash pipeline you wrote on your server, and see the context in which you ran it.

23 条评论

pastage超过 2 年前
Sending your command history automatically over the network is always an huge security risk. This tool atleast have a security section in the readme, but nothing about operational security and how to guard against hacks of one synced agent.<p>I will try it because the history tool looks like an interesting take, but the security model is not ok for multi computer use.
评论 #33433429 未加载
nikolay超过 2 年前
How does this compare to Atuin [0]?<p>[0]: <a href="https:&#x2F;&#x2F;atuin.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;atuin.sh&#x2F;</a>
评论 #33433653 未加载
评论 #33430432 未加载
msravi超过 2 年前
Just tried this, and it appears to cause a very significant lag (~2 sec) after each shell command. Removing the sourcing of the config from bashrc and opening a new shell immediately gets rid of the lag. Maybe it&#x27;s because I have HISTSIZE set to a large value...
评论 #33446399 未加载
happens超过 2 年前
So, this syncs through a hosted server somewhere? Can I host my own? That information should be front and center imo, I didn&#x27;t see in anywhere in the Readme.
评论 #33434302 未加载
angrais超过 2 年前
How does this differ from fzf, peco or autin?<p>A table comparing these and existing tools would be ideal to show what&#x27;s unique about this one.
xrd超过 2 年前
Is my new Mycroft AI device capturing my thoughts and sending them on to a Borg-like hivemind? I was just thinking of something like this the other day and here it is on HN!<p>All jokes aside, from reading the threads, I see there are other alternatives, most interestingly atuin and fzf. I used fzf for a while, but didn&#x27;t use the history features. Atuin looks amazing, and installs using nix-shell. My litmus test for whether something is safe to use is nix-shell these days; I&#x27;m not excited about running a curl script into python as my starting point!<p>Does anyone have references on whether atuin and fzf can be used together, or should you only use one or the other? I liked fzf but the encrypted remote sync feature of atuin looks really fascinating.
cshou超过 2 年前
Looks cool. Is it possible to disable sync? For security reasons, I would rather keep everything local
评论 #33431936 未加载
评论 #33433107 未加载
评论 #33431574 未加载
评论 #33431480 未加载
xk3超过 2 年前
I use syncthing instead. But if I switch computers quickly there are conflicts which I resolve like this:<p><pre><code> function sync_history cat ~&#x2F;.local&#x2F;share&#x2F;fish&#x2F;fish_history.sync-conflict-* &gt;&gt;~&#x2F;.local&#x2F;share&#x2F;fish&#x2F;fish_history rm ~&#x2F;.local&#x2F;share&#x2F;fish&#x2F;fish_history.sync-conflict-* end</code></pre>
mdmglr超过 2 年前
I didn&#x27;t see the install.py script in the repo. Would be a good idea to include it.<p>What was much more interesting to me is how this tool hooks into the shell to record commands. This can be found here: <a href="https:&#x2F;&#x2F;github.com&#x2F;ddworken&#x2F;hishtory&#x2F;tree&#x2F;master&#x2F;client&#x2F;lib&#x2F;config.{fish,sh,zsh}" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ddworken&#x2F;hishtory&#x2F;tree&#x2F;master&#x2F;client&#x2F;lib&#x2F;...</a>
评论 #33446351 未加载
henrydark超过 2 年前
Does it handle multiple writers on the same machine? For example two people ssh-ing with the same user to a remote machine with hishtory
评论 #33446355 未加载
ropeladder超过 2 年前
Looks nice! Do all of these shell history replacements completely override native history functionality or just add on to it? (and if I delete something using `hishtory redact` does it delete it from my native shell history too?)<p>Also just a heads up, I find the demo gif to be unintelligibly fast.
评论 #33430658 未加载
rem7超过 2 年前
I wrote something similar that I use across 2 laptops, so it stores it in AWS. The gist of it is firehose to S3 then use Athena to query. My zsh shell sources a script that has functions that uses the AWS cli to post data or query.
评论 #33434059 未加载
encryptluks2超过 2 年前
I&#x27;m confused why you need python 3 to install a Go app?<p>&gt; curl <a href="https:&#x2F;&#x2F;hishtory.dev&#x2F;install.py" rel="nofollow">https:&#x2F;&#x2F;hishtory.dev&#x2F;install.py</a> | python3 -
评论 #33430474 未加载
lolive超过 2 年前
Anyone&#x2F;anything solving the issue of bash histories in multiple (intricated) tmux sessions is an INSTANT win !!!!<p>[Q: can this tool help? As far as in understand, it seems that YEEEES!!!]
评论 #33434775 未加载
评论 #33446362 未加载
flas9sd超过 2 年前
directory context is quite an argument, I assume I can jump back into the directory with the line both - not just get the cli+args?<p>(Btw I read the util name in Sean Connerys voice)
评论 #33430437 未加载
insane_dreamer超过 2 年前
An uninstall feature would be useful.
评论 #33431693 未加载
dabeeeenster超过 2 年前
Is it doing anything clever for the search? Based on path context etc?
zemnmez超过 2 年前
david is one of the smartest people I&#x27;ve ever worked with at Google. It&#x27;s good to see him here :)
yewenjie超过 2 年前
I have been using Atuin for sometime, but I must say, though that looks cool, the fuzzy search results out-of-the-box are useless to me.<p>I used to use something before, probably McFly, that had way better search results.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;cantino&#x2F;mcfly" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cantino&#x2F;mcfly</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;ellie&#x2F;atuin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ellie&#x2F;atuin</a>
评论 #33431948 未加载
评论 #33431294 未加载
LifeIsBio超过 2 年前
I&#x27;ve been using Resh[0] for the past 6 months or so. A rich and queryable shell history is a massive boost in day-to-day productivity. The syncing described here is a pretty cool feature.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;curusarn&#x2F;resh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;curusarn&#x2F;resh</a>
评论 #33430477 未加载
评论 #33431287 未加载
sooheon超过 2 年前
There&#x27;s an app for Macs with iCloud sync as well: <a href="https:&#x2F;&#x2F;loshadki.app&#x2F;shellhistory&#x2F;" rel="nofollow">https:&#x2F;&#x2F;loshadki.app&#x2F;shellhistory&#x2F;</a>
评论 #33472227 未加载
评论 #33430417 未加载
评论 #33431304 未加载
Fileformat超过 2 年前
I do something similar but much, much simpler with a 4-line `precmd` [1] in my .zshrc file. It just records timestamp, directory and command to a file per day. Then you can use standard grep &amp; standard tools to find things.<p>[1] <a href="https:&#x2F;&#x2F;til.marcuse.info&#x2F;bash&#x2F;bash-infinite-history.html" rel="nofollow">https:&#x2F;&#x2F;til.marcuse.info&#x2F;bash&#x2F;bash-infinite-history.html</a>
评论 #33431478 未加载
评论 #33433478 未加载
评论 #33431300 未加载
dpz超过 2 年前
This is interesting but i&#x27;m not interested in the sharing of the history, and i&#x27;m not sure what this offers that using fzf with zsh doesn&#x27;t