Commit graph

566 commits

Author SHA1 Message Date
Ellie Huxtable
465faca6d1
Add workspace mode, enable if in git repo (#1053)
* Add workspace mode, enable if in git repo

* Fix tests

* Should now be good

* Page filter modes correctly if in workspace
2023-07-14 19:58:20 +00:00
Ellie Huxtable
5d26d3f47a
Delete the count cache row when a user is deleted (#1103) 2023-07-14 20:45:10 +01:00
Ellie Huxtable
5786155969
Add total history count to the index API (#1102)
Thought it would be fun to collect some cool stats, maybe put them on
atuin.sh.
2023-07-14 20:44:47 +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 7b0c72e7e050c358172f9b53cbd21b9e44cf4931.

* 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]
3d4302ded1
Bump semver from 5.7.1 to 5.7.2 in /docs (#1100)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  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-14 19:59:47 +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
db83d9598f
write some key tests (#1095) 2023-07-14 07:50:28 +01:00
Ellie Huxtable
491433afd5
Add OG image (#1097)
* Add OG image

* Fix

* byebye
2023-07-11 12:28:48 +01:00
Conrad Ludgate
58d53a662f
atuin crypto blog post (#1079) 2023-07-11 08:28:11 +01:00
DS/Charlie
998bd5be89
fix for zsh no-unset environments (#921) 2023-07-10 09:34:24 +00:00
Ellie Huxtable
6c6f5f8187
Update docusaurus.config.js 2023-07-09 14:39:11 +01:00
Simon
a6c4f2c23e
Update config.toml path default comments (#1092)
- Updates outdated mac db_path default
- Adds windows db_path default
- Adds windows, mac, linux defaults for key_path and session_path
- Changes example session_path to be different to example key_path
2023-07-08 22:46:12 +00:00
Conrad Ludgate
8c94d798c6
fix key encodings again (#1089) 2023-07-08 21:11:25 +01:00
JT
eb5e1c213c
update nushell env update syntax (#1080) 2023-06-30 18:30:36 +00:00
Ellie Huxtable
ef88444f21
Update key-binding.md 2023-06-27 20:18:29 +01:00
Ethan Brierley
0ca72ee01a
Update nu section in key-bindings.md - set-env -> let-env (#1074)
I don't think `set-env` exists 🤔 

```
❯ : set-env ATUIN_NOBIND = true
Error: nu:🐚:external_command

  × External command failed
   ╭─[entry #6:1:1]
 1 │ set-env ATUIN_NOBIND = true
   · ───┬───
   ·    ╰── did you mean 'let-env'?
   ╰────
  help: No such file or directory (os error 2)
```
2023-06-26 08:27:24 +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
1a63649608 More redirects 2023-06-21 09:45:27 +01:00
Ellie Huxtable
190c468388
Move key binding docs so they can be more easily found (#1067)
* Move key binding docs so they can be more easily found

* Redirect
2023-06-21 09:28:45 +01:00
Ellie Huxtable
cb25aaa90e
Redirect old docs (#1066) 2023-06-21 09:21:19 +01:00
Ellie Huxtable
395aa81c2a
Revamp getting started guide (#1065)
We were lacking some docs here really. Walk new users through getting
installed and signed up!

Coming next

- Common config (how to disable the up arrow lol)
- Troubleshooting
- Community config/integrations
2023-06-21 09:14:55 +01:00
Conrad Ludgate
a75e516986
remove decryption from api-client (#1063) 2023-06-21 08:45:23 +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
YummyOreo
85c7339e65
fix: fixes unix specific impl of shutdown_signal (#1061) 2023-06-19 08:14:03 +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
3c649b5b3a
clean apt cache in Dockerfile (#932)
* clean apt cache in Dockerfile

* Change /app to app, to be in sync with changes from mainline
2023-06-16 21:59:52 +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
0c75cfbfda
Add namespaces to kv store (#1052) 2023-06-15 08:17:30 +01: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
dependabot[bot]
d50ccceef2
Bump debian from bullseye-20230502-slim to bullseye-20230612-slim (#1047)
Bumps debian from bullseye-20230502-slim to bullseye-20230612-slim.

---
updated-dependencies:
- dependency-name: debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 09:04:56 +01:00
mmx
dea6898f2d
update release.yaml add RUSTFLAGS, add qemu-user, add QEMU_PREFIX before gen-completions (#872) 2023-06-13 08:54:27 +01:00
Maxim Burgerhout
73b006fe2b
Make requirement of PostgreSQL 14 explicit (#1048) 2023-06-13 07:52:53 +00: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
Peter Brunner
a6da5340e7
add support to override hostname and username via env var (#1041) 2023-06-12 16:58:46 +00: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
Jan Larres
dccdb2c33f
Make Ctrl-d behaviour match other tools (#1040)
With this change Ctrl-d behaves differently depending on whether there
is any input text available. If there is, it will delete the character
to the right of the cursor if there is any. If there isn't it will
instead quit interactive mode and leave the original shell command line
unchanged.
This matches other line-based tools like bash and fzf.
2023-06-11 21:48:32 +01:00
Jan Larres
a224a8e4d3
Fix movement keys in inverted mode (#1035)
* Extract scrolling code into functions

* Fix movement keys when inverted

* remove extra len param

---------

Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2023-06-08 12:28:17 +00:00
dependabot[bot]
49f0def12b
Bump lukemathwalker/cargo-chef (#1026)
Bumps lukemathwalker/cargo-chef from latest-rust-1.68.0 to latest-rust-1.70.0.

---
updated-dependencies:
- dependency-name: lukemathwalker/cargo-chef
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-08 08:55:08 +01:00
YummyOreo
3593f51990
feat: do not allow empty passwords durring account creation (#1029)
* feat: do not allow empty passwords durring account creation

* refactor: rustfmt
2023-06-06 06:58:38 +01:00
Anish Pallati
f499ae84ed
fix: Adjust broken link to supported shells (#1013) 2023-05-30 20:34:42 +01:00
éclairevoyant
f8585e6109
Update Arch Linux links in README (#1016) 2023-05-30 09:49:00 +00:00
Marijan Smetko
5dc189cf83
Add graceful shutdown on SIGTERM (#1014)
* Add graceful shutdown on SIGTERM

* Fix linter
2023-05-30 05:51:16 +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
Ed Ive
e695693d83
Make volume path absolute (#1009)
* Make volume path absolute

* Update docs/docs/self-hosting/docker.md
2023-05-27 16:27:42 +00:00
Per Modin
6118da2ee2
Fix typo in config.toml (#1006)
Typo in config key `filter_mode_shell_up_key_binding` that's fixed by
this commit, and while at it fix a minor typo in a comment.

Co-authored-by: Per Modin <per@wgtwo.com>
2023-05-24 22:00:01 +00:00
Hilmar Wiegand
d21b691bcf
Add option to completely disable help row (#993)
* Add option to completely disable help row

* Pass full settings object to draw command

* Add documentation for show_help
2023-05-22 11:10:11 +00:00
Ellie Huxtable
5b5e4eaa86
Input bar at the top if we are in inline mode (#866)
* Put input chunk at the top in inline mode

* Invert the search results if bar is at top

* fix styling on reversed rendering

* add setting

* settings

---------

Co-authored-by: Patrick Decat <pdecat@gmail.com>
Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2023-05-21 17:42:44 +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
Ellie Huxtable
ca263834e9
Restructure account commands to account subcommand (#984)
* Stop running triggers on history delete

* Move to account management dir

* Alter trigger function to only run for inserts

* wip

* Add atuin account subcommands, and re-org delete

* Clarify docs

* Delete silly dupe migration

* Um where did this come from

* Oops, insert only plz
2023-05-17 21:28:37 +01:00