diff --git a/com.quexten.Goldwarden.yml b/.github/com.quexten.Goldwarden.yml similarity index 75% rename from com.quexten.Goldwarden.yml rename to .github/com.quexten.Goldwarden.yml index b177f29..67bdcc4 100644 --- a/com.quexten.Goldwarden.yml +++ b/.github/com.quexten.Goldwarden.yml @@ -32,24 +32,24 @@ modules: - type: git url: https://gitlab.gnome.org/jwestman/blueprint-compiler tag: v0.12.0 - - ./gui/python3-requirements.json + - ../gui/python3-requirements.json - name: goldwarden-python-ui buildsystem: simple build-commands: - mkdir -p /app/bin - - cp -R ./gui/* /app/bin + - cp -R ./* /app/bin - chmod +x /app/bin/goldwarden_ui_main.py - - install -D ./gui/com.quexten.Goldwarden.desktop /app/share/applications/com.quexten.Goldwarden.desktop - - install -D ./gui/goldwarden.svg /app/share/icons/hicolor/scalable/apps/com.quexten.Goldwarden.svg - - install -Dm644 ./gui/com.quexten.Goldwarden.metainfo.xml -t /app/share/metainfo/ + - install -D ./com.quexten.Goldwarden.desktop /app/share/applications/com.quexten.Goldwarden.desktop + - install -D ./goldwarden.svg /app/share/icons/hicolor/scalable/apps/com.quexten.Goldwarden.svg + - install -Dm644 ./com.quexten.Goldwarden.metainfo.xml -t /app/share/metainfo/ - blueprint-compiler batch-compile /app/bin/src/gui/.templates/ /app/bin/src/gui/ /app/bin/src/gui/*.blp sources: - type: dir - path: ./ + path: ../gui/ - name: goldwarden-core-daemon buildsystem: simple build-commands: - install -D goldwarden /app/bin/goldwarden sources: - type: file - path: ./goldwarden \ No newline at end of file + path: ../goldwarden \ No newline at end of file diff --git a/PKGBUILD b/.github/workflows/PKGBUILD similarity index 94% rename from PKGBUILD rename to .github/workflows/PKGBUILD index fa97087..107c80e 100644 --- a/PKGBUILD +++ b/.github/workflows/PKGBUILD @@ -1,5 +1,5 @@ pkgname=goldwarden -pkgver=0.2.16 +pkgver=REPLACED_IN_CI_PIPELINE pkgrel=1 pkgdesc='A feature-packed Bitwarden compatible desktop integration' arch=('x86_64' 'aarch64') @@ -24,6 +24,8 @@ build() { export GOFLAGS="-buildmode=pie -trimpath -modcacherw" export CGO_ENABLED=1 + echo "$pkgver" > cmd/version.txt + go mod tidy go build -o build/$pkgname . } diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 131d52d..05fdf3c 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -43,6 +43,6 @@ jobs: - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: bundle: goldwarden.flatpak - manifest-path: com.quexten.Goldwarden.yml + manifest-path: .github/com.quexten.Goldwarden.yml cache-key: flatpak-builder-${{ github.sha }} arch: ${{ matrix.arch }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 005e6be..6df2973 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -18,6 +18,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Install libfido2-dev run: sudo apt-get install -y libfido2-dev - name: Build Debug @@ -35,6 +37,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Install libfido2-dev run: sudo apt-get install -y libfido2-dev - name: Build @@ -52,6 +56,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Install libfido2-dev run: sudo apt-get install -y libfido2-dev - name: Build @@ -69,6 +75,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Build run: GOARCH=386 go build -tags nofido2 -o goldwarden_linux_x86 -v . - uses: actions/upload-artifact@v3 @@ -85,6 +93,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Set up Homebrew id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master @@ -106,6 +116,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Set up Homebrew id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master @@ -127,6 +139,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - uses: MinoruSekine/setup-scoop@v2 - name: Fido2 run: | @@ -148,6 +162,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "$(git rev-parse --short HEAD)" > ./cli/cmd/version.txt - name: Build run: set GOARCH=arm64 && go build -tags nofido2 -o "goldwarden_windows_aarch64.exe" -v . - uses: actions/upload-artifact@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 238d5cb..2f2c27f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,11 +26,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set up Go uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Install libfido2-dev run: sudo apt-get install -y libfido2-dev - name: Build @@ -39,17 +40,6 @@ jobs: with: files: './goldwarden_linux_x86_64' repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Publish AUR package - uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 - with: - pkgname: goldwarden - updpkgsums: true - pkgbuild: ./PKGBUILD - commit_username: ${{ secrets.AUR_USERNAME }} - commit_email: ${{ secrets.AUR_EMAIL }} - ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} - commit_message: Update AUR package from GitHub Actions automation - ssh_keyscan_types: ed25519 - name: Move binaries to directories run: | mkdir -p .debpkg/usr/bin @@ -93,7 +83,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Set up Go uses: actions/setup-go@v4 with: @@ -109,6 +100,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Set up Go uses: actions/setup-go@v4 with: @@ -125,6 +118,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Set up Go uses: actions/setup-go@v4 with: @@ -146,6 +141,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Set up Go uses: actions/setup-go@v4 with: @@ -167,6 +164,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Set up Go uses: actions/setup-go@v4 with: @@ -188,6 +187,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt - name: Set up Go uses: actions/setup-go@v4 with: @@ -198,3 +199,24 @@ jobs: with: files: './goldwarden_windows_aarch64.exe' repo-token: ${{ secrets.GITHUB_TOKEN }} + + publish_to_aur: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Write version + run: echo "${GITHUB_REF#refs/tags/}" > ./cli/cmd/version.txt + - name: Replace version in PKGBUILD + run: sed -i "s/pkgver=.*/pkgver=${GITHUB_REF#refs\/tags\//}/" ./.github/workflows/PKGBUILD + - name: Publish AUR package + uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 + with: + pkgname: goldwarden + updpkgsums: true + pkgbuild: ./.github/workflows/PKGBUILD + commit_username: ${{ secrets.AUR_USERNAME }} + commit_email: ${{ secrets.AUR_EMAIL }} + ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} + commit_message: Update AUR package from GitHub Actions automation + ssh_keyscan_types: ed25519 \ No newline at end of file diff --git a/.gitignore b/.gitignore index add7776..6cf998c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ flatpak-pip-generator repo __debug* .templates +vendor \ No newline at end of file diff --git a/Readme.md b/Readme.md index cc5c821..71fd203 100644 --- a/Readme.md +++ b/Readme.md @@ -31,8 +31,8 @@ There is a flatpak that includes a small UI, autotype functionality and autostar [Download on Flathub](https://flathub.org/apps/details/com.quexten.Goldwarden) - - + + #### CLI ##### Arch (AUR) @@ -61,12 +61,12 @@ go install github.com/quexten/goldwarden@latest ``` ### Setup and Usage -To get started, follow the instructions provided in the wiki https://github.com/quexten/goldwarden/wiki/Getting-Started. +To get started, follow the instructions provided in the wiki https://github.com/quexten/goldwarden/cli/wiki/Getting-Started. For instructions on specific features, also consult the wiki page for the feature. ### Contributing Interested in contributing a feature or bug-fix? Great! Here is some information on how to set up your development environment: -https://github.com/quexten/goldwarden/wiki/Setting-up-the-Development-Environment +https://github.com/quexten/goldwarden/cli/wiki/Setting-up-the-Development-Environment After that, create a PR. If you encounter any issues, feel free to open a discussion thread. diff --git a/agent/actions/actions.go b/cli/agent/actions/actions.go similarity index 89% rename from agent/actions/actions.go rename to cli/agent/actions/actions.go index 403d39a..131470e 100644 --- a/agent/actions/actions.go +++ b/cli/agent/actions/actions.go @@ -3,14 +3,14 @@ package actions import ( "context" - "github.com/quexten/goldwarden/agent/bitwarden" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/bitwarden" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" + "github.com/quexten/goldwarden/cli/logging" ) var actionsLog = logging.GetLogger("Goldwarden", "Actions") diff --git a/agent/actions/browserbiometrics.go b/cli/agent/actions/browserbiometrics.go similarity index 88% rename from agent/actions/browserbiometrics.go rename to cli/agent/actions/browserbiometrics.go index 7667026..4b910b9 100644 --- a/agent/actions/browserbiometrics.go +++ b/cli/agent/actions/browserbiometrics.go @@ -6,14 +6,14 @@ import ( "fmt" "time" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth/biometrics" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth/biometrics" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleGetBiometricsKey(request messages.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/config.go b/cli/agent/actions/config.go similarity index 97% rename from agent/actions/config.go rename to cli/agent/actions/config.go index e6a7807..5a662f1 100644 --- a/agent/actions/config.go +++ b/cli/agent/actions/config.go @@ -5,10 +5,10 @@ import ( "io" "net/http" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleSetApiURL(request messages.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/getclicredentials.go b/cli/agent/actions/getclicredentials.go similarity index 81% rename from agent/actions/getclicredentials.go rename to cli/agent/actions/getclicredentials.go index 49fbc2d..01ce3d9 100644 --- a/agent/actions/getclicredentials.go +++ b/cli/agent/actions/getclicredentials.go @@ -3,12 +3,12 @@ package actions import ( "fmt" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleGetCliCredentials(request messages.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/login.go b/cli/agent/actions/login.go similarity index 92% rename from agent/actions/login.go rename to cli/agent/actions/login.go index c277ef9..b2facbd 100644 --- a/agent/actions/login.go +++ b/cli/agent/actions/login.go @@ -5,13 +5,13 @@ import ( "fmt" "time" - "github.com/quexten/goldwarden/agent/bitwarden" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/bitwarden" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleLogin(msg messages.IPCMessage, cfg *config.Config, vault *vault.Vault, callingContext *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/logins.go b/cli/agent/actions/logins.go similarity index 93% rename from agent/actions/logins.go rename to cli/agent/actions/logins.go index 399ecd7..4c7da83 100644 --- a/agent/actions/logins.go +++ b/cli/agent/actions/logins.go @@ -4,13 +4,13 @@ import ( "fmt" "runtime/debug" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleGetLoginCipher(request messages.IPCMessage, cfg *config.Config, vault *vault.Vault, ctx *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/send.go b/cli/agent/actions/send.go similarity index 78% rename from agent/actions/send.go rename to cli/agent/actions/send.go index 816f87b..cdf127d 100644 --- a/agent/actions/send.go +++ b/cli/agent/actions/send.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/quexten/goldwarden/agent/bitwarden" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/bitwarden" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleCreateSend(msg messages.IPCMessage, cfg *config.Config, vault *vault.Vault, callingContext *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/ssh.go b/cli/agent/actions/ssh.go similarity index 83% rename from agent/actions/ssh.go rename to cli/agent/actions/ssh.go index 21fc767..8dc9677 100644 --- a/agent/actions/ssh.go +++ b/cli/agent/actions/ssh.go @@ -4,13 +4,13 @@ import ( "context" "strings" - "github.com/quexten/goldwarden/agent/bitwarden" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/ssh" - "github.com/quexten/goldwarden/agent/systemauth" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/bitwarden" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/ssh" + "github.com/quexten/goldwarden/cli/agent/systemauth" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleAddSSH(msg messages.IPCMessage, cfg *config.Config, vault *vault.Vault, callingContext *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/actions/vault.go b/cli/agent/actions/vault.go similarity index 94% rename from agent/actions/vault.go rename to cli/agent/actions/vault.go index c57d4f0..58b5c70 100644 --- a/agent/actions/vault.go +++ b/cli/agent/actions/vault.go @@ -3,15 +3,15 @@ package actions import ( "context" - "github.com/quexten/goldwarden/agent/bitwarden" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth/biometrics" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" + "github.com/quexten/goldwarden/cli/agent/bitwarden" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth/biometrics" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func handleUnlockVault(request messages.IPCMessage, cfg *config.Config, vault *vault.Vault, callingContext *sockets.CallingContext) (response messages.IPCMessage, err error) { diff --git a/agent/bitwarden/auth.go b/cli/agent/bitwarden/auth.go similarity index 97% rename from agent/bitwarden/auth.go rename to cli/agent/bitwarden/auth.go index bf35411..2a6e466 100644 --- a/agent/bitwarden/auth.go +++ b/cli/agent/bitwarden/auth.go @@ -14,13 +14,13 @@ import ( "strings" "time" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/bitwarden/twofactor" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/bitwarden/twofactor" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/logging" "golang.org/x/crypto/pbkdf2" ) diff --git a/agent/bitwarden/ciphers.go b/cli/agent/bitwarden/ciphers.go similarity index 90% rename from agent/bitwarden/ciphers.go rename to cli/agent/bitwarden/ciphers.go index 19187da..e6ba82d 100644 --- a/agent/bitwarden/ciphers.go +++ b/cli/agent/bitwarden/ciphers.go @@ -3,8 +3,8 @@ package bitwarden import ( "context" - "github.com/quexten/goldwarden/agent/bitwarden/models" - "github.com/quexten/goldwarden/agent/config" + "github.com/quexten/goldwarden/cli/agent/bitwarden/models" + "github.com/quexten/goldwarden/cli/agent/config" ) func PostCipher(ctx context.Context, cipher models.Cipher, cfg *config.Config) (models.Cipher, error) { diff --git a/agent/bitwarden/crypto/crypto.go b/cli/agent/bitwarden/crypto/crypto.go similarity index 100% rename from agent/bitwarden/crypto/crypto.go rename to cli/agent/bitwarden/crypto/crypto.go diff --git a/agent/bitwarden/crypto/encstring.go b/cli/agent/bitwarden/crypto/encstring.go similarity index 99% rename from agent/bitwarden/crypto/encstring.go rename to cli/agent/bitwarden/crypto/encstring.go index 3afca3a..cd75e15 100644 --- a/agent/bitwarden/crypto/encstring.go +++ b/cli/agent/bitwarden/crypto/encstring.go @@ -13,7 +13,7 @@ import ( "strconv" "github.com/awnumar/memguard" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var cryptoLog = logging.GetLogger("Goldwarden", "Crypto") diff --git a/agent/bitwarden/crypto/kdf.go b/cli/agent/bitwarden/crypto/kdf.go similarity index 100% rename from agent/bitwarden/crypto/kdf.go rename to cli/agent/bitwarden/crypto/kdf.go diff --git a/agent/bitwarden/crypto/keyhierarchy.go b/cli/agent/bitwarden/crypto/keyhierarchy.go similarity index 100% rename from agent/bitwarden/crypto/keyhierarchy.go rename to cli/agent/bitwarden/crypto/keyhierarchy.go diff --git a/agent/bitwarden/crypto/keyring.go b/cli/agent/bitwarden/crypto/keyring.go similarity index 97% rename from agent/bitwarden/crypto/keyring.go rename to cli/agent/bitwarden/crypto/keyring.go index 58acd33..4d2570f 100644 --- a/agent/bitwarden/crypto/keyring.go +++ b/cli/agent/bitwarden/crypto/keyring.go @@ -3,7 +3,7 @@ package crypto import ( "errors" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var keyringLog = logging.GetLogger("Goldwarden", "Keyring") diff --git a/agent/bitwarden/http.go b/cli/agent/bitwarden/http.go similarity index 100% rename from agent/bitwarden/http.go rename to cli/agent/bitwarden/http.go diff --git a/agent/bitwarden/models/models.go b/cli/agent/bitwarden/models/models.go similarity index 98% rename from agent/bitwarden/models/models.go rename to cli/agent/bitwarden/models/models.go index 5e7075e..80fc114 100644 --- a/agent/bitwarden/models/models.go +++ b/cli/agent/bitwarden/models/models.go @@ -4,7 +4,7 @@ import ( "time" "github.com/google/uuid" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" ) type SyncData struct { diff --git a/agent/bitwarden/passwordless.go b/cli/agent/bitwarden/passwordless.go similarity index 97% rename from agent/bitwarden/passwordless.go rename to cli/agent/bitwarden/passwordless.go index e912b5d..79cf914 100644 --- a/agent/bitwarden/passwordless.go +++ b/cli/agent/bitwarden/passwordless.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "time" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" ) type CreateAuthRequestData struct { diff --git a/agent/bitwarden/send.go b/cli/agent/bitwarden/send.go similarity index 95% rename from agent/bitwarden/send.go rename to cli/agent/bitwarden/send.go index de18338..ba375b3 100644 --- a/agent/bitwarden/send.go +++ b/cli/agent/bitwarden/send.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/vault" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/vault" "golang.org/x/crypto/hkdf" ) diff --git a/agent/bitwarden/sync.go b/cli/agent/bitwarden/sync.go similarity index 89% rename from agent/bitwarden/sync.go rename to cli/agent/bitwarden/sync.go index c927676..44e77ef 100644 --- a/agent/bitwarden/sync.go +++ b/cli/agent/bitwarden/sync.go @@ -7,11 +7,11 @@ import ( "os" "time" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/bitwarden/models" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/bitwarden/models" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/logging" ) var log = logging.GetLogger("Goldwarden", "Bitwarden API") diff --git a/agent/bitwarden/twofactor/fido2twofactor.go b/cli/agent/bitwarden/twofactor/fido2twofactor.go similarity index 96% rename from agent/bitwarden/twofactor/fido2twofactor.go rename to cli/agent/bitwarden/twofactor/fido2twofactor.go index 1524c07..b381c3c 100644 --- a/agent/bitwarden/twofactor/fido2twofactor.go +++ b/cli/agent/bitwarden/twofactor/fido2twofactor.go @@ -10,8 +10,8 @@ import ( "net/url" "github.com/keys-pub/go-libfido2" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" ) const isFido2Enabled = true diff --git a/agent/bitwarden/twofactor/fido2twofactorunsupported.go b/cli/agent/bitwarden/twofactor/fido2twofactorunsupported.go similarity index 82% rename from agent/bitwarden/twofactor/fido2twofactorunsupported.go rename to cli/agent/bitwarden/twofactor/fido2twofactorunsupported.go index 4bbd1f7..332331a 100644 --- a/agent/bitwarden/twofactor/fido2twofactorunsupported.go +++ b/cli/agent/bitwarden/twofactor/fido2twofactorunsupported.go @@ -4,7 +4,8 @@ package twofactor import ( "errors" - "github.com/quexten/goldwarden/agent/config" + + "github.com/quexten/goldwarden/cli/agent/config" ) const isFido2Enabled = false diff --git a/agent/bitwarden/twofactor/twofactor.go b/cli/agent/bitwarden/twofactor/twofactor.go similarity index 94% rename from agent/bitwarden/twofactor/twofactor.go rename to cli/agent/bitwarden/twofactor/twofactor.go index 2a7b409..37f971e 100644 --- a/agent/bitwarden/twofactor/twofactor.go +++ b/cli/agent/bitwarden/twofactor/twofactor.go @@ -5,9 +5,9 @@ import ( "fmt" "strconv" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/logging" ) var twofactorLog = logging.GetLogger("Goldwarden", "TwoFactor") diff --git a/agent/bitwarden/websocket.go b/cli/agent/bitwarden/websocket.go similarity index 95% rename from agent/bitwarden/websocket.go rename to cli/agent/bitwarden/websocket.go index 40f7a7d..551e287 100644 --- a/agent/bitwarden/websocket.go +++ b/cli/agent/bitwarden/websocket.go @@ -9,13 +9,13 @@ import ( "github.com/awnumar/memguard" "github.com/gorilla/websocket" - "github.com/quexten/goldwarden/agent/bitwarden/models" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/systemauth/biometrics" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/bitwarden/models" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/systemauth/biometrics" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/logging" "github.com/vmihailenco/msgpack/v5" ) diff --git a/agent/config/config.go b/cli/agent/config/config.go similarity index 97% rename from agent/config/config.go rename to cli/agent/config/config.go index 9e868a5..a0ab3b1 100644 --- a/agent/config/config.go +++ b/cli/agent/config/config.go @@ -15,12 +15,12 @@ import ( "time" "github.com/google/uuid" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/pincache" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/pincache" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/logging" "github.com/tink-crypto/tink-go/v2/aead/subtle" "golang.org/x/crypto/argon2" "golang.org/x/crypto/sha3" diff --git a/agent/config/lockedbuffer.go b/cli/agent/config/lockedbuffer.go similarity index 100% rename from agent/config/lockedbuffer.go rename to cli/agent/config/lockedbuffer.go diff --git a/agent/defaultmainloop.go b/cli/agent/defaultmainloop.go similarity index 100% rename from agent/defaultmainloop.go rename to cli/agent/defaultmainloop.go diff --git a/agent/notify/beeep.go b/cli/agent/notify/beeep.go similarity index 100% rename from agent/notify/beeep.go rename to cli/agent/notify/beeep.go diff --git a/agent/notify/dbus.go b/cli/agent/notify/dbus.go similarity index 100% rename from agent/notify/dbus.go rename to cli/agent/notify/dbus.go diff --git a/agent/notify/libportal.go b/cli/agent/notify/libportal.go similarity index 100% rename from agent/notify/libportal.go rename to cli/agent/notify/libportal.go diff --git a/agent/notify/linux.go b/cli/agent/notify/linux.go similarity index 92% rename from agent/notify/linux.go rename to cli/agent/notify/linux.go index 9470e84..04af513 100644 --- a/agent/notify/linux.go +++ b/cli/agent/notify/linux.go @@ -5,7 +5,7 @@ package notify import ( "time" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var notificationID uint32 = 1000000 diff --git a/agent/notify/windows.go b/cli/agent/notify/windows.go similarity index 100% rename from agent/notify/windows.go rename to cli/agent/notify/windows.go diff --git a/agent/pincache/pincache.go b/cli/agent/pincache/pincache.go similarity index 90% rename from agent/pincache/pincache.go rename to cli/agent/pincache/pincache.go index 64b3816..c8fe755 100644 --- a/agent/pincache/pincache.go +++ b/cli/agent/pincache/pincache.go @@ -4,7 +4,7 @@ import ( "errors" "github.com/awnumar/memguard" - "github.com/quexten/goldwarden/agent/systemauth/biometrics" + "github.com/quexten/goldwarden/cli/agent/systemauth/biometrics" ) var cachedPin *memguard.Enclave diff --git a/agent/processsecurity/isdelve/isdelve.go b/cli/agent/processsecurity/isdelve/isdelve.go similarity index 100% rename from agent/processsecurity/isdelve/isdelve.go rename to cli/agent/processsecurity/isdelve/isdelve.go diff --git a/agent/processsecurity/isdelve/nodelve.go b/cli/agent/processsecurity/isdelve/nodelve.go similarity index 100% rename from agent/processsecurity/isdelve/nodelve.go rename to cli/agent/processsecurity/isdelve/nodelve.go diff --git a/agent/processsecurity/unimplemented.go b/cli/agent/processsecurity/unimplemented.go similarity index 100% rename from agent/processsecurity/unimplemented.go rename to cli/agent/processsecurity/unimplemented.go diff --git a/agent/processsecurity/unix.go b/cli/agent/processsecurity/unix.go similarity index 96% rename from agent/processsecurity/unix.go rename to cli/agent/processsecurity/unix.go index a5b813b..75a011e 100644 --- a/agent/processsecurity/unix.go +++ b/cli/agent/processsecurity/unix.go @@ -6,7 +6,7 @@ import ( "time" "github.com/godbus/dbus/v5" - "github.com/quexten/goldwarden/agent/processsecurity/isdelve" + "github.com/quexten/goldwarden/cli/agent/processsecurity/isdelve" "golang.org/x/sys/unix" ) diff --git a/agent/sockets/callingcontext.go b/cli/agent/sockets/callingcontext.go similarity index 100% rename from agent/sockets/callingcontext.go rename to cli/agent/sockets/callingcontext.go diff --git a/agent/ssh/keys.go b/cli/agent/ssh/keys.go similarity index 95% rename from agent/ssh/keys.go rename to cli/agent/ssh/keys.go index b2167d2..5bf11ac 100644 --- a/agent/ssh/keys.go +++ b/cli/agent/ssh/keys.go @@ -7,8 +7,8 @@ import ( "io" "github.com/mikesmitty/edkey" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/bitwarden/models" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/bitwarden/models" "golang.org/x/crypto/ssh" ) diff --git a/agent/ssh/ssh.go b/cli/agent/ssh/ssh.go similarity index 94% rename from agent/ssh/ssh.go rename to cli/agent/ssh/ssh.go index dba36f0..e600186 100644 --- a/agent/ssh/ssh.go +++ b/cli/agent/ssh/ssh.go @@ -7,13 +7,13 @@ import ( "fmt" "time" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/logging" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/agent" ) diff --git a/agent/ssh/sshsocketunix.go b/cli/agent/ssh/sshsocketunix.go similarity index 95% rename from agent/ssh/sshsocketunix.go rename to cli/agent/ssh/sshsocketunix.go index d745a86..66af11c 100644 --- a/agent/ssh/sshsocketunix.go +++ b/cli/agent/ssh/sshsocketunix.go @@ -6,7 +6,7 @@ import ( "net" "os" - "github.com/quexten/goldwarden/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/sockets" "golang.org/x/crypto/ssh/agent" ) diff --git a/agent/ssh/sshsocketwindows.go b/cli/agent/ssh/sshsocketwindows.go similarity index 94% rename from agent/ssh/sshsocketwindows.go rename to cli/agent/ssh/sshsocketwindows.go index 6836e81..e69caff 100644 --- a/agent/ssh/sshsocketwindows.go +++ b/cli/agent/ssh/sshsocketwindows.go @@ -4,7 +4,7 @@ package ssh import ( "github.com/Microsoft/go-winio" - "github.com/quexten/goldwarden/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/sockets" "golang.org/x/crypto/ssh/agent" ) diff --git a/agent/systemauth/biometrics/biometrics.go b/cli/agent/systemauth/biometrics/biometrics.go similarity index 89% rename from agent/systemauth/biometrics/biometrics.go rename to cli/agent/systemauth/biometrics/biometrics.go index 159146f..d7c8082 100644 --- a/agent/systemauth/biometrics/biometrics.go +++ b/cli/agent/systemauth/biometrics/biometrics.go @@ -1,7 +1,7 @@ package biometrics import ( - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var log = logging.GetLogger("Goldwarden", "Biometrics") diff --git a/agent/systemauth/biometrics/polkit.go b/cli/agent/systemauth/biometrics/polkit.go similarity index 100% rename from agent/systemauth/biometrics/polkit.go rename to cli/agent/systemauth/biometrics/polkit.go diff --git a/agent/systemauth/biometrics/touchid.go b/cli/agent/systemauth/biometrics/touchid.go similarity index 100% rename from agent/systemauth/biometrics/touchid.go rename to cli/agent/systemauth/biometrics/touchid.go diff --git a/agent/systemauth/biometrics/windows.go b/cli/agent/systemauth/biometrics/windows.go similarity index 100% rename from agent/systemauth/biometrics/windows.go rename to cli/agent/systemauth/biometrics/windows.go diff --git a/agent/systemauth/pinentry/go-pinentry.go b/cli/agent/systemauth/pinentry/go-pinentry.go similarity index 100% rename from agent/systemauth/pinentry/go-pinentry.go rename to cli/agent/systemauth/pinentry/go-pinentry.go diff --git a/agent/systemauth/pinentry/keybase-pinentry.go b/cli/agent/systemauth/pinentry/keybase-pinentry.go similarity index 91% rename from agent/systemauth/pinentry/keybase-pinentry.go rename to cli/agent/systemauth/pinentry/keybase-pinentry.go index 88218ef..0071fdd 100644 --- a/agent/systemauth/pinentry/keybase-pinentry.go +++ b/cli/agent/systemauth/pinentry/keybase-pinentry.go @@ -7,7 +7,7 @@ import ( "github.com/keybase/client/go/logger" "github.com/keybase/client/go/protocol/keybase1" - pinentry "github.com/quexten/goldwarden/agent/systemauth/pinentry/keybase-pinentry" + pinentry "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry/keybase-pinentry" ) func getPassword(title string, description string) (string, error) { diff --git a/agent/systemauth/pinentry/keybase-pinentry/LICENSE.md b/cli/agent/systemauth/pinentry/keybase-pinentry/LICENSE.md similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/LICENSE.md rename to cli/agent/systemauth/pinentry/keybase-pinentry/LICENSE.md diff --git a/agent/systemauth/pinentry/keybase-pinentry/pinentry.go b/cli/agent/systemauth/pinentry/keybase-pinentry/pinentry.go similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/pinentry.go rename to cli/agent/systemauth/pinentry/keybase-pinentry/pinentry.go diff --git a/agent/systemauth/pinentry/keybase-pinentry/pinentry_nix.go b/cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_nix.go similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/pinentry_nix.go rename to cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_nix.go diff --git a/agent/systemauth/pinentry/keybase-pinentry/pinentry_not_osx.go b/cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_not_osx.go similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/pinentry_not_osx.go rename to cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_not_osx.go diff --git a/agent/systemauth/pinentry/keybase-pinentry/pinentry_osx.go b/cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_osx.go similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/pinentry_osx.go rename to cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_osx.go diff --git a/agent/systemauth/pinentry/keybase-pinentry/pinentry_windows.go b/cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_windows.go similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/pinentry_windows.go rename to cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_windows.go diff --git a/agent/systemauth/pinentry/keybase-pinentry/pinentry_x11.go b/cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_x11.go similarity index 100% rename from agent/systemauth/pinentry/keybase-pinentry/pinentry_x11.go rename to cli/agent/systemauth/pinentry/keybase-pinentry/pinentry_x11.go diff --git a/agent/systemauth/pinentry/pinentry.go b/cli/agent/systemauth/pinentry/pinentry.go similarity index 96% rename from agent/systemauth/pinentry/pinentry.go rename to cli/agent/systemauth/pinentry/pinentry.go index 0fe87c2..a2e0fa5 100644 --- a/agent/systemauth/pinentry/pinentry.go +++ b/cli/agent/systemauth/pinentry/pinentry.go @@ -4,7 +4,7 @@ import ( "errors" "os" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var log = logging.GetLogger("Goldwarden", "Pinentry") diff --git a/agent/systemauth/pinentry/unimplemented.go b/cli/agent/systemauth/pinentry/unimplemented.go similarity index 100% rename from agent/systemauth/pinentry/unimplemented.go rename to cli/agent/systemauth/pinentry/unimplemented.go diff --git a/agent/systemauth/systemauth.go b/cli/agent/systemauth/systemauth.go similarity index 94% rename from agent/systemauth/systemauth.go rename to cli/agent/systemauth/systemauth.go index d85374f..eb0c868 100644 --- a/agent/systemauth/systemauth.go +++ b/cli/agent/systemauth/systemauth.go @@ -5,11 +5,11 @@ import ( "math" "time" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/systemauth/biometrics" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/systemauth/biometrics" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/logging" ) var log = logging.GetLogger("Goldwarden", "Systemauth") diff --git a/agent/unixsocketagent.go b/cli/agent/unixsocketagent.go similarity index 95% rename from agent/unixsocketagent.go rename to cli/agent/unixsocketagent.go index f5e7100..a4acef1 100644 --- a/agent/unixsocketagent.go +++ b/cli/agent/unixsocketagent.go @@ -9,19 +9,19 @@ import ( "os" "time" - "github.com/quexten/goldwarden/agent/actions" - "github.com/quexten/goldwarden/agent/bitwarden" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/agent/notify" - "github.com/quexten/goldwarden/agent/processsecurity" - "github.com/quexten/goldwarden/agent/sockets" - "github.com/quexten/goldwarden/agent/ssh" - "github.com/quexten/goldwarden/agent/systemauth" - "github.com/quexten/goldwarden/agent/systemauth/pinentry" - "github.com/quexten/goldwarden/agent/vault" - "github.com/quexten/goldwarden/ipc/messages" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/actions" + "github.com/quexten/goldwarden/cli/agent/bitwarden" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/agent/notify" + "github.com/quexten/goldwarden/cli/agent/processsecurity" + "github.com/quexten/goldwarden/cli/agent/sockets" + "github.com/quexten/goldwarden/cli/agent/ssh" + "github.com/quexten/goldwarden/cli/agent/systemauth" + "github.com/quexten/goldwarden/cli/agent/systemauth/pinentry" + "github.com/quexten/goldwarden/cli/agent/vault" + "github.com/quexten/goldwarden/cli/ipc/messages" + "github.com/quexten/goldwarden/cli/logging" ) const ( diff --git a/agent/vault/vault.go b/cli/agent/vault/vault.go similarity index 98% rename from agent/vault/vault.go rename to cli/agent/vault/vault.go index 7dccc4b..7958619 100644 --- a/agent/vault/vault.go +++ b/cli/agent/vault/vault.go @@ -5,9 +5,9 @@ import ( "strings" "sync" - "github.com/quexten/goldwarden/agent/bitwarden/crypto" - "github.com/quexten/goldwarden/agent/bitwarden/models" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/agent/bitwarden/crypto" + "github.com/quexten/goldwarden/cli/agent/bitwarden/models" + "github.com/quexten/goldwarden/cli/logging" "golang.org/x/exp/slices" ) diff --git a/autotype/libportalautotype.go b/cli/autotype/libportalautotype.go similarity index 98% rename from autotype/libportalautotype.go rename to cli/autotype/libportalautotype.go index 89afeed..2cc317b 100644 --- a/autotype/libportalautotype.go +++ b/cli/autotype/libportalautotype.go @@ -9,7 +9,7 @@ import ( "time" "github.com/godbus/dbus/v5" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var globalID = 0 diff --git a/browserbiometrics/chrome-com.8bit.bitwarden.json b/cli/browserbiometrics/chrome-com.8bit.bitwarden.json similarity index 100% rename from browserbiometrics/chrome-com.8bit.bitwarden.json rename to cli/browserbiometrics/chrome-com.8bit.bitwarden.json diff --git a/browserbiometrics/communication.go b/cli/browserbiometrics/communication.go similarity index 95% rename from browserbiometrics/communication.go rename to cli/browserbiometrics/communication.go index 4e5582c..9f52b5d 100644 --- a/browserbiometrics/communication.go +++ b/cli/browserbiometrics/communication.go @@ -8,7 +8,7 @@ import ( "os" "unsafe" - "github.com/quexten/goldwarden/browserbiometrics/logging" + "github.com/quexten/goldwarden/cli/browserbiometrics/logging" ) const bufferSize = 8192 * 8 diff --git a/browserbiometrics/crypto.go b/cli/browserbiometrics/crypto.go similarity index 100% rename from browserbiometrics/crypto.go rename to cli/browserbiometrics/crypto.go diff --git a/browserbiometrics/goldwarden-proxy.sh b/cli/browserbiometrics/goldwarden-proxy.sh similarity index 100% rename from browserbiometrics/goldwarden-proxy.sh rename to cli/browserbiometrics/goldwarden-proxy.sh diff --git a/browserbiometrics/logging/debuglogger.go b/cli/browserbiometrics/logging/debuglogger.go similarity index 100% rename from browserbiometrics/logging/debuglogger.go rename to cli/browserbiometrics/logging/debuglogger.go diff --git a/browserbiometrics/logging/nooplogger.go b/cli/browserbiometrics/logging/nooplogger.go similarity index 100% rename from browserbiometrics/logging/nooplogger.go rename to cli/browserbiometrics/logging/nooplogger.go diff --git a/browserbiometrics/main.go b/cli/browserbiometrics/main.go similarity index 97% rename from browserbiometrics/main.go rename to cli/browserbiometrics/main.go index a0dee9a..992fdda 100644 --- a/browserbiometrics/main.go +++ b/cli/browserbiometrics/main.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/browserbiometrics/logging" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/browserbiometrics/logging" ) //go:embed mozilla-com.8bit.bitwarden.json diff --git a/browserbiometrics/messages.go b/cli/browserbiometrics/messages.go similarity index 100% rename from browserbiometrics/messages.go rename to cli/browserbiometrics/messages.go diff --git a/browserbiometrics/mozilla-com.8bit.bitwarden.json b/cli/browserbiometrics/mozilla-com.8bit.bitwarden.json similarity index 100% rename from browserbiometrics/mozilla-com.8bit.bitwarden.json rename to cli/browserbiometrics/mozilla-com.8bit.bitwarden.json diff --git a/browserbiometrics/protocol.go b/cli/browserbiometrics/protocol.go similarity index 95% rename from browserbiometrics/protocol.go rename to cli/browserbiometrics/protocol.go index 93799b3..503340e 100644 --- a/browserbiometrics/protocol.go +++ b/cli/browserbiometrics/protocol.go @@ -7,10 +7,10 @@ import ( "io" "os" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/browserbiometrics/logging" - "github.com/quexten/goldwarden/client" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/browserbiometrics/logging" + "github.com/quexten/goldwarden/cli/client" + "github.com/quexten/goldwarden/cli/ipc/messages" ) var runtimeConfig *config.RuntimeConfig diff --git a/client/setup/setup_linux.go b/cli/client/setup/setup_linux.go similarity index 73% rename from client/setup/setup_linux.go rename to cli/client/setup/setup_linux.go index 34916a8..9c0f304 100644 --- a/client/setup/setup_linux.go +++ b/cli/client/setup/setup_linux.go @@ -5,8 +5,8 @@ package setup import ( "fmt" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/cmd" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/cmd" ) func VerifySetup(runtimeConfig config.RuntimeConfig) bool { diff --git a/client/setup/setup_other.go b/cli/client/setup/setup_other.go similarity index 66% rename from client/setup/setup_other.go rename to cli/client/setup/setup_other.go index 23179fe..791a676 100644 --- a/client/setup/setup_other.go +++ b/cli/client/setup/setup_other.go @@ -2,7 +2,7 @@ package setup -import "github.com/quexten/goldwarden/agent/config" +import "github.com/quexten/goldwarden/cli/agent/config" func VerifySetup(runtimeConfig config.RuntimeConfig) bool { return true diff --git a/client/unixsocketclient.go b/cli/client/unixsocketclient.go similarity index 96% rename from client/unixsocketclient.go rename to cli/client/unixsocketclient.go index 1da325e..a6f27be 100644 --- a/client/unixsocketclient.go +++ b/cli/client/unixsocketclient.go @@ -6,8 +6,8 @@ import ( "net" "os" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/ipc/messages" ) const READ_BUFFER = 4 * 1024 * 1024 // 16MB diff --git a/cmd/autofill.go b/cli/cmd/autofill.go similarity index 91% rename from cmd/autofill.go rename to cli/cmd/autofill.go index 1d7dbaf..77b9e62 100644 --- a/cmd/autofill.go +++ b/cli/cmd/autofill.go @@ -7,7 +7,7 @@ import ( "encoding/hex" "os" - "github.com/quexten/goldwarden/autotype" + "github.com/quexten/goldwarden/cli/autotype" "github.com/spf13/cobra" ) diff --git a/cmd/config.go b/cli/cmd/config.go similarity index 99% rename from cmd/config.go rename to cli/cmd/config.go index 712194c..13a07ef 100644 --- a/cmd/config.go +++ b/cli/cmd/config.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/daemonize.go b/cli/cmd/daemonize.go similarity index 98% rename from cmd/daemonize.go rename to cli/cmd/daemonize.go index 8f98aaf..dc41133 100644 --- a/cmd/daemonize.go +++ b/cli/cmd/daemonize.go @@ -6,7 +6,7 @@ import ( "syscall" "github.com/awnumar/memguard" - "github.com/quexten/goldwarden/agent" + "github.com/quexten/goldwarden/cli/agent" "github.com/spf13/cobra" ) diff --git a/cmd/goldwarden.service b/cli/cmd/goldwarden.service similarity index 100% rename from cmd/goldwarden.service rename to cli/cmd/goldwarden.service diff --git a/cmd/login.go b/cli/cmd/login.go similarity index 96% rename from cmd/login.go rename to cli/cmd/login.go index a3dc002..e503f24 100644 --- a/cmd/login.go +++ b/cli/cmd/login.go @@ -6,7 +6,7 @@ package cmd import ( "fmt" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/logins.go b/cli/cmd/logins.go similarity index 97% rename from cmd/logins.go rename to cli/cmd/logins.go index b23560e..705f4f9 100644 --- a/cmd/logins.go +++ b/cli/cmd/logins.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/icza/gox/stringsx" - "github.com/quexten/goldwarden/client" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/client" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/pin.go b/cli/cmd/pin.go similarity index 96% rename from cmd/pin.go rename to cli/cmd/pin.go index d495147..23b1747 100644 --- a/cmd/pin.go +++ b/cli/cmd/pin.go @@ -3,7 +3,7 @@ package cmd import ( "fmt" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/root.go b/cli/cmd/root.go similarity index 89% rename from cmd/root.go rename to cli/cmd/root.go index 888326a..0b4fbfb 100644 --- a/cmd/root.go +++ b/cli/cmd/root.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/client" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/client" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/run.go b/cli/cmd/run.go similarity index 96% rename from cmd/run.go rename to cli/cmd/run.go index e74aca1..1411083 100644 --- a/cmd/run.go +++ b/cli/cmd/run.go @@ -8,7 +8,7 @@ import ( "os" "os/exec" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/send.go b/cli/cmd/send.go similarity index 96% rename from cmd/send.go rename to cli/cmd/send.go index 83f61c5..2e30400 100644 --- a/cmd/send.go +++ b/cli/cmd/send.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/session.go b/cli/cmd/session.go similarity index 97% rename from cmd/session.go rename to cli/cmd/session.go index 17b7ae7..f05d30b 100644 --- a/cmd/session.go +++ b/cli/cmd/session.go @@ -6,7 +6,7 @@ import ( "os" "strings" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/setup_linux.go b/cli/cmd/setup_linux.go similarity index 97% rename from cmd/setup_linux.go rename to cli/cmd/setup_linux.go index bf0228f..b98cf1d 100644 --- a/cmd/setup_linux.go +++ b/cli/cmd/setup_linux.go @@ -11,8 +11,8 @@ import ( "os/user" "strings" - "github.com/quexten/goldwarden/agent/systemauth/biometrics" - "github.com/quexten/goldwarden/browserbiometrics" + "github.com/quexten/goldwarden/cli/agent/systemauth/biometrics" + "github.com/quexten/goldwarden/cli/browserbiometrics" "github.com/spf13/cobra" ) diff --git a/cmd/ssh.go b/cli/cmd/ssh.go similarity index 97% rename from cmd/ssh.go rename to cli/cmd/ssh.go index 6e3349a..d1f18a4 100644 --- a/cmd/ssh.go +++ b/cli/cmd/ssh.go @@ -5,7 +5,7 @@ import ( "os" "github.com/atotto/clipboard" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cmd/vault.go b/cli/cmd/vault.go similarity index 98% rename from cmd/vault.go rename to cli/cmd/vault.go index 305ed5d..a14d82c 100644 --- a/cmd/vault.go +++ b/cli/cmd/vault.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" "github.com/spf13/cobra" ) diff --git a/cli/cmd/version.go b/cli/cmd/version.go new file mode 100644 index 0000000..35fa32e --- /dev/null +++ b/cli/cmd/version.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "fmt" + + _ "embed" + + "github.com/spf13/cobra" +) + +//go:embed version.txt +var version string + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Shows the version of the cli", + Long: `Shows the version of the cli`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println(version) + }, +} + +func init() { + rootCmd.AddCommand(versionCmd) +} diff --git a/cli/cmd/version.txt b/cli/cmd/version.txt new file mode 100644 index 0000000..9001211 --- /dev/null +++ b/cli/cmd/version.txt @@ -0,0 +1 @@ +dev \ No newline at end of file diff --git a/ipc/ipc.go b/cli/ipc/ipc.go similarity index 85% rename from ipc/ipc.go rename to cli/ipc/ipc.go index 251fbac..fe7acdf 100644 --- a/ipc/ipc.go +++ b/cli/ipc/ipc.go @@ -1,7 +1,7 @@ package ipc import ( - "github.com/quexten/goldwarden/ipc/messages" + "github.com/quexten/goldwarden/cli/ipc/messages" ) func ParsedPayload(m messages.IPCMessage) interface{} { diff --git a/ipc/messages/actionresponse.go b/cli/ipc/messages/actionresponse.go similarity index 100% rename from ipc/messages/actionresponse.go rename to cli/ipc/messages/actionresponse.go diff --git a/ipc/messages/biometrics.go b/cli/ipc/messages/biometrics.go similarity index 100% rename from ipc/messages/biometrics.go rename to cli/ipc/messages/biometrics.go diff --git a/ipc/messages/config.go b/cli/ipc/messages/config.go similarity index 100% rename from ipc/messages/config.go rename to cli/ipc/messages/config.go diff --git a/ipc/messages/dologin.go b/cli/ipc/messages/dologin.go similarity index 100% rename from ipc/messages/dologin.go rename to cli/ipc/messages/dologin.go diff --git a/ipc/messages/getclicredentials.go b/cli/ipc/messages/getclicredentials.go similarity index 100% rename from ipc/messages/getclicredentials.go rename to cli/ipc/messages/getclicredentials.go diff --git a/ipc/messages/logins.go b/cli/ipc/messages/logins.go similarity index 100% rename from ipc/messages/logins.go rename to cli/ipc/messages/logins.go diff --git a/ipc/messages/messages.go b/cli/ipc/messages/messages.go similarity index 97% rename from ipc/messages/messages.go rename to cli/ipc/messages/messages.go index 370039f..d177558 100644 --- a/ipc/messages/messages.go +++ b/cli/ipc/messages/messages.go @@ -6,7 +6,7 @@ import ( "hash/fnv" "reflect" - "github.com/quexten/goldwarden/logging" + "github.com/quexten/goldwarden/cli/logging" ) var log = logging.GetLogger("Goldwarden", "IPC Messages") diff --git a/ipc/messages/notes.go b/cli/ipc/messages/notes.go similarity index 100% rename from ipc/messages/notes.go rename to cli/ipc/messages/notes.go diff --git a/ipc/messages/send.go b/cli/ipc/messages/send.go similarity index 100% rename from ipc/messages/send.go rename to cli/ipc/messages/send.go diff --git a/ipc/messages/session.go b/cli/ipc/messages/session.go similarity index 100% rename from ipc/messages/session.go rename to cli/ipc/messages/session.go diff --git a/ipc/messages/sshkeys.go b/cli/ipc/messages/sshkeys.go similarity index 100% rename from ipc/messages/sshkeys.go rename to cli/ipc/messages/sshkeys.go diff --git a/ipc/messages/vault.go b/cli/ipc/messages/vault.go similarity index 100% rename from ipc/messages/vault.go rename to cli/ipc/messages/vault.go diff --git a/logging/llamalogger.go b/cli/logging/llamalogger.go similarity index 100% rename from logging/llamalogger.go rename to cli/logging/llamalogger.go diff --git a/resources/com.quexten.goldwarden.policy b/cli/resources/com.quexten.goldwarden.policy similarity index 100% rename from resources/com.quexten.goldwarden.policy rename to cli/resources/com.quexten.goldwarden.policy diff --git a/gui/com.quexten.Goldwarden.Devel.yml b/gui/com.quexten.Goldwarden.Devel.yml new file mode 100644 index 0000000..55d5991 --- /dev/null +++ b/gui/com.quexten.Goldwarden.Devel.yml @@ -0,0 +1,110 @@ +id: com.quexten.Goldwarden +runtime: org.gnome.Platform +runtime-version: '45' +sdk: org.gnome.Sdk +command: goldwarden_ui_main.py +finish-args: + # Allow network access for sync + - --share=network + + # GUI + - --share=ipc + - --socket=wayland + - --socket=fallback-x11 + - --device=dri + + # Lock on screensave + - --talk-name=org.gnome.ScreenSaver + - --talk-name=org.freedesktop.ScreenSaver + + # Lock on idle + - --talk-name=org.gnome.Mutter.IdleMonitor + + # pinentry & approval + - --talk-name=org.gnome.keyring.SystemPrompter + # biometric / user password auth + - --system-talk-name=org.freedesktop.PolicyKit1 + +build-options: + env: + - GOBIN=/app/bin/.buildtools/golang/bin/ + - GOROOT=/app/bin/.buildtools/golang/ + +modules: + - name: golang + buildsystem: simple + sources: + - type: archive + only-arches: + - aarch64 + url: https://go.dev/dl/go1.22.2.linux-arm64.tar.gz + sha256: 36e720b2d564980c162a48c7e97da2e407dfcc4239e1e58d98082dfa2486a0c1 + x-checker-data: + type: anitya + project-id: 1227 + stable-only: true + url-template: https://go.dev/dl/go$version.linux-arm64.tar.gz + - type: archive + only-arches: + - x86_64 + url: https://go.dev/dl/go1.22.2.linux-amd64.tar.gz + sha256: 5901c52b7a78002aeff14a21f93e0f064f74ce1360fce51c6ee68cd471216a17 + x-checker-data: + type: anitya + project-id: 1227 + stable-only: true + url-template: https://go.dev/dl/go$version.linux-amd64.tar.gz + build-commands: + - mkdir -p /app/bin/.buildtools/golang/ + - install -d /app/bin/.buildtools/golang/ + - cp -rpv * /app/bin/.buildtools/golang/ + - name: go-vendor + buildsystem: simple + build-commands: + - mkdir -p /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/vendor/ + - cp -r ./* /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/vendor/ + sources: + - type: dir + path: ../vendor/ + - name: go-cli + buildsystem: simple + build-commands: + - mkdir -p /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/cli/ + - cp -r ./* /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/cli/ + sources: + - type: dir + path: ../cli/ + - name: goldwarden-core-daemon + buildsystem: simple + build-commands: + - cp -r ./* /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/ + - cd /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/ && /app/bin/.buildtools/golang/bin/go build -o goldwarden . + - cd /app/bin/.buildtools/golang/src/github.com/quexten/goldwarden/ && install -D goldwarden /app/bin/goldwarden + sources: + - type: file + path: ../main.go + - type: file + path: ../go.mod + - type: file + path: ../go.sum + - name: "blueprint-compiler" + buildsystem: meson + cleanup: ['*'] + sources: + - type: git + url: https://gitlab.gnome.org/jwestman/blueprint-compiler + tag: v0.12.0 + - ./python3-requirements.json + - name: goldwarden-python-ui + buildsystem: simple + build-commands: + - mkdir -p /app/bin + - cp -R ./gui/* /app/bin + - chmod +x /app/bin/goldwarden_ui_main.py + - install -D ./gui/com.quexten.Goldwarden.desktop /app/share/applications/com.quexten.Goldwarden.desktop + - install -D ./gui/goldwarden.svg /app/share/icons/hicolor/scalable/apps/com.quexten.Goldwarden.svg + - install -Dm644 ./gui/com.quexten.Goldwarden.metainfo.xml -t /app/share/metainfo/ + - blueprint-compiler batch-compile /app/bin/src/gui/.templates/ /app/bin/src/gui/ /app/bin/src/gui/*.blp + sources: + - type: dir + path: ./../ \ No newline at end of file diff --git a/gui/src/gui/settings.py b/gui/src/gui/settings.py index c37a126..ab88cd2 100644 --- a/gui/src/gui/settings.py +++ b/gui/src/gui/settings.py @@ -126,7 +126,7 @@ class GoldwardenSettingsApp(Adw.Application): def show_about(self): dialog = Adw.AboutWindow(transient_for=app.get_active_window()) dialog.set_application_name("Goldwarden") - dialog.set_version("dev") + dialog.set_version(goldwarden.version()) dialog.set_developer_name("Bernd Schoolmann (Quexten)") dialog.set_license_type(Gtk.License(Gtk.License.MIT_X11)) dialog.set_comments("A Bitwarden compatible password manager") diff --git a/gui/src/services/goldwarden.py b/gui/src/services/goldwarden.py index 633454b..d691c17 100644 --- a/gui/src/services/goldwarden.py +++ b/gui/src/services/goldwarden.py @@ -140,6 +140,10 @@ def autotype(text): process.stdin.flush() process.wait() +def version(): + result = send_authenticated_command(f"version") + return result.strip() + def is_daemon_running(): result = send_authenticated_command(f"vault status") daemon_not_running = ("daemon running" in result) diff --git a/main.go b/main.go index 6d34f7c..59eff51 100644 --- a/main.go +++ b/main.go @@ -4,9 +4,9 @@ import ( "os" "strings" - "github.com/quexten/goldwarden/agent/config" - "github.com/quexten/goldwarden/browserbiometrics" - "github.com/quexten/goldwarden/cmd" + "github.com/quexten/goldwarden/cli/agent/config" + "github.com/quexten/goldwarden/cli/browserbiometrics" + "github.com/quexten/goldwarden/cli/cmd" ) func main() {