Commit Graph

325 Commits

Author SHA1 Message Date
dependabot[bot]
fbd76976ab
chore(deps): bump the cargo group with 2 updates (#2041)
Bumps the cargo group with 2 updates: [rustls](https://github.com/rustls/rustls) and [h2](https://github.com/hyperium/h2).


Updates `rustls` from 0.21.10 to 0.21.11
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.10...v/0.21.11)

Updates `h2` from 0.3.24 to 0.3.26
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  dependency-group: cargo
- dependency-name: h2
  dependency-type: indirect
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-25 07:39:12 +01:00
dependabot[bot]
b636be8b02
chore(deps): bump tokio from 1.36.0 to 1.37.0 (#2033)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.36.0 to 1.37.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.36.0...tokio-1.37.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:09:49 +07:00
dependabot[bot]
ec98f1456d
chore(deps): bump serde from 1.0.197 to 1.0.202 (#2034)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to 1.0.202.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.202)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 09:49:00 +07:00
Jeremy Cline
32930846e6
fix: redact password in database URI when logging (#2032)
Previously, in the event that there was a configuration issue and the
atuin server failed to connect to PostgreSQL, it would log the password.

For example, if the password authentication failed the following log
message would be printed:

Error: failed to connect to db: PostgresSettings { db_uri:
    "postgres://atuin:definitelymypassword@db.example.com/atuin" }

This change sets the password to "****" when printing it via Debug:

Error: failed to connect to db: PostgresSettings { db_uri:
    "postgres://atuin:****@db.example.com/atuin" }

Hopefully few people use **** as the actual password.
2024-05-21 09:25:17 +07:00
dependabot[bot]
7672286814
chore(deps): bump base64 from 0.21.7 to 0.22.1 (#2017)
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.21.7 to 0.22.1.
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.21.7...v0.22.1)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 10:07:20 +07:00
dependabot[bot]
b7f55a7110
chore(deps): bump clap from 4.5.1 to 4.5.4 (#2019)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.1 to 4.5.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.1...v4.5.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 10:07:09 +07:00
Ellie Huxtable
0da534d524
fix: add incremental rebuild to daemon loop (#2010) 2024-05-08 17:28:52 +01:00
Ellie Huxtable
bce0faa1c2
feat: add background daemon (#2006)
* init daemon crate

* wip

* minimal functioning daemon, needs cleanup for sure

* better errors

* add signal cleanup

* logging

* things

* add sync worker

* move daemon crate

* 30s -> 5mins

* make clippy happy

* fix stuff maybe?

* fmt

* trim packages

* rate limit fix

* more protoc huh

* this makes no sense, why linux why

* can it install literally just curl

* windows in ci is slow, and all the newer things will not work there. disable the daemon feature and it will build

* add daemon feature

* maybe this

* ok wut where is protoc

* try setting protoc

* hm

* try copying protoc

* remove optional

* add cross config

* idk nix

* does nix want this?

* some random pkg I found does this

* uh oh

* hack, be gone!

* update contributing
2024-05-08 12:09:04 +01:00
dependabot[bot]
851e581e16
chore(deps): bump serde_with from 3.7.0 to 3.8.1 (#2002)
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.7.0...v3.8.1)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 08:09:55 +01:00
dependabot[bot]
dd751873d5
chore(deps): bump serde_json from 1.0.115 to 1.0.116 (#2003)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 08:09:24 +01:00
Ellie Huxtable
0639ff4960
fix(dotfiles): allow clearing aliases, disable import (#1995)
* fix(dotfiles): allow clearing aliases, disable import

At the moment there are far too many edge cases to handle importing
aliases.

1. We need an interactive shell to print aliases. Without it, most
   shells won't report much.
2. Many people have their shells print things on startup (graphics,
   fortunes, etc). This could be detected as an attempt to set an alias.

 Rather than spend the next year finding import edge cases, I'm
 disabling it for now. There's probably a better way we can do this?

* clippy
2024-05-02 16:53:38 +01:00
Ellie Huxtable
d1ce01679b
feat(history): create atuin-history, add stats to it (#1990)
* feat(history): create atuin-history, add stats to it

I'd like to eventually pull all the history stuff into this crate. Stats
are a nice start, as I'd like to use them from the UI anyways.

* lock

* clippy
2024-04-30 13:16:50 +01:00
dependabot[bot]
150bcb8eb8
chore(deps): bump rustix from 0.38.32 to 0.38.34 (#1986)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.32 to 0.38.34.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.32...v0.38.34)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 08:34:00 +01:00
dependabot[bot]
8363b0c870
chore(deps): bump unicode-width from 0.1.11 to 0.1.12 (#1987)
Bumps [unicode-width](https://github.com/unicode-rs/unicode-width) from 0.1.11 to 0.1.12.
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.11...v0.1.12)

---
updated-dependencies:
- dependency-name: unicode-width
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 08:33:48 +01:00
dependabot[bot]
a5e9c27e74
chore(deps): bump typed-builder from 0.18.1 to 0.18.2 (#1967)
Bumps [typed-builder](https://github.com/idanarye/rust-typed-builder) from 0.18.1 to 0.18.2.
- [Changelog](https://github.com/idanarye/rust-typed-builder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/idanarye/rust-typed-builder/commits)

---
updated-dependencies:
- dependency-name: typed-builder
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-26 12:18:53 +01:00
Tobias Genannt
8b8844887b
chore(deps): Fix ratatui update (#1975)
* chore(deps): bump ratatui from 0.25.0 to 0.26.2

Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.25.0 to 0.26.2.
- [Release notes](https://github.com/ratatui-org/ratatui/releases)
- [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ratatui-org/ratatui/compare/v0.25.0...v0.26.2)

---
updated-dependencies:
- dependency-name: ratatui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build with ratatuin 0.26.2

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 20:22:11 +01:00
dependabot[bot]
9ee1fb809f
chore(deps): bump rustls from 0.21.10 to 0.21.11 in the cargo group (#1962)
Bumps the cargo group with 1 update: [rustls](https://github.com/rustls/rustls).


Updates `rustls` from 0.21.10 to 0.21.11
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.10...v/0.21.11)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-21 11:41:59 +01:00
Ellie Huxtable
a0231a7095
chore(release): prepare for release v18.2.0 (#1950)
* chore(release): prepare for release v18.2.0

* disable codespell for the changelog
2024-04-15 10:37:28 +01:00
Ellie Huxtable
50a73f0552
docs: add missing cli help text (#1945) 2024-04-15 08:33:26 +01:00
Ellie Huxtable
6cd4319fcf
feat(gui): add base structure (#1935)
* initial

* ui things

* cargo

* update, add history refresh button

* history page a bit better, add initial dotfiles page

* re-org layout

* bye squigglies

* add dotfiles ui, show aliases

* add default shell detection

* put stats in a little drawer, alias import changes

* use new table for aliases, add alias deleting

* support adding aliases

* close drawer when added, no alias autocomplete

* clippy, format

* attempt to ensure gdk is installed ok

* sudo

* no linux things on mac ffs

* I forgot we build for windows too... end of day

* remove tauri backend from workspace
2024-04-11 16:59:01 +01:00
Ellie Huxtable
7ced31c354
feat(dotfiles): add alias import (#1938)
* feat(dotfiles): add alias import

* things

* clippy clappy
2024-04-10 13:01:48 +01:00
dependabot[bot]
28084a0963
chore(deps): bump regex from 1.10.3 to 1.10.4 (#1930)
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 13:02:08 +01:00
dependabot[bot]
3ae83460f9
chore(deps): bump sysinfo from 0.30.6 to 0.30.7 (#1888)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.6 to 0.30.7.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.6...v0.30.7)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 09:02:59 +01:00
Xavier Vello
c330636766
feat(server): check PG version before running migrations (#1868) 2024-03-12 18:02:44 +00:00
dependabot[bot]
dc2d0be098
chore(deps): bump whoami from 1.5.0 to 1.5.1 (#1851)
Bumps [whoami](https://github.com/ardaku/whoami) from 1.5.0 to 1.5.1.
- [Changelog](https://github.com/ardaku/whoami/blob/v1/CHANGELOG.md)
- [Commits](https://github.com/ardaku/whoami/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: whoami
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 15:28:46 +00:00
Ellie Huxtable
74182aad42
chore(release): prepare for release v18.1.0 (#1854) 2024-03-11 14:33:03 +00:00
Ellie Huxtable
be6f6534da
chore(deps): cargo update (#1832) 2024-03-06 11:55:39 +00:00
dependabot[bot]
50b043a88b
chore(deps): bump mio (#1824)
Bumps the cargo group group with 1 update: [mio](https://github.com/tokio-rs/mio).


Updates `mio` from 0.8.10 to 0.8.11
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
  dependency-group: cargo-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-05 15:13:04 +00:00
Rain
95e9530dad
fix(build): make atuin compile on non-win/mac/linux platforms (#1825)
Hi!

I've been trying to get atuin set up on the illumos machine I built for work
@oxidecomputer, and I ran into a few issues which are fixed here:

1. The `clipboard` feature was only supported on Windows, Mac and Linux. I've
   added a platform gate for that.
2. The `atomic-write-file` crate needed an update to the version of `nix` --
   that is included.
3. As part of this, I found a [security
   bug](https://rustsec.org/advisories/RUSTSEC-2024-0020.html) in the whoami
   crate. The bug has been fixed upstream and I've included it.

   whoami 1.5.0 deprecates the `hostname` function, which produced some fresh
   warnings. While fixing the warnings I also took the liberty of doing some
   code rearrangement, adding a few functions that wrap some common operations. I
   didn't really know where to put those functions, so I created a new `utils`
   module for it. If you have a better place to put them, I'm happy to change
   the PR.

Feel free to make any changes to this PR if you like before landing it, or to
ask for review.

As a followup I'm also happy to set up a cross-compile build for atuin on
illumos. It's a bit harder to run tests in CI for illumos at the moment, but
I'm trying to get a project started up to make that happen in the future as
well.
2024-03-05 09:49:40 +00:00
dependabot[bot]
5c0455bf9b
chore(deps): bump rustls-pemfile from 2.1.0 to 2.1.1 (#1814)
Bumps [rustls-pemfile](https://github.com/rustls/pemfile) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/rustls/pemfile/releases)
- [Commits](https://github.com/rustls/pemfile/compare/v/2.1.0...v/2.1.1)

---
updated-dependencies:
- dependency-name: rustls-pemfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 16:16:48 +00:00
Ellie Huxtable
a5e1d25287
refactor: rename atuin-config to atuin-dotfiles (#1817) 2024-03-04 15:49:28 +00:00
依云
aec5df4123
feat: support regex with r/.../ syntax (#1745)
* feat: support regex with r/.../ syntax

* cargo fmt

* feat(tests): add some tests for regex matching
2024-03-01 13:21:53 +00:00
Ellie Huxtable
6d62749e19
feat: add atuin doctor (#1796)
* feat add atuin doctor

* registered -> logged_in

* not logged in, no sync info

* add plugin detection

* add a hack

* clippy

* add filesystem detection

* add title

* hmm

* need interactive shell
2024-02-29 15:32:48 +00:00
Remmy Cat Stock
5f0e6dd307
feat(nushell): add nushell completion generation (#1791) 2024-02-29 11:08:32 +00:00
dependabot[bot]
9def30b3c5
chore(deps): bump env_logger from 0.10.2 to 0.11.2 (#1781)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.2 to 0.11.2.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.2...v0.11.2)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-28 14:00:22 +00:00
Ellie Huxtable
d9ba2a0061
chore(deps): cargo update (#1777) 2024-02-26 14:57:32 +00:00
Eric Hodel
a3743f846b
fix(stats): Enable multiple command stats to be shown using unicode_segmentation (#1739)
* Enable multiple command stats to be shown

Add improved pipe splitting

Clean up split logic

Remove unnecessary lifetime annotations

Add per-column command padding

* Add failing test case

* Update #1054 to use unicode_segmentation

This addresses feedback in PR #1054

Closes #1054

* Address cargo clippy, fmt

---------

Co-authored-by: Sorenson Stallings <contact@sorenson.dev>
Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2024-02-26 12:07:59 +00:00
Ellie Huxtable
cf09464d4d
chore(release): prepare for release v18.0.2 (#1775) 2024-02-26 11:37:54 +00:00
Ellie Huxtable
20f3296468
feat: support syncing aliases (#1721)
* feat: support syncing aliases

This is definitely not yet finished, but works for zsh right now.

TODO:

1. Support other shells
2. Cache the alias generation, so we don't have to do a bunch of work at
   shell init time

* correct imports

* fix clippy errors

* fix tests

* add the other shells

* support xonsh

* add delete

* update rust, then make clippy happy once more

* omfg fmt too
2024-02-15 19:07:08 +00:00
Ellie Huxtable
1464cb657a
chore(release): prepare for release v18.0.1 (#1706) 2024-02-12 08:38:23 +00:00
Ellie Huxtable
5738d06282
chore(release): prepare for release v18.0.0 (#1685) 2024-02-09 12:42:34 +00:00
Ellie Huxtable
8460210202
feat: add progress bars to sync and store init (#1684)
Replace lots of logging with some progress bars. This looks much nicer

I'd like to move it out of the atuin-client crate and into the atuin
crate. But first, I want to decouple a lot of the record moving, so it
can wait until that's done.
2024-02-08 13:34:41 +00:00
cyqsimon
318bdd8955
Add timezone configuration option & CLI overrides (#1517)
* Allow specifying a timezone in history search/list

* Fix clippy complaints

* Add a bit more comment on supporting named timezones

* Add rudimentary tests

* Ditch local timezone test

* Timezone configuration support

* Set default timezone to `local`

* `--tz` -> `--timezone`

`--tz` is kept as a visible alias
2024-02-06 15:34:03 +00:00
Ellie Huxtable
9597080825
feat: add store push (#1649)
* feat: add store push

* only push for the current host unless specified

* tidy up

* tidy up some more

* sort features
2024-01-30 13:41:01 +00:00
Conrad Ludgate
bdcb143996
chore(deps): update axum (#1637) 2024-01-28 13:33:45 +00:00
Ellie Huxtable
4b20544474
chore: use resolver 2, update editions + cargo (#1635) 2024-01-26 17:59:06 +00:00
dependabot[bot]
2e3dde64e4
chore(deps): bump argon2 from 0.5.2 to 0.5.3 (#1603)
Bumps [argon2](https://github.com/RustCrypto/password-hashes) from 0.5.2 to 0.5.3.
- [Commits](https://github.com/RustCrypto/password-hashes/compare/argon2-v0.5.2...argon2-v0.5.3)

---
updated-dependencies:
- dependency-name: argon2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 10:00:25 +00:00
dependabot[bot]
732f882c6e
chore(deps): bump the cargo group across 1 directories with 1 update (#1591)
Bumps the cargo group with 1 update in the /. directory: [h2](https://github.com/hyperium/h2).


Updates `h2` from 0.3.22 to 0.3.24
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.22...v0.3.24)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
  dependency-group: cargo-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-19 17:40:10 +00:00
dependabot[bot]
4192fd88c2
chore(deps): bump rustix from 0.38.28 to 0.38.30 (#1566)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.28 to 0.38.30.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.28...v0.38.30)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-17 19:49:06 +00:00
Ellie Huxtable
4d41a741f0
fix(perm): set umask 077 (#1554)
This ensures no other user can read shell history data

Resolves #1250
2024-01-12 18:52:39 +00:00
dependabot[bot]
d426397ca0
chore(deps): bump hyper from 0.14.28 to 1.1.0 (#1520)
Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.28 to 1.1.0.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.28...v1.1.0)

---
updated-dependencies:
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 09:42:27 +00:00
dependabot[bot]
b881268243
chore(deps): bump ratatui from 0.24.0 to 0.25.0 (#1521)
Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/ratatui-org/ratatui/releases)
- [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ratatui-org/ratatui/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: ratatui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 09:42:06 +00:00
Ellie Huxtable
7bc6ccdd70
feat: rework record sync for improved reliability (#1478)
* feat: rework record sync for improved reliability

So, to tell a story

1. We introduced the record sync, intended to be the new algorithm to
   sync history.
2. On top of this, I added the KV store. This was intended as a simple
   test of the record sync, and to see if people wanted that sort of
   functionality
3. History remained syncing via the old means, as while it had issues it
   worked more-or-less OK. And we are aware of its flaws
4. If KV syncing worked ok, history would be moved across

KV syncing ran ok for 6mo or so, so I started to move across history.
For several weeks, I ran a local fork of Atuin + the server that synced
via records instead.

The record store maintained ordering via a linked list, which was a
mistake. It performed well in testing, but was really difficult to debug
and reason about. So when a few small sync issues occured, they took an
extremely long time to debug.

This PR is huge, which I regret. It involves replacing the "parent"
relationship that records once had (pointing to the previous record)
with a simple index (generally referred to as idx). This also means we
had to change the recordindex, which referenced "tails". Tails were the
last item in the chain.

Now that we use an "array" vs linked list, that logic was also replaced.
And is much simpler :D

Same for the queries that act on this data.

----

This isn't final - we still need to add

1. Proper server/client error handling, which has been lacking for a
   while
2. The actual history implementation on top
    This exists in a branch, just without deletions. Won't be much to
    add that, I just don't want to make this any larger than it already
    is

The _only_ caveat here is that we basically lose data synced via the old
record store. This is the KV data from before.

It hasn't been deleted or anything, just no longer hooked up. So it's
totally possible to write a migration script. I just need to do that.

* update .gitignore

* use correct endpoint

* fix for stores with length of 1

* use create/delete enum for history store

* lint, remove unneeded host_id

* remove prints

* add command to import old history

* add enable/disable switch for record sync

* add record sync to auto sync

* satisfy the almighty clippy

* remove file that I did not mean to commit

* feedback
2024-01-05 17:57:49 +00:00
Ellie Huxtable
9f79a34a9d
chore(release): prepare for release v17.2.1 (#1495) 2024-01-03 15:51:47 +00:00
Ellie Huxtable
999a98c577
chore(release): prepare for release v17.2.0 (#1492) 2024-01-03 12:46:08 +00:00
Eric Hodel
d52e576129
feat: Add TLS to atuin-server (#1457)
* Add TLS to atuin-server

atuin as a project already includes most of the dependencies necessary
for server-side TLS.  This allows `atuin server start` to use a TLS
certificate when self-hosting in order to avoid the complication of
wrapping it in a TLS-aware proxy server.

Configuration is handled similar to the metrics server with its own
struct and currently accepts only the private key and certificate file
paths.

Starting a TLS server and a TCP server are divergent because the tests
need to bind to an arbitrary port to avoid collisions across tests.  The
API to accomplish this for a TLS server is much more verbose.

* Fix clippy, fmt

* Add TLS section to self-hosting
2023-12-27 14:15:48 +00:00
Ellie Huxtable
86f50e0356
feat: add semver checking to client requests (#1456)
* feat: add semver checking to client requests

This enforces that the client and the server run the same major version
in order to sync successfully.

We're using the `Atuin-Version` http header to transfer this information

If the user is not on the same MAJOR, then they will see an error like
this

> Atuin version mismatch! In order to successfully sync, the client and the server must run the same *major* version
> Client: 17.1.0
> Server: 18.1.0
> Error: could not sync records due to version mismatch

This change means two things

1. We will now only increment major versions if there is a breaking
   change for sync
2. We can now add breaking changes to sync, for any version >17.1.0.
   Clients will fail in a meaningful way.

* lint, fmt, etc

* only check for client newer than server

* Add version header to client too
2023-12-20 09:03:04 +00:00
Conrad Ludgate
7aeea1c050
chore(deps): uuidv7 stable (#1451) 2023-12-16 19:21:04 +00:00
Conrad Ludgate
ec131c7c96
update basically everything (#1452) 2023-12-16 19:20:40 +00:00
Ellie Huxtable
da2e58fbb1
chore(release): prepare for release v17.1.0 (#1432) 2023-12-10 13:00:59 +00:00
Ellie Huxtable
839965a8d7
chore: update rusty_paseto and rusty_paserk (#1420) 2023-12-02 22:47:41 +00:00
Ellie Huxtable
1c3d6c6ce8
chore: cargo update (#1419) 2023-12-02 11:12:14 +00:00
Ellie Huxtable
e55b34b816
chore: update to sqlx 0.7.3 (#1416) 2023-11-29 09:30:34 +00:00
Ellie Huxtable
15d214e237
feat: add metrics server and http metrics (#1394)
* feat: add metrics server and http metrics

* setup metrics

* update default config

* fix tests
2023-11-16 23:18:13 +00:00
Ellie Huxtable
2959891f58
Release v17.0.1 (#1354) 2023-10-28 19:19:10 +00:00
Tobias Genannt
2066778780
Fix for breaking change in ratatui 0.24.0 (#1352) 2023-10-28 13:30:02 +01:00
Ellie Huxtable
0b22d06ad3
Prepare release v17.0.0 (#1327) 2023-10-25 18:06:59 +00:00
dependabot[bot]
ad6cae4dac
Bump semver from 1.0.18 to 1.0.20 (#1299)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.18 to 1.0.20.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.18...1.0.20)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 15:39:47 -07:00
YummyOreo
da2221a87f
feat: copy to clipboard (#1249)
* feat: adds clipboard as a dep

* feat: add copy if you press ctl+y

* docs: add copy to clipboard to docs
2023-09-30 01:04:26 +00:00
dependabot[bot]
47ea974f54
Bump ratatui from 0.22.0 to 0.23.0 (#1221)
Bumps [ratatui](https://github.com/ratatui-org/ratatui) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/ratatui-org/ratatui/releases)
- [Changelog](https://github.com/ratatui-org/ratatui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ratatui-org/ratatui/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: ratatui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 07:59:33 +00:00
dependabot[bot]
93bb5a9609
Bump shellexpand from 2.1.2 to 3.1.0 (#1186)
Bumps [shellexpand](https://gitlab.com/ijackson/rust-shellexpand) from 2.1.2 to 3.1.0.
- [Commits](https://gitlab.com/ijackson/rust-shellexpand/compare/shellexpand/2.1.2...shellexpand-3.1.0)

---
updated-dependencies:
- dependency-name: shellexpand
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:45:08 +01:00
dependabot[bot]
8c0103dfff
Bump tower-http from 0.3.5 to 0.4.4 (#1210)
Bumps [tower-http](https://github.com/tower-rs/tower-http) from 0.3.5 to 0.4.4.
- [Release notes](https://github.com/tower-rs/tower-http/releases)
- [Commits](https://github.com/tower-rs/tower-http/compare/tower-http-0.3.5...tower-http-0.4.4)

---
updated-dependencies:
- dependency-name: tower-http
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:44:59 +01:00
dependabot[bot]
9dba3d014b
Bump crossterm from 0.26.1 to 0.27.0 (#1222)
Bumps [crossterm](https://github.com/crossterm-rs/crossterm) from 0.26.1 to 0.27.0.
- [Release notes](https://github.com/crossterm-rs/crossterm/releases)
- [Changelog](https://github.com/crossterm-rs/crossterm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossterm-rs/crossterm/compare/0.26.1...0.27.0)

---
updated-dependencies:
- dependency-name: crossterm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:44:34 +01:00
dependabot[bot]
b87159d990
Bump itertools from 0.10.5 to 0.11.0 (#1223)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.5 to 0.11.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 08:44:19 +01:00
Ellie Huxtable
1f3348d789
Run cargo update (#1218) 2023-09-11 09:58:55 +01:00
Conrad Ludgate
f90c01f702
replace chrono with time (#806)
* replace chrono with time

* Fix test chrono usage

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2023-09-11 09:26:05 +01:00
Conrad Ludgate
aa8e5f5c04
Update dependencies (#1181) 2023-08-18 20:45:29 +00:00
Ellie Huxtable
cd6c44cfe7
Update to ratatui 0.22 (#1168) 2023-08-14 09:59:08 +01:00
Ellie Huxtable
0d5332a87f
Prepare release v16.0.0 (#1143)
* Prepare release v16.0.0

* Remove debug output

* Fix kv dupes if the store already exists

* Add limit in frontend as well as sync backend
2023-08-07 11:18:39 +01:00
dependabot[bot]
1013246eda
Bump futures-util from 0.3.24 to 0.3.28 (#1129)
Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.24 to 0.3.28.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.28)

---
updated-dependencies:
- dependency-name: futures-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 22:11:27 +01:00
Conrad Ludgate
c10ba684e0
some simple server tests (#1096)
* some simple server tests

* fmt

* logging in server test

* log server errors

* fix postgres uri

* postgres ports

* localhost again?

* Rebase fixes

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2023-07-27 09:34:13 +01:00
dependabot[bot]
9c7501bbd3
Bump config from 0.13.2 to 0.13.3 (#646)
Bumps [config](https://github.com/mehcode/config-rs) from 0.13.2 to 0.13.3.
- [Release notes](https://github.com/mehcode/config-rs/releases)
- [Changelog](https://github.com/mehcode/config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mehcode/config-rs/compare/0.13.2...0.13.3)

---
updated-dependencies:
- dependency-name: config
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 08:55:03 +01:00
dependabot[bot]
67b7452d4d
Bump h2 from 0.3.14 to 0.3.17 (#873)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.14 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.14...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 08:54:40 +01:00
dependabot[bot]
f22c1375a6
Bump indicatif from 0.17.3 to 0.17.5 (#1050)
Bumps [indicatif](https://github.com/console-rs/indicatif) from 0.17.3 to 0.17.5.
- [Release notes](https://github.com/console-rs/indicatif/releases)
- [Commits](https://github.com/console-rs/indicatif/compare/0.17.3...0.17.5)

---
updated-dependencies:
- dependency-name: indicatif
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 08:54:06 +01:00
dependabot[bot]
d151f8fd6d
Bump serde_json from 1.0.86 to 1.0.99 (#1075)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.86 to 1.0.99.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.86...v1.0.99)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 08:53:55 +01:00
dependabot[bot]
c0e85756dd
Bump colored from 2.0.0 to 2.0.4 (#1110)
Bumps [colored](https://github.com/mackwic/colored) from 2.0.0 to 2.0.4.
- [Release notes](https://github.com/mackwic/colored/releases)
- [Changelog](https://github.com/colored-rs/colored/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mackwic/colored/compare/v2.0.0...v2.0.4)

---
updated-dependencies:
- dependency-name: colored
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-27 08:52:45 +01:00
Ellie Huxtable
f3e707542c
Unvendor ratatui (#1101) 2023-07-17 23:16:37 +01:00
Ellie Huxtable
97e24d0d41
Add new sync (#1093)
* Add record migration

* Add database functions for inserting history

No real tests yet :( I would like to avoid running postgres lol

* Add index handler, use UUIDs not strings

* Fix a bunch of tests, remove Option<Uuid>

* Add tests, all passing

* Working upload sync

* Record downloading works

* Sync download works

* Don't waste requests

* Use a page size for uploads, make it variable later

* Aaaaaand they're encrypted now too

* Add cek

* Allow reading tail across hosts

* Revert "Allow reading tail across hosts"

Not like that

This reverts commit 7b0c72e7e0.

* Handle multiple shards properly

* format

* Format and make clippy happy

* use some fancy types (#1098)

* use some fancy types

* fmt

* Goodbye horrible tuple

* Update atuin-server-postgres/migrations/20230623070418_records.sql

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>

* fmt

* Sort tests too because time sucks

* fix features

---------

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
2023-07-14 20:44:08 +01:00
dependabot[bot]
abccab0790
Bump regex from 1.7.2 to 1.9.1 (#1094)
Bumps [regex](https://github.com/rust-lang/regex) from 1.7.2 to 1.9.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.7.2...1.9.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-14 19:41:20 +01:00
Conrad Ludgate
6c53242b64
record encryption (#1058)
* record encryption

* move paserk impl

* implicit assertions

* move wrapped cek

* add another test

* use host

* undo stray change

* more tests and docs

* fmt

* Update atuin-client/src/record/encryption.rs

Co-authored-by: Matteo Martellini <matteo@mercxry.me>

* Update atuin-client/src/record/encryption.rs

Co-authored-by: Matteo Martellini <matteo@mercxry.me>

* typo

---------

Co-authored-by: Matteo Martellini <matteo@mercxry.me>
2023-06-26 07:52:37 +01:00
Ellie Huxtable
9558fec211
Add RecordIndex data structure (#1059)
* Add RecordIndex data structure

This allows us to compare two sets of record stores, and return a list
of diffs.

With these diffs, we should be able to sync the two stores

* Remove server handler, will follow up with this

* Make clippy happy

* Add tests and docs for diffs in both directions

* Update atuin-common/src/record.rs

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>

---------

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
2023-06-19 09:02:15 +01:00
Conrad Ludgate
b8b57c86af
remove rmp-serde (#1057)
* remove rmp-serde

* use version info
2023-06-18 12:33:55 +01:00
Vlad Stepanov
4077c33adf
Builder interface for History objects (#933)
* [feature] store env variables in History records

WIP: remove `HistoryWithoutDelete`, add some docstrings, tests

* Create History objects through builders.

Assure in compile-time that all required fields
are set for the given construction scenario

* (from #882) split Cmd::run into subfns

* Update `History` doc

* remove rmp-serde from history

* update warning

---------

Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2023-06-15 10:29:40 +00:00
Ellie Huxtable
ae1709dafd
Key values (#1038)
* wip

* Start testing

* Store host IDs, not hostnames

Why? Hostnames can change a lot, and therefore host filtering can be
funky. Really, all we want is a unique ID per machine + do not care what
it might be.

* Mostly just write a fuckload of tests

* Add a v0 kv store I can push to

* Appending works

* Add next() and iterate, test the pointer chain

* Fix sig

* Make clippy happy and thaw the ICE

* Fix tests'

* Fix tests

* typed builder and cleaner db trait

---------

Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2023-06-14 21:18:24 +01:00
J. Emiliano Deustua
79f7b1d81c
Fix --delete-it-all and --delete commands (#913)
* Add `delete_at` is null condition during search

Since entries are searched everytime a delete process ends, the
--delete-it-all command will enter an infinite loop if searching the
whole history.

* Remove command blanking

Command blanking may violate the `unique(timestamp, cwd, command)`
condition.

* Overwrite command with random string when deleting

* Add rand dependency to client crate

---------

Co-authored-by: Ellie Huxtable <ellie@elliehuxtable.com>
2023-06-13 07:43:06 +00:00
dependabot[bot]
b231b82bdd
Bump uuid from 1.2.1 to 1.3.4 (#1046)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.2.1 to 1.3.4.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.2.1...1.3.4)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 08:39:31 +01:00
Conrad Ludgate
8655c93853
refactor server to allow pluggable db and tracing (#1036)
* refactor server to allow pluggable db and tracing

* clean up

* fix descriptions

* remove dependencies
2023-06-12 09:04:35 +01:00
Ellie Huxtable
9e3fa8b88a
Release v15.0.0 (#995)
* Release v15.0.0

* Draft post

* Update contributors
2023-05-28 19:39:45 +01:00
Ellie Huxtable
d2240e1163
Allow server configured page size (#994)
* Allow server configured page size

* Backwards compat via semver checks

* Correct header name
2023-05-21 15:21:51 +00:00
Conrad Ludgate
20845a5cf5
fix broken pipe on history list (#927)
* fix #626

* slightly refactor
2023-05-01 22:31:25 -04:00