├── .github └── workflows │ ├── debug.yml │ ├── install.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE ├── README.md ├── codecov.yml ├── gpt-cli.svg ├── install.sh ├── nfpm.yaml ├── snapcraft.yaml ├── src ├── cache.rs ├── cache │ └── tests │ │ └── rand_hash.rs ├── decompose.rs ├── get_postprocess_action.rs ├── gpt3.rs ├── main.rs └── should_exit.rs └── test_version.sh /.github/workflows/debug.yml: -------------------------------------------------------------------------------- 1 | name: Debug 2 | 3 | on: 4 | push: 5 | branches: ['*'] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | # snap: 10 | # runs-on: ubuntu-latest 11 | # steps: 12 | # - uses: actions/checkout@v3 13 | # - name: Install shunit 14 | # run: sudo apt install -y shunit2 15 | # - uses: snapcore/action-build@v1 16 | # id: snapcraft 17 | # - uses: actions/upload-artifact@v3 18 | # with: 19 | # name: snap 20 | # path: ${{ steps.snapcraft.outputs.snap }} 21 | # - run: | 22 | # sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }} --classic 23 | # - run: alias p=gpt-cli 24 | # - run: ./test_version.sh 25 | # debug: 26 | # runs-on: ubuntu-latest 27 | # steps: 28 | # - uses: actions/checkout@v3 29 | # - name: Install nFPM 30 | # run: | 31 | # echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list 32 | # sudo apt update 33 | # sudo apt install -y nfpm shunit2 xorg-dev libxcb-composite0-dev 34 | # - run: cargo build --release 35 | # - run: nfpm pkg --packager deb --target target 36 | # - run: sudo apt install ./target/gpt-cli_0.0.16_amd64.deb 37 | # - run: ./test_version.sh 38 | deb-rpm: 39 | runs-on: ubuntu-latest 40 | steps: 41 | - uses: actions/checkout@v3 42 | - name: Install nFPM 43 | run: | 44 | echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list 45 | sudo apt update 46 | sudo apt install -y nfpm shunit2 xorg-dev libxcb-composite0-dev 47 | - run: cargo build --release 48 | - name: Get release information 49 | run: | 50 | RELEASE_TAG=$(echo "v0.0.17" | sed "s|v||") 51 | echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV 52 | - name: Update fallback release URL 53 | run: | 54 | sed -i "s|version: .*|version: \"${{ env.RELEASE_TAG }}\"|" nfpm.yaml 55 | # - name: Commit changes 56 | # uses: EndBug/add-and-commit@v9 57 | # with: 58 | # author_name: Daniel Gustaw 59 | # author_email: gustaw.daniel@gmail.com 60 | # message: "updated nfpm.yaml version to ${{ env.RELEASE_TAG }}" 61 | # add: 'nfpm.yaml' 62 | # push: origin HEAD:main 63 | # tag_push: '--force' 64 | 65 | - run: cat nfpm.yaml 66 | - run: nfpm pkg --packager deb --target target 67 | - run: ls -la target 68 | - run: sudo apt install ./target/gpt-cli_${{ env.RELEASE_TAG }}_amd64.deb 69 | - run: ./test_version.sh 70 | - run: nfpm pkg --packager rpm --target target 71 | - run: nfpm pkg --packager archlinux --target target 72 | - name: Compute shasums 73 | run: | 74 | mv ./target/gpt-cli_${{ env.RELEASE_TAG }}_amd64.deb gpt-cli_amd64.deb 75 | mv ./target/gpt-cli-${{ env.RELEASE_TAG }}.x86_64.rpm gpt-cli.x86_64.rpm 76 | mv ./target/gpt-cli-${{ env.RELEASE_TAG }}-1-x86_64.pkg.tar.zst gpt-cli-x86_64.pkg.tar.zst 77 | shasum -a 256 gpt-cli_amd64.deb | cut -d " " -f 1 > gpt-cli_amd64.deb.sha256.txt 78 | shasum -a 256 gpt-cli.x86_64.rpm | cut -d " " -f 1 > gpt-cli.x86_64.rpm.sha256.txt 79 | - run: ls -la 80 | # - name: Release 81 | # uses: softprops/action-gh-release@v1 82 | # env: 83 | # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 84 | # with: 85 | # files: | 86 | # gpt-cli_amd64.deb 87 | # gpt-cli.x86_64.rpm 88 | # gpt-cli_amd64.deb.sha256.txt 89 | # gpt-cli.x86_64.rpm.sha256.txt 90 | # gpt-cli-x86_64.pkg.tar.zst -------------------------------------------------------------------------------- /.github/workflows/install.yml: -------------------------------------------------------------------------------- 1 | name: Install 2 | 3 | on: 4 | push: 5 | branches: ['*'] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | ubuntu: 10 | runs-on: ubuntu-latest 11 | container: 12 | image: ubuntu 13 | steps: 14 | - uses: actions/checkout@v3 15 | - run: apt update -y 16 | - run: apt install wget sudo -y 17 | - run: ./install.sh 18 | - run: apt install shunit2 -y 19 | - run: ./test_version.sh 20 | 21 | fedora: 22 | runs-on: ubuntu-latest 23 | container: 24 | image: fedora 25 | steps: 26 | - uses: actions/checkout@v3 27 | - run: dnf install wget sudo -y 28 | - run: ./install.sh 29 | - run: dnf install shunit2 -y 30 | - run: ./test_version.sh 31 | 32 | archlinux: 33 | runs-on: ubuntu-latest 34 | container: 35 | image: archlinux 36 | steps: 37 | - uses: actions/checkout@v3 38 | - run: pacman -Sy wget sudo --noconfirm 39 | - run: ./install.sh 40 | - run: | 41 | curl -sLo /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2 42 | chmod +x /usr/local/bin/shunit2 43 | mkdir -p /usr/share/shunit2 44 | ln -s /usr/local/bin/shunit2 /usr/share/shunit2/shunit2 45 | # - run: cat Cargo.toml 46 | # - run: grep -E "^version" Cargo.toml 47 | # - run: grep -E "^version" Cargo.toml | cut -d "\"" -f 2 48 | # - run: gpt-cli --version 49 | - run: ./test_version.sh 50 | 51 | opensuse: 52 | runs-on: ubuntu-latest 53 | container: 54 | image: opensuse/tumbleweed 55 | steps: 56 | - run: zypper --non-interactive install wget sudo tar gzip 57 | - uses: actions/checkout@v3 58 | - run: ./install.sh 59 | - run: | 60 | curl -sLo /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2 61 | chmod +x /usr/local/bin/shunit2 62 | mkdir -p /usr/share/shunit2 63 | ln -s /usr/local/bin/shunit2 /usr/share/shunit2/shunit2 64 | - run: ./test_version.sh 65 | 66 | alpine: 67 | runs-on: ubuntu-latest 68 | container: 69 | image: alpine 70 | steps: 71 | - uses: actions/checkout@v3 72 | - run: apk add wget sudo bash 73 | - run: ./install.sh 74 | - run: | 75 | wget -qO /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2 76 | chmod +x /usr/local/bin/shunit2 77 | mkdir -p /usr/share/shunit2 78 | ln -s /usr/local/bin/shunit2 /usr/share/shunit2/shunit2 79 | - run: ./test_version.sh 80 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | release: 5 | types: [ created ] 6 | 7 | jobs: 8 | gnu-bash: 9 | permissions: 10 | contents: write 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@master 14 | - name: Install clipboard deps 15 | run: sudo apt install xorg-dev libxcb-composite0-dev 16 | - run: cargo build --target x86_64-unknown-linux-gnu --release 17 | - run: cp target/x86_64-unknown-linux-gnu/release/gpt-cli gpt-cli.gnu 18 | - run: shasum -a 256 gpt-cli.gnu | cut -d " " -f 1 > gpt-cli.gnu.sha256.txt 19 | - name: Release 20 | uses: softprops/action-gh-release@v1 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 23 | with: 24 | files: | 25 | gpt-cli.gnu 26 | gpt-cli.gnu.sha256.txt 27 | - name: Update fallback release URL 28 | run: sed -i "s|FALLBACK_RELEASE_URL=.*|FALLBACK_RELEASE_URL=https://api.github.com/repos/gustawdaniel/gpt-cli/releases/${{ github.event.release.id }}|" install.sh 29 | - name: Commit changes 30 | uses: EndBug/add-and-commit@v9 31 | with: 32 | author_name: Daniel Gustaw 33 | author_email: gustaw.daniel@gmail.com 34 | message: "updated fallback release url to ${{ github.event.release.id }}" 35 | add: 'install.sh' 36 | push: origin HEAD:main 37 | tag_push: '--force' 38 | 39 | aur: 40 | needs: gnu-bash 41 | runs-on: ubuntu-latest 42 | container: 43 | image: archlinux:latest 44 | steps: 45 | - name: Install base-devel 46 | run: | 47 | pacman -Syu --noconfirm base-devel wget bc 48 | - name: Get release information 49 | run: | 50 | RELEASE_TAG=$(echo ${{ github.event.release.tag_name }} | sed "s|v||") 51 | echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV 52 | - name: Use release information 53 | run: | 54 | echo "Using release tag: $RELEASE_TAG" 55 | - name: Setup environment 56 | run: | 57 | echo "PKGVER=${{ env.RELEASE_TAG }}" >> $GITHUB_ENV 58 | echo "PKGREL=$(echo "1+$(curl "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=gpt-cli" | head -n 3 | tail -n 1 | cut -d "=" -f 2)" | bc)" >> $GITHUB_ENV 59 | - run: echo ${{ env.PKGVER }} 60 | - name: Setup environment2 61 | run: | 62 | wget "https://github.com/gustawdaniel/gpt-cli/releases/download/v${{ env.PKGVER }}/gpt-cli.gnu" -O gpt-cli.gnu 63 | echo "CHECKSUM=$(sha512sum gpt-cli.gnu | cut -d " " -f 1)" >> $GITHUB_ENV 64 | 65 | - name: Prepare PKGBUILD 66 | run: | 67 | cat <> PKGBUILD 68 | pkgname=gpt-cli 69 | pkgver=${{ env.PKGVER }} 70 | pkgrel=${{ env.PKGREL }} 71 | pkgdesc="Run linux commands with natural language. Eg 'show my graphic card' instead 'lspci | grep VGA'" 72 | arch=('x86_64') 73 | url="https://github.com/gustawdaniel/gpt-cli" 74 | license=('MIT') 75 | depends=('xorg-server-devel' 'libxcb') 76 | options=() 77 | source_x86_64=("https://github.com/gustawdaniel/gpt-cli/releases/download/v${{ env.PKGVER }}/gpt-cli.gnu") 78 | sha512sums_x86_64=('${{ env.CHECKSUM }}') 79 | 80 | package() { 81 | # Install the binary 82 | install -Dm755 "\$srcdir/gpt-cli.gnu" "\$pkgdir/usr/bin/gpt-cli" 83 | 84 | # Create a symbolic link 85 | ln -s "/usr/bin/gpt-cli" "\$pkgdir/usr/bin/p" 86 | } 87 | EOT 88 | 89 | - name: Generate .SRCINFO 90 | run: | 91 | useradd -m builduser 92 | passwd -d builduser 93 | echo "builduser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/builduser 94 | chown -R builduser:builduser . 95 | sudo -u builduser bash -c "makepkg --printsrcinfo > .SRCINFO" 96 | 97 | - name: Show files 98 | run: | 99 | ls -la 100 | cat PKGBUILD 101 | cat .SRCINFO 102 | 103 | - name: Publish AUR package 104 | uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 105 | with: 106 | pkgname: gpt-cli 107 | pkgbuild: ./PKGBUILD 108 | commit_username: gustawdaniel 109 | commit_email: gustaw.daniel@gmail.com 110 | ssh_private_key: ${{ secrets.ID_ED25519 }} 111 | commit_message: Release ${{ env.PKGVER }}-${{ env.PKGREL }} 112 | ssh_keyscan_types: ed25519 113 | 114 | musl-docker: 115 | runs-on: ubuntu-latest 116 | steps: 117 | - uses: actions/checkout@master 118 | - run: sudo apt install musl-tools 119 | - run: rustup target add x86_64-unknown-linux-musl 120 | - run: cargo build --target x86_64-unknown-linux-musl --release 121 | - run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/gpt-cli . 122 | - name: Login to Docker Hub 123 | uses: docker/login-action@v2 124 | with: 125 | username: ${{ secrets.DOCKERHUB_USERNAME }} 126 | password: ${{ secrets.DOCKERHUB_TOKEN }} 127 | - run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/gpt-cli 128 | 129 | - run: cp target/x86_64-unknown-linux-musl/release/gpt-cli gpt-cli.musl 130 | - run: shasum -a 256 gpt-cli.musl | cut -d " " -f 1 > gpt-cli.musl.sha256.txt 131 | - name: Release 132 | uses: softprops/action-gh-release@v1 133 | env: 134 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 135 | with: 136 | files: | 137 | gpt-cli.musl 138 | gpt-cli.musl.sha256.txt 139 | 140 | cargo: 141 | runs-on: ubuntu-latest 142 | steps: 143 | - uses: actions/checkout@master 144 | - name: Install clipboard deps 145 | run: sudo apt install xorg-dev libxcb-composite0-dev 146 | - run: cargo build --target x86_64-unknown-linux-gnu --release 147 | - run: cargo publish 148 | env: 149 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} 150 | 151 | deb-rpm: 152 | # permissions: 153 | # contents: write 154 | runs-on: ubuntu-latest 155 | steps: 156 | - uses: actions/checkout@v3 157 | - name: Install nFPM 158 | run: | 159 | echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list 160 | sudo apt update 161 | sudo apt install -y nfpm shunit2 xorg-dev libxcb-composite0-dev 162 | - run: cargo build --release 163 | - name: Get release information 164 | run: | 165 | RELEASE_TAG=$(echo "v0.0.17" | sed "s|v||") 166 | echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV 167 | - name: Update fallback release URL 168 | run: | 169 | sed -i "s|version: .*|version: \"${{ env.RELEASE_TAG }}\"|" nfpm.yaml 170 | # - name: Commit changes 171 | # uses: EndBug/add-and-commit@v9 172 | # with: 173 | # author_name: Daniel Gustaw 174 | # author_email: gustaw.daniel@gmail.com 175 | # message: "updated nfpm.yaml version to ${{ env.RELEASE_TAG }}" 176 | # add: 'nfpm.yaml' 177 | # push: origin HEAD:main 178 | # tag_push: '--force' 179 | 180 | - run: cat nfpm.yaml 181 | - run: nfpm pkg --packager deb --target target 182 | - run: ls -la target 183 | - run: sudo apt install ./target/gpt-cli_${{ env.RELEASE_TAG }}_amd64.deb 184 | - run: ./test_version.sh 185 | - run: nfpm pkg --packager rpm --target target 186 | - run: nfpm pkg --packager archlinux --target target 187 | - name: Compute shasums 188 | run: | 189 | mv ./target/gpt-cli_${{ env.RELEASE_TAG }}_amd64.deb gpt-cli_amd64.deb 190 | mv ./target/gpt-cli-${{ env.RELEASE_TAG }}.x86_64.rpm gpt-cli.x86_64.rpm 191 | mv ./target/gpt-cli-${{ env.RELEASE_TAG }}-1-x86_64.pkg.tar.zst gpt-cli-x86_64.pkg.tar.zst 192 | shasum -a 256 gpt-cli_amd64.deb | cut -d " " -f 1 > gpt-cli_amd64.deb.sha256.txt 193 | shasum -a 256 gpt-cli.x86_64.rpm | cut -d " " -f 1 > gpt-cli.x86_64.rpm.sha256.txt 194 | - run: ls -la 195 | - name: Release 196 | uses: softprops/action-gh-release@v1 197 | env: 198 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 199 | with: 200 | files: | 201 | gpt-cli_amd64.deb 202 | gpt-cli.x86_64.rpm 203 | gpt-cli_amd64.deb.sha256.txt 204 | gpt-cli.x86_64.rpm.sha256.txt 205 | gpt-cli-x86_64.pkg.tar.zst 206 | 207 | snap: 208 | runs-on: ubuntu-latest 209 | steps: 210 | - uses: actions/checkout@v3 211 | - name: Install shunit 212 | run: sudo apt install -y shunit2 213 | - uses: snapcore/action-build@v1 214 | id: snapcraft 215 | - uses: actions/upload-artifact@v3 216 | with: 217 | name: snap 218 | path: ${{ steps.snapcraft.outputs.snap }} 219 | - run: cp ${{ steps.snapcraft.outputs.snap }} gpt-cli.snap 220 | - run: | 221 | sudo snap install --dangerous gpt-cli.snap --classic 222 | - run: alias p=gpt-cli 223 | - run: ./test_version.sh 224 | - name: Release 225 | uses: softprops/action-gh-release@v1 226 | env: 227 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 228 | with: 229 | files: | 230 | gpt-cli.snap 231 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | push: 5 | branches-ignore: 6 | - 'main' # Exclude main branch if needed 7 | tags-ignore: 8 | - '' # Exclude annotated tags if needed 9 | pull_request: 10 | branches-ignore: 11 | - 'main' # Exclude main branch if needed 12 | tags-ignore: 13 | - '' # Exclude annotated tags if needed 14 | 15 | env: 16 | CARGO_TERM_COLOR: always 17 | 18 | jobs: 19 | unit: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Checkout repository 23 | uses: actions/checkout@v3 24 | 25 | - name: Setup Rust 26 | uses: actions-rs/toolchain@v1 27 | with: 28 | toolchain: nightly 29 | profile: minimal 30 | components: rustfmt, clippy 31 | override: true 32 | 33 | - name: Install clipboard deps 34 | run: sudo apt install xorg-dev libxcb-composite0-dev 35 | 36 | - name: Build 37 | run: cargo build --verbose 38 | 39 | - name: Run tests 40 | run: cargo test --verbose 41 | env: 42 | CARGO_INCREMENTAL: '0' 43 | RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' 44 | RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' 45 | 46 | - name: Install grcov 47 | run: cargo install grcov 48 | 49 | - name: Generate coverage report 50 | run: | 51 | zip -0 ccov.zip `find . \( -name "*.gc*" \) -print` 52 | grcov ccov.zip -s . -t lcov --llvm --branch --ignore-not-existing --ignore "/*" -o lcov.info 53 | 54 | - name: Codecov 55 | uses: codecov/codecov-action@v3.1.0 56 | with: 57 | token: ${{ secrets.CODECOV_TOKEN }} 58 | verbose: true 59 | fail_ci_if_error: true 60 | file: lcov.info 61 | 62 | - name: Run Clippy 63 | run: cargo clippy --all-features -- -D warnings 64 | 65 | - name: Check formatting 66 | run: cargo fmt --all -- --check 67 | 68 | e2e: 69 | runs-on: ubuntu-latest 70 | steps: 71 | - name: Checkout repository 72 | uses: actions/checkout@v3 73 | 74 | - name: Setup Rust 75 | uses: actions-rs/toolchain@v1 76 | with: 77 | toolchain: nightly 78 | profile: minimal 79 | components: rustfmt, clippy 80 | override: true 81 | 82 | - name: Install clipboard deps 83 | run: sudo apt install xorg-dev libxcb-composite0-dev shunit2 84 | 85 | - name: Install 86 | run: ./install.sh --local 87 | 88 | - name: Check version 89 | run: ./test_version.sh 90 | 91 | - name: Version has 0 exit code 92 | run: gpt-cli --version -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .idea 3 | g 4 | SECRET.md 5 | id 6 | aur 7 | gpt-cli_0*-dirty_amd64.snap -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.19.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "0.7.20" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "android_system_properties" 31 | version = "0.1.5" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 34 | dependencies = [ 35 | "libc", 36 | ] 37 | 38 | [[package]] 39 | name = "ansi_term" 40 | version = "0.12.1" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 43 | dependencies = [ 44 | "winapi", 45 | ] 46 | 47 | [[package]] 48 | name = "anyhow" 49 | version = "1.0.70" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" 52 | 53 | [[package]] 54 | name = "ascii-canvas" 55 | version = "3.0.0" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" 58 | dependencies = [ 59 | "term", 60 | ] 61 | 62 | [[package]] 63 | name = "assert-json-diff" 64 | version = "2.0.2" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "47e4f2b81832e72834d7518d8487a0396a28cc408186a2e8854c0f98011faf12" 67 | dependencies = [ 68 | "serde", 69 | "serde_json", 70 | ] 71 | 72 | [[package]] 73 | name = "async-channel" 74 | version = "1.8.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" 77 | dependencies = [ 78 | "concurrent-queue", 79 | "event-listener", 80 | "futures-core", 81 | ] 82 | 83 | [[package]] 84 | name = "async-executor" 85 | version = "1.5.0" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" 88 | dependencies = [ 89 | "async-lock", 90 | "async-task", 91 | "concurrent-queue", 92 | "fastrand", 93 | "futures-lite", 94 | "slab", 95 | ] 96 | 97 | [[package]] 98 | name = "async-global-executor" 99 | version = "2.3.1" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" 102 | dependencies = [ 103 | "async-channel", 104 | "async-executor", 105 | "async-io", 106 | "async-lock", 107 | "blocking", 108 | "futures-lite", 109 | "once_cell", 110 | ] 111 | 112 | [[package]] 113 | name = "async-io" 114 | version = "1.12.0" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" 117 | dependencies = [ 118 | "async-lock", 119 | "autocfg", 120 | "concurrent-queue", 121 | "futures-lite", 122 | "libc", 123 | "log", 124 | "parking", 125 | "polling", 126 | "slab", 127 | "socket2", 128 | "waker-fn", 129 | "windows-sys 0.42.0", 130 | ] 131 | 132 | [[package]] 133 | name = "async-lock" 134 | version = "2.7.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" 137 | dependencies = [ 138 | "event-listener", 139 | ] 140 | 141 | [[package]] 142 | name = "async-object-pool" 143 | version = "0.1.4" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "aeb901c30ebc2fc4ab46395bbfbdba9542c16559d853645d75190c3056caf3bc" 146 | dependencies = [ 147 | "async-std", 148 | ] 149 | 150 | [[package]] 151 | name = "async-process" 152 | version = "1.6.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" 155 | dependencies = [ 156 | "async-io", 157 | "async-lock", 158 | "autocfg", 159 | "blocking", 160 | "cfg-if", 161 | "event-listener", 162 | "futures-lite", 163 | "libc", 164 | "signal-hook", 165 | "windows-sys 0.42.0", 166 | ] 167 | 168 | [[package]] 169 | name = "async-recursion" 170 | version = "1.0.4" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" 173 | dependencies = [ 174 | "proc-macro2", 175 | "quote", 176 | "syn 2.0.5", 177 | ] 178 | 179 | [[package]] 180 | name = "async-std" 181 | version = "1.12.0" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" 184 | dependencies = [ 185 | "async-channel", 186 | "async-global-executor", 187 | "async-io", 188 | "async-lock", 189 | "async-process", 190 | "crossbeam-utils", 191 | "futures-channel", 192 | "futures-core", 193 | "futures-io", 194 | "futures-lite", 195 | "gloo-timers", 196 | "kv-log-macro", 197 | "log", 198 | "memchr", 199 | "once_cell", 200 | "pin-project-lite", 201 | "pin-utils", 202 | "slab", 203 | "wasm-bindgen-futures", 204 | ] 205 | 206 | [[package]] 207 | name = "async-task" 208 | version = "4.3.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" 211 | 212 | [[package]] 213 | name = "async-trait" 214 | version = "0.1.67" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" 217 | dependencies = [ 218 | "proc-macro2", 219 | "quote", 220 | "syn 2.0.5", 221 | ] 222 | 223 | [[package]] 224 | name = "atomic-waker" 225 | version = "1.1.0" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" 228 | 229 | [[package]] 230 | name = "atty" 231 | version = "0.2.14" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 234 | dependencies = [ 235 | "hermit-abi 0.1.19", 236 | "libc", 237 | "winapi", 238 | ] 239 | 240 | [[package]] 241 | name = "autocfg" 242 | version = "1.1.0" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 245 | 246 | [[package]] 247 | name = "backtrace" 248 | version = "0.3.67" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" 251 | dependencies = [ 252 | "addr2line", 253 | "cc", 254 | "cfg-if", 255 | "libc", 256 | "miniz_oxide", 257 | "object", 258 | "rustc-demangle", 259 | ] 260 | 261 | [[package]] 262 | name = "base64" 263 | version = "0.13.1" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 266 | 267 | [[package]] 268 | name = "base64" 269 | version = "0.21.0" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" 272 | 273 | [[package]] 274 | name = "basic-cookies" 275 | version = "0.1.4" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "cb53b6b315f924c7f113b162e53b3901c05fc9966baf84d201dfcc7432a4bb38" 278 | dependencies = [ 279 | "lalrpop", 280 | "lalrpop-util", 281 | "regex", 282 | ] 283 | 284 | [[package]] 285 | name = "bit-set" 286 | version = "0.5.3" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 289 | dependencies = [ 290 | "bit-vec", 291 | ] 292 | 293 | [[package]] 294 | name = "bit-vec" 295 | version = "0.6.3" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 298 | 299 | [[package]] 300 | name = "bitflags" 301 | version = "1.3.2" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 304 | 305 | [[package]] 306 | name = "block" 307 | version = "0.1.6" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 310 | 311 | [[package]] 312 | name = "block-buffer" 313 | version = "0.10.4" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 316 | dependencies = [ 317 | "generic-array", 318 | ] 319 | 320 | [[package]] 321 | name = "blocking" 322 | version = "1.3.0" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" 325 | dependencies = [ 326 | "async-channel", 327 | "async-lock", 328 | "async-task", 329 | "atomic-waker", 330 | "fastrand", 331 | "futures-lite", 332 | ] 333 | 334 | [[package]] 335 | name = "bstr" 336 | version = "1.4.0" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" 339 | dependencies = [ 340 | "memchr", 341 | "serde", 342 | ] 343 | 344 | [[package]] 345 | name = "bumpalo" 346 | version = "3.12.0" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 349 | 350 | [[package]] 351 | name = "bytecount" 352 | version = "0.6.3" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" 355 | 356 | [[package]] 357 | name = "byteorder" 358 | version = "1.4.3" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 361 | 362 | [[package]] 363 | name = "bytes" 364 | version = "1.4.0" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 367 | 368 | [[package]] 369 | name = "camino" 370 | version = "1.1.4" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" 373 | dependencies = [ 374 | "serde", 375 | ] 376 | 377 | [[package]] 378 | name = "cargo-binutils" 379 | version = "0.3.6" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "ec9a0e2ad2c6ec1516256bf9d0f07841a55265f2167e5d1c88ed1f99c73900da" 382 | dependencies = [ 383 | "anyhow", 384 | "cargo_metadata", 385 | "clap", 386 | "regex", 387 | "rustc-cfg", 388 | "rustc-demangle", 389 | "rustc_version", 390 | "serde", 391 | "toml", 392 | ] 393 | 394 | [[package]] 395 | name = "cargo-platform" 396 | version = "0.1.2" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" 399 | dependencies = [ 400 | "serde", 401 | ] 402 | 403 | [[package]] 404 | name = "cargo_metadata" 405 | version = "0.14.2" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" 408 | dependencies = [ 409 | "camino", 410 | "cargo-platform", 411 | "semver", 412 | "serde", 413 | "serde_json", 414 | ] 415 | 416 | [[package]] 417 | name = "castaway" 418 | version = "0.1.2" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" 421 | 422 | [[package]] 423 | name = "cc" 424 | version = "1.0.79" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 427 | 428 | [[package]] 429 | name = "cfb" 430 | version = "0.7.3" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" 433 | dependencies = [ 434 | "byteorder", 435 | "fnv", 436 | "uuid", 437 | ] 438 | 439 | [[package]] 440 | name = "cfg-if" 441 | version = "1.0.0" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 444 | 445 | [[package]] 446 | name = "chrono" 447 | version = "0.4.24" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" 450 | dependencies = [ 451 | "iana-time-zone", 452 | "js-sys", 453 | "num-integer", 454 | "num-traits", 455 | "serde", 456 | "time 0.1.45", 457 | "wasm-bindgen", 458 | "winapi", 459 | ] 460 | 461 | [[package]] 462 | name = "chrono-tz" 463 | version = "0.6.1" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552" 466 | dependencies = [ 467 | "chrono", 468 | "chrono-tz-build", 469 | "phf", 470 | ] 471 | 472 | [[package]] 473 | name = "chrono-tz-build" 474 | version = "0.0.2" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069" 477 | dependencies = [ 478 | "parse-zoneinfo", 479 | "phf", 480 | "phf_codegen", 481 | ] 482 | 483 | [[package]] 484 | name = "clap" 485 | version = "2.34.0" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 488 | dependencies = [ 489 | "ansi_term", 490 | "atty", 491 | "bitflags", 492 | "strsim", 493 | "textwrap", 494 | "unicode-width", 495 | "vec_map", 496 | ] 497 | 498 | [[package]] 499 | name = "clipboard-win" 500 | version = "4.5.0" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" 503 | dependencies = [ 504 | "error-code", 505 | "str-buf", 506 | "winapi", 507 | ] 508 | 509 | [[package]] 510 | name = "clipboard_macos" 511 | version = "0.1.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "145a7f9e9b89453bc0a5e32d166456405d389cea5b578f57f1274b1397588a95" 514 | dependencies = [ 515 | "objc", 516 | "objc-foundation", 517 | "objc_id", 518 | ] 519 | 520 | [[package]] 521 | name = "codespan-reporting" 522 | version = "0.11.1" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 525 | dependencies = [ 526 | "termcolor", 527 | "unicode-width", 528 | ] 529 | 530 | [[package]] 531 | name = "colored" 532 | version = "2.0.0" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" 535 | dependencies = [ 536 | "atty", 537 | "lazy_static", 538 | "winapi", 539 | ] 540 | 541 | [[package]] 542 | name = "concurrent-queue" 543 | version = "2.1.0" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" 546 | dependencies = [ 547 | "crossbeam-utils", 548 | ] 549 | 550 | [[package]] 551 | name = "core-foundation" 552 | version = "0.9.3" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 555 | dependencies = [ 556 | "core-foundation-sys", 557 | "libc", 558 | ] 559 | 560 | [[package]] 561 | name = "core-foundation-sys" 562 | version = "0.8.3" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 565 | 566 | [[package]] 567 | name = "cpp_demangle" 568 | version = "0.3.5" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" 571 | dependencies = [ 572 | "cfg-if", 573 | ] 574 | 575 | [[package]] 576 | name = "cpufeatures" 577 | version = "0.2.5" 578 | source = "registry+https://github.com/rust-lang/crates.io-index" 579 | checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" 580 | dependencies = [ 581 | "libc", 582 | ] 583 | 584 | [[package]] 585 | name = "crc32fast" 586 | version = "1.3.2" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 589 | dependencies = [ 590 | "cfg-if", 591 | ] 592 | 593 | [[package]] 594 | name = "crossbeam-channel" 595 | version = "0.5.7" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" 598 | dependencies = [ 599 | "cfg-if", 600 | "crossbeam-utils", 601 | ] 602 | 603 | [[package]] 604 | name = "crossbeam-deque" 605 | version = "0.8.3" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" 608 | dependencies = [ 609 | "cfg-if", 610 | "crossbeam-epoch", 611 | "crossbeam-utils", 612 | ] 613 | 614 | [[package]] 615 | name = "crossbeam-epoch" 616 | version = "0.9.14" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" 619 | dependencies = [ 620 | "autocfg", 621 | "cfg-if", 622 | "crossbeam-utils", 623 | "memoffset", 624 | "scopeguard", 625 | ] 626 | 627 | [[package]] 628 | name = "crossbeam-utils" 629 | version = "0.8.15" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" 632 | dependencies = [ 633 | "cfg-if", 634 | ] 635 | 636 | [[package]] 637 | name = "crossterm" 638 | version = "0.25.0" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" 641 | dependencies = [ 642 | "bitflags", 643 | "crossterm_winapi", 644 | "libc", 645 | "mio", 646 | "parking_lot", 647 | "signal-hook", 648 | "signal-hook-mio", 649 | "winapi", 650 | ] 651 | 652 | [[package]] 653 | name = "crossterm_winapi" 654 | version = "0.9.0" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" 657 | dependencies = [ 658 | "winapi", 659 | ] 660 | 661 | [[package]] 662 | name = "crunchy" 663 | version = "0.2.2" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 666 | 667 | [[package]] 668 | name = "crypto-common" 669 | version = "0.1.6" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 672 | dependencies = [ 673 | "generic-array", 674 | "typenum", 675 | ] 676 | 677 | [[package]] 678 | name = "ctor" 679 | version = "0.1.26" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" 682 | dependencies = [ 683 | "quote", 684 | "syn 1.0.109", 685 | ] 686 | 687 | [[package]] 688 | name = "curl" 689 | version = "0.4.44" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" 692 | dependencies = [ 693 | "curl-sys", 694 | "libc", 695 | "openssl-probe", 696 | "openssl-sys", 697 | "schannel", 698 | "socket2", 699 | "winapi", 700 | ] 701 | 702 | [[package]] 703 | name = "curl-sys" 704 | version = "0.4.61+curl-8.0.1" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | checksum = "14d05c10f541ae6f3bc5b3d923c20001f47db7d5f0b2bc6ad16490133842db79" 707 | dependencies = [ 708 | "cc", 709 | "libc", 710 | "libnghttp2-sys", 711 | "libz-sys", 712 | "openssl-sys", 713 | "pkg-config", 714 | "vcpkg", 715 | "winapi", 716 | ] 717 | 718 | [[package]] 719 | name = "cxx" 720 | version = "1.0.93" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" 723 | dependencies = [ 724 | "cc", 725 | "cxxbridge-flags", 726 | "cxxbridge-macro", 727 | "link-cplusplus", 728 | ] 729 | 730 | [[package]] 731 | name = "cxx-build" 732 | version = "1.0.93" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" 735 | dependencies = [ 736 | "cc", 737 | "codespan-reporting", 738 | "once_cell", 739 | "proc-macro2", 740 | "quote", 741 | "scratch", 742 | "syn 2.0.5", 743 | ] 744 | 745 | [[package]] 746 | name = "cxxbridge-flags" 747 | version = "1.0.93" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" 750 | 751 | [[package]] 752 | name = "cxxbridge-macro" 753 | version = "1.0.93" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" 756 | dependencies = [ 757 | "proc-macro2", 758 | "quote", 759 | "syn 2.0.5", 760 | ] 761 | 762 | [[package]] 763 | name = "debugid" 764 | version = "0.8.0" 765 | source = "registry+https://github.com/rust-lang/crates.io-index" 766 | checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" 767 | dependencies = [ 768 | "uuid", 769 | ] 770 | 771 | [[package]] 772 | name = "deunicode" 773 | version = "0.4.3" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" 776 | 777 | [[package]] 778 | name = "diff" 779 | version = "0.1.13" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" 782 | 783 | [[package]] 784 | name = "digest" 785 | version = "0.10.6" 786 | source = "registry+https://github.com/rust-lang/crates.io-index" 787 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 788 | dependencies = [ 789 | "block-buffer", 790 | "crypto-common", 791 | ] 792 | 793 | [[package]] 794 | name = "dirs" 795 | version = "5.0.1" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" 798 | dependencies = [ 799 | "dirs-sys", 800 | ] 801 | 802 | [[package]] 803 | name = "dirs-next" 804 | version = "2.0.0" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 807 | dependencies = [ 808 | "cfg-if", 809 | "dirs-sys-next", 810 | ] 811 | 812 | [[package]] 813 | name = "dirs-sys" 814 | version = "0.4.1" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" 817 | dependencies = [ 818 | "libc", 819 | "option-ext", 820 | "redox_users", 821 | "windows-sys 0.48.0", 822 | ] 823 | 824 | [[package]] 825 | name = "dirs-sys-next" 826 | version = "0.1.2" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 829 | dependencies = [ 830 | "libc", 831 | "redox_users", 832 | "winapi", 833 | ] 834 | 835 | [[package]] 836 | name = "dyn-clone" 837 | version = "1.0.11" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" 840 | 841 | [[package]] 842 | name = "either" 843 | version = "1.8.1" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 846 | 847 | [[package]] 848 | name = "ena" 849 | version = "0.14.2" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" 852 | dependencies = [ 853 | "log", 854 | ] 855 | 856 | [[package]] 857 | name = "encoding_rs" 858 | version = "0.8.32" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 861 | dependencies = [ 862 | "cfg-if", 863 | ] 864 | 865 | [[package]] 866 | name = "errno" 867 | version = "0.2.8" 868 | source = "registry+https://github.com/rust-lang/crates.io-index" 869 | checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" 870 | dependencies = [ 871 | "errno-dragonfly", 872 | "libc", 873 | "winapi", 874 | ] 875 | 876 | [[package]] 877 | name = "errno-dragonfly" 878 | version = "0.1.2" 879 | source = "registry+https://github.com/rust-lang/crates.io-index" 880 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 881 | dependencies = [ 882 | "cc", 883 | "libc", 884 | ] 885 | 886 | [[package]] 887 | name = "error-code" 888 | version = "2.3.1" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" 891 | dependencies = [ 892 | "libc", 893 | "str-buf", 894 | ] 895 | 896 | [[package]] 897 | name = "event-listener" 898 | version = "2.5.3" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 901 | 902 | [[package]] 903 | name = "failure" 904 | version = "0.1.8" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" 907 | dependencies = [ 908 | "backtrace", 909 | "failure_derive", 910 | ] 911 | 912 | [[package]] 913 | name = "failure_derive" 914 | version = "0.1.8" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" 917 | dependencies = [ 918 | "proc-macro2", 919 | "quote", 920 | "syn 1.0.109", 921 | "synstructure", 922 | ] 923 | 924 | [[package]] 925 | name = "fastrand" 926 | version = "1.9.0" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 929 | dependencies = [ 930 | "instant", 931 | ] 932 | 933 | [[package]] 934 | name = "fixedbitset" 935 | version = "0.4.2" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 938 | 939 | [[package]] 940 | name = "flate2" 941 | version = "1.0.25" 942 | source = "registry+https://github.com/rust-lang/crates.io-index" 943 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" 944 | dependencies = [ 945 | "crc32fast", 946 | "libz-sys", 947 | "miniz_oxide", 948 | ] 949 | 950 | [[package]] 951 | name = "fnv" 952 | version = "1.0.7" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 955 | 956 | [[package]] 957 | name = "foreign-types" 958 | version = "0.3.2" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 961 | dependencies = [ 962 | "foreign-types-shared", 963 | ] 964 | 965 | [[package]] 966 | name = "foreign-types-shared" 967 | version = "0.1.1" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 970 | 971 | [[package]] 972 | name = "form_urlencoded" 973 | version = "1.1.0" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 976 | dependencies = [ 977 | "percent-encoding", 978 | ] 979 | 980 | [[package]] 981 | name = "futures" 982 | version = "0.3.27" 983 | source = "registry+https://github.com/rust-lang/crates.io-index" 984 | checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" 985 | dependencies = [ 986 | "futures-channel", 987 | "futures-core", 988 | "futures-executor", 989 | "futures-io", 990 | "futures-sink", 991 | "futures-task", 992 | "futures-util", 993 | ] 994 | 995 | [[package]] 996 | name = "futures-channel" 997 | version = "0.3.27" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" 1000 | dependencies = [ 1001 | "futures-core", 1002 | "futures-sink", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "futures-core" 1007 | version = "0.3.27" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" 1010 | 1011 | [[package]] 1012 | name = "futures-executor" 1013 | version = "0.3.27" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" 1016 | dependencies = [ 1017 | "futures-core", 1018 | "futures-task", 1019 | "futures-util", 1020 | ] 1021 | 1022 | [[package]] 1023 | name = "futures-io" 1024 | version = "0.3.27" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" 1027 | 1028 | [[package]] 1029 | name = "futures-lite" 1030 | version = "1.12.0" 1031 | source = "registry+https://github.com/rust-lang/crates.io-index" 1032 | checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" 1033 | dependencies = [ 1034 | "fastrand", 1035 | "futures-core", 1036 | "futures-io", 1037 | "memchr", 1038 | "parking", 1039 | "pin-project-lite", 1040 | "waker-fn", 1041 | ] 1042 | 1043 | [[package]] 1044 | name = "futures-macro" 1045 | version = "0.3.27" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" 1048 | dependencies = [ 1049 | "proc-macro2", 1050 | "quote", 1051 | "syn 1.0.109", 1052 | ] 1053 | 1054 | [[package]] 1055 | name = "futures-sink" 1056 | version = "0.3.27" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" 1059 | 1060 | [[package]] 1061 | name = "futures-task" 1062 | version = "0.3.27" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" 1065 | 1066 | [[package]] 1067 | name = "futures-util" 1068 | version = "0.3.27" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" 1071 | dependencies = [ 1072 | "futures-channel", 1073 | "futures-core", 1074 | "futures-io", 1075 | "futures-macro", 1076 | "futures-sink", 1077 | "futures-task", 1078 | "memchr", 1079 | "pin-project-lite", 1080 | "pin-utils", 1081 | "slab", 1082 | ] 1083 | 1084 | [[package]] 1085 | name = "generic-array" 1086 | version = "0.14.6" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 1089 | dependencies = [ 1090 | "typenum", 1091 | "version_check", 1092 | ] 1093 | 1094 | [[package]] 1095 | name = "getrandom" 1096 | version = "0.2.8" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" 1099 | dependencies = [ 1100 | "cfg-if", 1101 | "libc", 1102 | "wasi 0.11.0+wasi-snapshot-preview1", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "gimli" 1107 | version = "0.27.2" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" 1110 | 1111 | [[package]] 1112 | name = "globset" 1113 | version = "0.4.10" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" 1116 | dependencies = [ 1117 | "aho-corasick", 1118 | "bstr", 1119 | "fnv", 1120 | "log", 1121 | "regex", 1122 | ] 1123 | 1124 | [[package]] 1125 | name = "globwalk" 1126 | version = "0.8.1" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" 1129 | dependencies = [ 1130 | "bitflags", 1131 | "ignore", 1132 | "walkdir", 1133 | ] 1134 | 1135 | [[package]] 1136 | name = "gloo-timers" 1137 | version = "0.2.6" 1138 | source = "registry+https://github.com/rust-lang/crates.io-index" 1139 | checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" 1140 | dependencies = [ 1141 | "futures-channel", 1142 | "futures-core", 1143 | "js-sys", 1144 | "wasm-bindgen", 1145 | ] 1146 | 1147 | [[package]] 1148 | name = "gpt-cli" 1149 | version = "0.1.0" 1150 | dependencies = [ 1151 | "async-recursion", 1152 | "colored", 1153 | "dirs", 1154 | "futures", 1155 | "grcov", 1156 | "hex", 1157 | "httpmock", 1158 | "inquire", 1159 | "openssl", 1160 | "rand", 1161 | "reqwest", 1162 | "serde", 1163 | "serde_json", 1164 | "terminal-clipboard", 1165 | "tokio", 1166 | ] 1167 | 1168 | [[package]] 1169 | name = "grcov" 1170 | version = "0.8.13" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "9b4c7b854eb2befe238a45ddbf92dc7949543d62ec67739c23bdb338ddc2184c" 1173 | dependencies = [ 1174 | "cargo-binutils", 1175 | "chrono", 1176 | "crossbeam-channel", 1177 | "flate2", 1178 | "globset", 1179 | "infer", 1180 | "lazy_static", 1181 | "log", 1182 | "md-5", 1183 | "num_cpus", 1184 | "once_cell", 1185 | "quick-xml 0.26.0", 1186 | "rayon", 1187 | "regex", 1188 | "rustc-hash", 1189 | "semver", 1190 | "serde", 1191 | "serde_json", 1192 | "simplelog", 1193 | "smallvec", 1194 | "structopt", 1195 | "symbolic-common", 1196 | "symbolic-demangle", 1197 | "tabled", 1198 | "tempfile", 1199 | "tera", 1200 | "uuid", 1201 | "walkdir", 1202 | "zip", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "h2" 1207 | version = "0.3.16" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" 1210 | dependencies = [ 1211 | "bytes", 1212 | "fnv", 1213 | "futures-core", 1214 | "futures-sink", 1215 | "futures-util", 1216 | "http", 1217 | "indexmap", 1218 | "slab", 1219 | "tokio", 1220 | "tokio-util", 1221 | "tracing", 1222 | ] 1223 | 1224 | [[package]] 1225 | name = "hashbrown" 1226 | version = "0.12.3" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1229 | 1230 | [[package]] 1231 | name = "heck" 1232 | version = "0.3.3" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 1235 | dependencies = [ 1236 | "unicode-segmentation", 1237 | ] 1238 | 1239 | [[package]] 1240 | name = "heck" 1241 | version = "0.4.1" 1242 | source = "registry+https://github.com/rust-lang/crates.io-index" 1243 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 1244 | 1245 | [[package]] 1246 | name = "hermit-abi" 1247 | version = "0.1.19" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1250 | dependencies = [ 1251 | "libc", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "hermit-abi" 1256 | version = "0.2.6" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 1259 | dependencies = [ 1260 | "libc", 1261 | ] 1262 | 1263 | [[package]] 1264 | name = "hermit-abi" 1265 | version = "0.3.1" 1266 | source = "registry+https://github.com/rust-lang/crates.io-index" 1267 | checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" 1268 | 1269 | [[package]] 1270 | name = "hex" 1271 | version = "0.4.3" 1272 | source = "registry+https://github.com/rust-lang/crates.io-index" 1273 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1274 | 1275 | [[package]] 1276 | name = "http" 1277 | version = "0.2.9" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 1280 | dependencies = [ 1281 | "bytes", 1282 | "fnv", 1283 | "itoa", 1284 | ] 1285 | 1286 | [[package]] 1287 | name = "http-body" 1288 | version = "0.4.5" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 1291 | dependencies = [ 1292 | "bytes", 1293 | "http", 1294 | "pin-project-lite", 1295 | ] 1296 | 1297 | [[package]] 1298 | name = "httparse" 1299 | version = "1.8.0" 1300 | source = "registry+https://github.com/rust-lang/crates.io-index" 1301 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 1302 | 1303 | [[package]] 1304 | name = "httpdate" 1305 | version = "1.0.2" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 1308 | 1309 | [[package]] 1310 | name = "httpmock" 1311 | version = "0.6.7" 1312 | source = "registry+https://github.com/rust-lang/crates.io-index" 1313 | checksum = "c6b56b6265f15908780cbee987912c1e98dbca675361f748291605a8a3a1df09" 1314 | dependencies = [ 1315 | "assert-json-diff", 1316 | "async-object-pool", 1317 | "async-trait", 1318 | "base64 0.13.1", 1319 | "basic-cookies", 1320 | "crossbeam-utils", 1321 | "form_urlencoded", 1322 | "futures-util", 1323 | "hyper", 1324 | "isahc", 1325 | "lazy_static", 1326 | "levenshtein", 1327 | "log", 1328 | "regex", 1329 | "serde", 1330 | "serde_json", 1331 | "serde_regex", 1332 | "similar", 1333 | "tokio", 1334 | "url", 1335 | ] 1336 | 1337 | [[package]] 1338 | name = "humansize" 1339 | version = "2.1.3" 1340 | source = "registry+https://github.com/rust-lang/crates.io-index" 1341 | checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" 1342 | dependencies = [ 1343 | "libm", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "hyper" 1348 | version = "0.14.25" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" 1351 | dependencies = [ 1352 | "bytes", 1353 | "futures-channel", 1354 | "futures-core", 1355 | "futures-util", 1356 | "h2", 1357 | "http", 1358 | "http-body", 1359 | "httparse", 1360 | "httpdate", 1361 | "itoa", 1362 | "pin-project-lite", 1363 | "socket2", 1364 | "tokio", 1365 | "tower-service", 1366 | "tracing", 1367 | "want", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "hyper-tls" 1372 | version = "0.5.0" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 1375 | dependencies = [ 1376 | "bytes", 1377 | "hyper", 1378 | "native-tls", 1379 | "tokio", 1380 | "tokio-native-tls", 1381 | ] 1382 | 1383 | [[package]] 1384 | name = "iana-time-zone" 1385 | version = "0.1.54" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" 1388 | dependencies = [ 1389 | "android_system_properties", 1390 | "core-foundation-sys", 1391 | "iana-time-zone-haiku", 1392 | "js-sys", 1393 | "wasm-bindgen", 1394 | "windows", 1395 | ] 1396 | 1397 | [[package]] 1398 | name = "iana-time-zone-haiku" 1399 | version = "0.1.1" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 1402 | dependencies = [ 1403 | "cxx", 1404 | "cxx-build", 1405 | ] 1406 | 1407 | [[package]] 1408 | name = "idna" 1409 | version = "0.3.0" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 1412 | dependencies = [ 1413 | "unicode-bidi", 1414 | "unicode-normalization", 1415 | ] 1416 | 1417 | [[package]] 1418 | name = "ignore" 1419 | version = "0.4.20" 1420 | source = "registry+https://github.com/rust-lang/crates.io-index" 1421 | checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" 1422 | dependencies = [ 1423 | "globset", 1424 | "lazy_static", 1425 | "log", 1426 | "memchr", 1427 | "regex", 1428 | "same-file", 1429 | "thread_local", 1430 | "walkdir", 1431 | "winapi-util", 1432 | ] 1433 | 1434 | [[package]] 1435 | name = "indexmap" 1436 | version = "1.9.2" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" 1439 | dependencies = [ 1440 | "autocfg", 1441 | "hashbrown", 1442 | ] 1443 | 1444 | [[package]] 1445 | name = "infer" 1446 | version = "0.9.0" 1447 | source = "registry+https://github.com/rust-lang/crates.io-index" 1448 | checksum = "f178e61cdbfe084aa75a2f4f7a25a5bb09701a47ae1753608f194b15783c937a" 1449 | dependencies = [ 1450 | "cfb", 1451 | ] 1452 | 1453 | [[package]] 1454 | name = "inquire" 1455 | version = "0.6.0" 1456 | source = "registry+https://github.com/rust-lang/crates.io-index" 1457 | checksum = "fd079157ad94a32f7511b2e13037f3ae417ad80a6a9b0de29154d48b86f5d6c8" 1458 | dependencies = [ 1459 | "bitflags", 1460 | "crossterm", 1461 | "dyn-clone", 1462 | "lazy_static", 1463 | "newline-converter", 1464 | "thiserror", 1465 | "unicode-segmentation", 1466 | "unicode-width", 1467 | ] 1468 | 1469 | [[package]] 1470 | name = "instant" 1471 | version = "0.1.12" 1472 | source = "registry+https://github.com/rust-lang/crates.io-index" 1473 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1474 | dependencies = [ 1475 | "cfg-if", 1476 | ] 1477 | 1478 | [[package]] 1479 | name = "io-lifetimes" 1480 | version = "1.0.9" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" 1483 | dependencies = [ 1484 | "hermit-abi 0.3.1", 1485 | "libc", 1486 | "windows-sys 0.45.0", 1487 | ] 1488 | 1489 | [[package]] 1490 | name = "ipnet" 1491 | version = "2.7.1" 1492 | source = "registry+https://github.com/rust-lang/crates.io-index" 1493 | checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" 1494 | 1495 | [[package]] 1496 | name = "isahc" 1497 | version = "1.7.2" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" 1500 | dependencies = [ 1501 | "async-channel", 1502 | "castaway", 1503 | "crossbeam-utils", 1504 | "curl", 1505 | "curl-sys", 1506 | "encoding_rs", 1507 | "event-listener", 1508 | "futures-lite", 1509 | "http", 1510 | "log", 1511 | "mime", 1512 | "once_cell", 1513 | "polling", 1514 | "slab", 1515 | "sluice", 1516 | "tracing", 1517 | "tracing-futures", 1518 | "url", 1519 | "waker-fn", 1520 | ] 1521 | 1522 | [[package]] 1523 | name = "itertools" 1524 | version = "0.10.5" 1525 | source = "registry+https://github.com/rust-lang/crates.io-index" 1526 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1527 | dependencies = [ 1528 | "either", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "itoa" 1533 | version = "1.0.6" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 1536 | 1537 | [[package]] 1538 | name = "js-sys" 1539 | version = "0.3.61" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" 1542 | dependencies = [ 1543 | "wasm-bindgen", 1544 | ] 1545 | 1546 | [[package]] 1547 | name = "kv-log-macro" 1548 | version = "1.0.7" 1549 | source = "registry+https://github.com/rust-lang/crates.io-index" 1550 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 1551 | dependencies = [ 1552 | "log", 1553 | ] 1554 | 1555 | [[package]] 1556 | name = "lalrpop" 1557 | version = "0.19.8" 1558 | source = "registry+https://github.com/rust-lang/crates.io-index" 1559 | checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" 1560 | dependencies = [ 1561 | "ascii-canvas", 1562 | "atty", 1563 | "bit-set", 1564 | "diff", 1565 | "ena", 1566 | "itertools", 1567 | "lalrpop-util", 1568 | "petgraph", 1569 | "pico-args", 1570 | "regex", 1571 | "regex-syntax", 1572 | "string_cache", 1573 | "term", 1574 | "tiny-keccak", 1575 | "unicode-xid", 1576 | ] 1577 | 1578 | [[package]] 1579 | name = "lalrpop-util" 1580 | version = "0.19.8" 1581 | source = "registry+https://github.com/rust-lang/crates.io-index" 1582 | checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" 1583 | dependencies = [ 1584 | "regex", 1585 | ] 1586 | 1587 | [[package]] 1588 | name = "lazy_static" 1589 | version = "1.4.0" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1592 | 1593 | [[package]] 1594 | name = "levenshtein" 1595 | version = "1.0.5" 1596 | source = "registry+https://github.com/rust-lang/crates.io-index" 1597 | checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" 1598 | 1599 | [[package]] 1600 | name = "libc" 1601 | version = "0.2.140" 1602 | source = "registry+https://github.com/rust-lang/crates.io-index" 1603 | checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" 1604 | 1605 | [[package]] 1606 | name = "libm" 1607 | version = "0.2.6" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" 1610 | 1611 | [[package]] 1612 | name = "libnghttp2-sys" 1613 | version = "0.1.7+1.45.0" 1614 | source = "registry+https://github.com/rust-lang/crates.io-index" 1615 | checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" 1616 | dependencies = [ 1617 | "cc", 1618 | "libc", 1619 | ] 1620 | 1621 | [[package]] 1622 | name = "libz-sys" 1623 | version = "1.1.8" 1624 | source = "registry+https://github.com/rust-lang/crates.io-index" 1625 | checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" 1626 | dependencies = [ 1627 | "cc", 1628 | "libc", 1629 | "pkg-config", 1630 | "vcpkg", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "link-cplusplus" 1635 | version = "1.0.8" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 1638 | dependencies = [ 1639 | "cc", 1640 | ] 1641 | 1642 | [[package]] 1643 | name = "linux-raw-sys" 1644 | version = "0.1.4" 1645 | source = "registry+https://github.com/rust-lang/crates.io-index" 1646 | checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" 1647 | 1648 | [[package]] 1649 | name = "lock_api" 1650 | version = "0.4.9" 1651 | source = "registry+https://github.com/rust-lang/crates.io-index" 1652 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 1653 | dependencies = [ 1654 | "autocfg", 1655 | "scopeguard", 1656 | ] 1657 | 1658 | [[package]] 1659 | name = "log" 1660 | version = "0.4.17" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1663 | dependencies = [ 1664 | "cfg-if", 1665 | "value-bag", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "malloc_buf" 1670 | version = "0.0.6" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1673 | dependencies = [ 1674 | "libc", 1675 | ] 1676 | 1677 | [[package]] 1678 | name = "md-5" 1679 | version = "0.10.5" 1680 | source = "registry+https://github.com/rust-lang/crates.io-index" 1681 | checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" 1682 | dependencies = [ 1683 | "digest", 1684 | ] 1685 | 1686 | [[package]] 1687 | name = "memchr" 1688 | version = "2.5.0" 1689 | source = "registry+https://github.com/rust-lang/crates.io-index" 1690 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1691 | 1692 | [[package]] 1693 | name = "memmap2" 1694 | version = "0.5.10" 1695 | source = "registry+https://github.com/rust-lang/crates.io-index" 1696 | checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" 1697 | dependencies = [ 1698 | "libc", 1699 | ] 1700 | 1701 | [[package]] 1702 | name = "memoffset" 1703 | version = "0.8.0" 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" 1705 | checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" 1706 | dependencies = [ 1707 | "autocfg", 1708 | ] 1709 | 1710 | [[package]] 1711 | name = "mime" 1712 | version = "0.3.17" 1713 | source = "registry+https://github.com/rust-lang/crates.io-index" 1714 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1715 | 1716 | [[package]] 1717 | name = "miniz_oxide" 1718 | version = "0.6.2" 1719 | source = "registry+https://github.com/rust-lang/crates.io-index" 1720 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 1721 | dependencies = [ 1722 | "adler", 1723 | ] 1724 | 1725 | [[package]] 1726 | name = "mio" 1727 | version = "0.8.6" 1728 | source = "registry+https://github.com/rust-lang/crates.io-index" 1729 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 1730 | dependencies = [ 1731 | "libc", 1732 | "log", 1733 | "wasi 0.11.0+wasi-snapshot-preview1", 1734 | "windows-sys 0.45.0", 1735 | ] 1736 | 1737 | [[package]] 1738 | name = "msvc-demangler" 1739 | version = "0.9.0" 1740 | source = "registry+https://github.com/rust-lang/crates.io-index" 1741 | checksum = "bfb67c6dd0fa9b00619c41c5700b6f92d5f418be49b45ddb9970fbd4569df3c8" 1742 | dependencies = [ 1743 | "bitflags", 1744 | ] 1745 | 1746 | [[package]] 1747 | name = "native-tls" 1748 | version = "0.2.11" 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" 1750 | checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" 1751 | dependencies = [ 1752 | "lazy_static", 1753 | "libc", 1754 | "log", 1755 | "openssl", 1756 | "openssl-probe", 1757 | "openssl-sys", 1758 | "schannel", 1759 | "security-framework", 1760 | "security-framework-sys", 1761 | "tempfile", 1762 | ] 1763 | 1764 | [[package]] 1765 | name = "new_debug_unreachable" 1766 | version = "1.0.4" 1767 | source = "registry+https://github.com/rust-lang/crates.io-index" 1768 | checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" 1769 | 1770 | [[package]] 1771 | name = "newline-converter" 1772 | version = "0.2.2" 1773 | source = "registry+https://github.com/rust-lang/crates.io-index" 1774 | checksum = "1f71d09d5c87634207f894c6b31b6a2b2c64ea3bdcf71bd5599fdbbe1600c00f" 1775 | dependencies = [ 1776 | "unicode-segmentation", 1777 | ] 1778 | 1779 | [[package]] 1780 | name = "num-integer" 1781 | version = "0.1.45" 1782 | source = "registry+https://github.com/rust-lang/crates.io-index" 1783 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1784 | dependencies = [ 1785 | "autocfg", 1786 | "num-traits", 1787 | ] 1788 | 1789 | [[package]] 1790 | name = "num-traits" 1791 | version = "0.2.15" 1792 | source = "registry+https://github.com/rust-lang/crates.io-index" 1793 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1794 | dependencies = [ 1795 | "autocfg", 1796 | ] 1797 | 1798 | [[package]] 1799 | name = "num_cpus" 1800 | version = "1.15.0" 1801 | source = "registry+https://github.com/rust-lang/crates.io-index" 1802 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 1803 | dependencies = [ 1804 | "hermit-abi 0.2.6", 1805 | "libc", 1806 | ] 1807 | 1808 | [[package]] 1809 | name = "num_threads" 1810 | version = "0.1.6" 1811 | source = "registry+https://github.com/rust-lang/crates.io-index" 1812 | checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 1813 | dependencies = [ 1814 | "libc", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "objc" 1819 | version = "0.2.7" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1822 | dependencies = [ 1823 | "malloc_buf", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "objc-foundation" 1828 | version = "0.1.1" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" 1831 | dependencies = [ 1832 | "block", 1833 | "objc", 1834 | "objc_id", 1835 | ] 1836 | 1837 | [[package]] 1838 | name = "objc_id" 1839 | version = "0.1.1" 1840 | source = "registry+https://github.com/rust-lang/crates.io-index" 1841 | checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" 1842 | dependencies = [ 1843 | "objc", 1844 | ] 1845 | 1846 | [[package]] 1847 | name = "object" 1848 | version = "0.30.3" 1849 | source = "registry+https://github.com/rust-lang/crates.io-index" 1850 | checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" 1851 | dependencies = [ 1852 | "memchr", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "once_cell" 1857 | version = "1.17.1" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 1860 | 1861 | [[package]] 1862 | name = "openssl" 1863 | version = "0.10.47" 1864 | source = "registry+https://github.com/rust-lang/crates.io-index" 1865 | checksum = "d8b277f87dacc05a6b709965d1cbafac4649d6ce9f3ce9ceb88508b5666dfec9" 1866 | dependencies = [ 1867 | "bitflags", 1868 | "cfg-if", 1869 | "foreign-types", 1870 | "libc", 1871 | "once_cell", 1872 | "openssl-macros", 1873 | "openssl-sys", 1874 | ] 1875 | 1876 | [[package]] 1877 | name = "openssl-macros" 1878 | version = "0.1.0" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 1881 | dependencies = [ 1882 | "proc-macro2", 1883 | "quote", 1884 | "syn 1.0.109", 1885 | ] 1886 | 1887 | [[package]] 1888 | name = "openssl-probe" 1889 | version = "0.1.5" 1890 | source = "registry+https://github.com/rust-lang/crates.io-index" 1891 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 1892 | 1893 | [[package]] 1894 | name = "openssl-src" 1895 | version = "111.25.2+1.1.1t" 1896 | source = "registry+https://github.com/rust-lang/crates.io-index" 1897 | checksum = "320708a054ad9b3bf314688b5db87cf4d6683d64cfc835e2337924ae62bf4431" 1898 | dependencies = [ 1899 | "cc", 1900 | ] 1901 | 1902 | [[package]] 1903 | name = "openssl-sys" 1904 | version = "0.9.82" 1905 | source = "registry+https://github.com/rust-lang/crates.io-index" 1906 | checksum = "a95792af3c4e0153c3914df2261bedd30a98476f94dc892b67dfe1d89d433a04" 1907 | dependencies = [ 1908 | "autocfg", 1909 | "cc", 1910 | "libc", 1911 | "openssl-src", 1912 | "pkg-config", 1913 | "vcpkg", 1914 | ] 1915 | 1916 | [[package]] 1917 | name = "option-ext" 1918 | version = "0.2.0" 1919 | source = "registry+https://github.com/rust-lang/crates.io-index" 1920 | checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" 1921 | 1922 | [[package]] 1923 | name = "papergrid" 1924 | version = "0.5.1" 1925 | source = "registry+https://github.com/rust-lang/crates.io-index" 1926 | checksum = "453cf71f2a37af495a1a124bf30d4d7469cfbea58e9f2479be9d222396a518a2" 1927 | dependencies = [ 1928 | "bytecount", 1929 | "fnv", 1930 | "unicode-width", 1931 | ] 1932 | 1933 | [[package]] 1934 | name = "parking" 1935 | version = "2.0.0" 1936 | source = "registry+https://github.com/rust-lang/crates.io-index" 1937 | checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" 1938 | 1939 | [[package]] 1940 | name = "parking_lot" 1941 | version = "0.12.1" 1942 | source = "registry+https://github.com/rust-lang/crates.io-index" 1943 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1944 | dependencies = [ 1945 | "lock_api", 1946 | "parking_lot_core", 1947 | ] 1948 | 1949 | [[package]] 1950 | name = "parking_lot_core" 1951 | version = "0.9.7" 1952 | source = "registry+https://github.com/rust-lang/crates.io-index" 1953 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 1954 | dependencies = [ 1955 | "cfg-if", 1956 | "libc", 1957 | "redox_syscall", 1958 | "smallvec", 1959 | "windows-sys 0.45.0", 1960 | ] 1961 | 1962 | [[package]] 1963 | name = "parse-zoneinfo" 1964 | version = "0.3.0" 1965 | source = "registry+https://github.com/rust-lang/crates.io-index" 1966 | checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" 1967 | dependencies = [ 1968 | "regex", 1969 | ] 1970 | 1971 | [[package]] 1972 | name = "percent-encoding" 1973 | version = "2.2.0" 1974 | source = "registry+https://github.com/rust-lang/crates.io-index" 1975 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 1976 | 1977 | [[package]] 1978 | name = "pest" 1979 | version = "2.5.6" 1980 | source = "registry+https://github.com/rust-lang/crates.io-index" 1981 | checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" 1982 | dependencies = [ 1983 | "thiserror", 1984 | "ucd-trie", 1985 | ] 1986 | 1987 | [[package]] 1988 | name = "pest_derive" 1989 | version = "2.5.6" 1990 | source = "registry+https://github.com/rust-lang/crates.io-index" 1991 | checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" 1992 | dependencies = [ 1993 | "pest", 1994 | "pest_generator", 1995 | ] 1996 | 1997 | [[package]] 1998 | name = "pest_generator" 1999 | version = "2.5.6" 2000 | source = "registry+https://github.com/rust-lang/crates.io-index" 2001 | checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" 2002 | dependencies = [ 2003 | "pest", 2004 | "pest_meta", 2005 | "proc-macro2", 2006 | "quote", 2007 | "syn 1.0.109", 2008 | ] 2009 | 2010 | [[package]] 2011 | name = "pest_meta" 2012 | version = "2.5.6" 2013 | source = "registry+https://github.com/rust-lang/crates.io-index" 2014 | checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" 2015 | dependencies = [ 2016 | "once_cell", 2017 | "pest", 2018 | "sha2", 2019 | ] 2020 | 2021 | [[package]] 2022 | name = "petgraph" 2023 | version = "0.6.3" 2024 | source = "registry+https://github.com/rust-lang/crates.io-index" 2025 | checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" 2026 | dependencies = [ 2027 | "fixedbitset", 2028 | "indexmap", 2029 | ] 2030 | 2031 | [[package]] 2032 | name = "phf" 2033 | version = "0.10.1" 2034 | source = "registry+https://github.com/rust-lang/crates.io-index" 2035 | checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" 2036 | dependencies = [ 2037 | "phf_shared", 2038 | ] 2039 | 2040 | [[package]] 2041 | name = "phf_codegen" 2042 | version = "0.10.0" 2043 | source = "registry+https://github.com/rust-lang/crates.io-index" 2044 | checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" 2045 | dependencies = [ 2046 | "phf_generator", 2047 | "phf_shared", 2048 | ] 2049 | 2050 | [[package]] 2051 | name = "phf_generator" 2052 | version = "0.10.0" 2053 | source = "registry+https://github.com/rust-lang/crates.io-index" 2054 | checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" 2055 | dependencies = [ 2056 | "phf_shared", 2057 | "rand", 2058 | ] 2059 | 2060 | [[package]] 2061 | name = "phf_shared" 2062 | version = "0.10.0" 2063 | source = "registry+https://github.com/rust-lang/crates.io-index" 2064 | checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" 2065 | dependencies = [ 2066 | "siphasher", 2067 | "uncased", 2068 | ] 2069 | 2070 | [[package]] 2071 | name = "pico-args" 2072 | version = "0.4.2" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" 2075 | 2076 | [[package]] 2077 | name = "pin-project" 2078 | version = "1.0.12" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" 2081 | dependencies = [ 2082 | "pin-project-internal", 2083 | ] 2084 | 2085 | [[package]] 2086 | name = "pin-project-internal" 2087 | version = "1.0.12" 2088 | source = "registry+https://github.com/rust-lang/crates.io-index" 2089 | checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" 2090 | dependencies = [ 2091 | "proc-macro2", 2092 | "quote", 2093 | "syn 1.0.109", 2094 | ] 2095 | 2096 | [[package]] 2097 | name = "pin-project-lite" 2098 | version = "0.2.9" 2099 | source = "registry+https://github.com/rust-lang/crates.io-index" 2100 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 2101 | 2102 | [[package]] 2103 | name = "pin-utils" 2104 | version = "0.1.0" 2105 | source = "registry+https://github.com/rust-lang/crates.io-index" 2106 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 2107 | 2108 | [[package]] 2109 | name = "pkg-config" 2110 | version = "0.3.26" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 2113 | 2114 | [[package]] 2115 | name = "polling" 2116 | version = "2.6.0" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" 2119 | dependencies = [ 2120 | "autocfg", 2121 | "bitflags", 2122 | "cfg-if", 2123 | "concurrent-queue", 2124 | "libc", 2125 | "log", 2126 | "pin-project-lite", 2127 | "windows-sys 0.45.0", 2128 | ] 2129 | 2130 | [[package]] 2131 | name = "ppv-lite86" 2132 | version = "0.2.17" 2133 | source = "registry+https://github.com/rust-lang/crates.io-index" 2134 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 2135 | 2136 | [[package]] 2137 | name = "precomputed-hash" 2138 | version = "0.1.1" 2139 | source = "registry+https://github.com/rust-lang/crates.io-index" 2140 | checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" 2141 | 2142 | [[package]] 2143 | name = "proc-macro-error" 2144 | version = "1.0.4" 2145 | source = "registry+https://github.com/rust-lang/crates.io-index" 2146 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 2147 | dependencies = [ 2148 | "proc-macro-error-attr", 2149 | "proc-macro2", 2150 | "quote", 2151 | "syn 1.0.109", 2152 | "version_check", 2153 | ] 2154 | 2155 | [[package]] 2156 | name = "proc-macro-error-attr" 2157 | version = "1.0.4" 2158 | source = "registry+https://github.com/rust-lang/crates.io-index" 2159 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 2160 | dependencies = [ 2161 | "proc-macro2", 2162 | "quote", 2163 | "version_check", 2164 | ] 2165 | 2166 | [[package]] 2167 | name = "proc-macro2" 2168 | version = "1.0.53" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" 2171 | dependencies = [ 2172 | "unicode-ident", 2173 | ] 2174 | 2175 | [[package]] 2176 | name = "quick-xml" 2177 | version = "0.22.0" 2178 | source = "registry+https://github.com/rust-lang/crates.io-index" 2179 | checksum = "8533f14c8382aaad0d592c812ac3b826162128b65662331e1127b45c3d18536b" 2180 | dependencies = [ 2181 | "memchr", 2182 | ] 2183 | 2184 | [[package]] 2185 | name = "quick-xml" 2186 | version = "0.26.0" 2187 | source = "registry+https://github.com/rust-lang/crates.io-index" 2188 | checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" 2189 | dependencies = [ 2190 | "memchr", 2191 | ] 2192 | 2193 | [[package]] 2194 | name = "quote" 2195 | version = "1.0.26" 2196 | source = "registry+https://github.com/rust-lang/crates.io-index" 2197 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 2198 | dependencies = [ 2199 | "proc-macro2", 2200 | ] 2201 | 2202 | [[package]] 2203 | name = "rand" 2204 | version = "0.8.5" 2205 | source = "registry+https://github.com/rust-lang/crates.io-index" 2206 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2207 | dependencies = [ 2208 | "libc", 2209 | "rand_chacha", 2210 | "rand_core", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "rand_chacha" 2215 | version = "0.3.1" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2218 | dependencies = [ 2219 | "ppv-lite86", 2220 | "rand_core", 2221 | ] 2222 | 2223 | [[package]] 2224 | name = "rand_core" 2225 | version = "0.6.4" 2226 | source = "registry+https://github.com/rust-lang/crates.io-index" 2227 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 2228 | dependencies = [ 2229 | "getrandom", 2230 | ] 2231 | 2232 | [[package]] 2233 | name = "rayon" 2234 | version = "1.7.0" 2235 | source = "registry+https://github.com/rust-lang/crates.io-index" 2236 | checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" 2237 | dependencies = [ 2238 | "either", 2239 | "rayon-core", 2240 | ] 2241 | 2242 | [[package]] 2243 | name = "rayon-core" 2244 | version = "1.11.0" 2245 | source = "registry+https://github.com/rust-lang/crates.io-index" 2246 | checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" 2247 | dependencies = [ 2248 | "crossbeam-channel", 2249 | "crossbeam-deque", 2250 | "crossbeam-utils", 2251 | "num_cpus", 2252 | ] 2253 | 2254 | [[package]] 2255 | name = "redox_syscall" 2256 | version = "0.2.16" 2257 | source = "registry+https://github.com/rust-lang/crates.io-index" 2258 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 2259 | dependencies = [ 2260 | "bitflags", 2261 | ] 2262 | 2263 | [[package]] 2264 | name = "redox_users" 2265 | version = "0.4.3" 2266 | source = "registry+https://github.com/rust-lang/crates.io-index" 2267 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 2268 | dependencies = [ 2269 | "getrandom", 2270 | "redox_syscall", 2271 | "thiserror", 2272 | ] 2273 | 2274 | [[package]] 2275 | name = "regex" 2276 | version = "1.7.2" 2277 | source = "registry+https://github.com/rust-lang/crates.io-index" 2278 | checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" 2279 | dependencies = [ 2280 | "aho-corasick", 2281 | "memchr", 2282 | "regex-syntax", 2283 | ] 2284 | 2285 | [[package]] 2286 | name = "regex-syntax" 2287 | version = "0.6.29" 2288 | source = "registry+https://github.com/rust-lang/crates.io-index" 2289 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 2290 | 2291 | [[package]] 2292 | name = "reqwest" 2293 | version = "0.11.15" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "0ba30cc2c0cd02af1222ed216ba659cdb2f879dfe3181852fe7c50b1d0005949" 2296 | dependencies = [ 2297 | "base64 0.21.0", 2298 | "bytes", 2299 | "encoding_rs", 2300 | "futures-core", 2301 | "futures-util", 2302 | "h2", 2303 | "http", 2304 | "http-body", 2305 | "hyper", 2306 | "hyper-tls", 2307 | "ipnet", 2308 | "js-sys", 2309 | "log", 2310 | "mime", 2311 | "native-tls", 2312 | "once_cell", 2313 | "percent-encoding", 2314 | "pin-project-lite", 2315 | "serde", 2316 | "serde_json", 2317 | "serde_urlencoded", 2318 | "tokio", 2319 | "tokio-native-tls", 2320 | "tower-service", 2321 | "url", 2322 | "wasm-bindgen", 2323 | "wasm-bindgen-futures", 2324 | "web-sys", 2325 | "winreg", 2326 | ] 2327 | 2328 | [[package]] 2329 | name = "rustc-cfg" 2330 | version = "0.4.0" 2331 | source = "registry+https://github.com/rust-lang/crates.io-index" 2332 | checksum = "8ad221fe7cd09334f8735dcc157b1178e343f43dfaefcd1b09d7fd4fc0921b6f" 2333 | dependencies = [ 2334 | "failure", 2335 | ] 2336 | 2337 | [[package]] 2338 | name = "rustc-demangle" 2339 | version = "0.1.21" 2340 | source = "registry+https://github.com/rust-lang/crates.io-index" 2341 | checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" 2342 | 2343 | [[package]] 2344 | name = "rustc-hash" 2345 | version = "1.1.0" 2346 | source = "registry+https://github.com/rust-lang/crates.io-index" 2347 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 2348 | 2349 | [[package]] 2350 | name = "rustc_version" 2351 | version = "0.4.0" 2352 | source = "registry+https://github.com/rust-lang/crates.io-index" 2353 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 2354 | dependencies = [ 2355 | "semver", 2356 | ] 2357 | 2358 | [[package]] 2359 | name = "rustix" 2360 | version = "0.36.11" 2361 | source = "registry+https://github.com/rust-lang/crates.io-index" 2362 | checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" 2363 | dependencies = [ 2364 | "bitflags", 2365 | "errno", 2366 | "io-lifetimes", 2367 | "libc", 2368 | "linux-raw-sys", 2369 | "windows-sys 0.45.0", 2370 | ] 2371 | 2372 | [[package]] 2373 | name = "rustversion" 2374 | version = "1.0.12" 2375 | source = "registry+https://github.com/rust-lang/crates.io-index" 2376 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 2377 | 2378 | [[package]] 2379 | name = "ryu" 2380 | version = "1.0.13" 2381 | source = "registry+https://github.com/rust-lang/crates.io-index" 2382 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 2383 | 2384 | [[package]] 2385 | name = "same-file" 2386 | version = "1.0.6" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2389 | dependencies = [ 2390 | "winapi-util", 2391 | ] 2392 | 2393 | [[package]] 2394 | name = "schannel" 2395 | version = "0.1.21" 2396 | source = "registry+https://github.com/rust-lang/crates.io-index" 2397 | checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" 2398 | dependencies = [ 2399 | "windows-sys 0.42.0", 2400 | ] 2401 | 2402 | [[package]] 2403 | name = "scopeguard" 2404 | version = "1.1.0" 2405 | source = "registry+https://github.com/rust-lang/crates.io-index" 2406 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2407 | 2408 | [[package]] 2409 | name = "scratch" 2410 | version = "1.0.5" 2411 | source = "registry+https://github.com/rust-lang/crates.io-index" 2412 | checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" 2413 | 2414 | [[package]] 2415 | name = "security-framework" 2416 | version = "2.8.2" 2417 | source = "registry+https://github.com/rust-lang/crates.io-index" 2418 | checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" 2419 | dependencies = [ 2420 | "bitflags", 2421 | "core-foundation", 2422 | "core-foundation-sys", 2423 | "libc", 2424 | "security-framework-sys", 2425 | ] 2426 | 2427 | [[package]] 2428 | name = "security-framework-sys" 2429 | version = "2.8.0" 2430 | source = "registry+https://github.com/rust-lang/crates.io-index" 2431 | checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" 2432 | dependencies = [ 2433 | "core-foundation-sys", 2434 | "libc", 2435 | ] 2436 | 2437 | [[package]] 2438 | name = "semver" 2439 | version = "1.0.17" 2440 | source = "registry+https://github.com/rust-lang/crates.io-index" 2441 | checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" 2442 | dependencies = [ 2443 | "serde", 2444 | ] 2445 | 2446 | [[package]] 2447 | name = "serde" 2448 | version = "1.0.158" 2449 | source = "registry+https://github.com/rust-lang/crates.io-index" 2450 | checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" 2451 | dependencies = [ 2452 | "serde_derive", 2453 | ] 2454 | 2455 | [[package]] 2456 | name = "serde_derive" 2457 | version = "1.0.158" 2458 | source = "registry+https://github.com/rust-lang/crates.io-index" 2459 | checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" 2460 | dependencies = [ 2461 | "proc-macro2", 2462 | "quote", 2463 | "syn 2.0.5", 2464 | ] 2465 | 2466 | [[package]] 2467 | name = "serde_json" 2468 | version = "1.0.94" 2469 | source = "registry+https://github.com/rust-lang/crates.io-index" 2470 | checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" 2471 | dependencies = [ 2472 | "itoa", 2473 | "ryu", 2474 | "serde", 2475 | ] 2476 | 2477 | [[package]] 2478 | name = "serde_regex" 2479 | version = "1.1.0" 2480 | source = "registry+https://github.com/rust-lang/crates.io-index" 2481 | checksum = "a8136f1a4ea815d7eac4101cfd0b16dc0cb5e1fe1b8609dfd728058656b7badf" 2482 | dependencies = [ 2483 | "regex", 2484 | "serde", 2485 | ] 2486 | 2487 | [[package]] 2488 | name = "serde_urlencoded" 2489 | version = "0.7.1" 2490 | source = "registry+https://github.com/rust-lang/crates.io-index" 2491 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 2492 | dependencies = [ 2493 | "form_urlencoded", 2494 | "itoa", 2495 | "ryu", 2496 | "serde", 2497 | ] 2498 | 2499 | [[package]] 2500 | name = "sha2" 2501 | version = "0.10.6" 2502 | source = "registry+https://github.com/rust-lang/crates.io-index" 2503 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 2504 | dependencies = [ 2505 | "cfg-if", 2506 | "cpufeatures", 2507 | "digest", 2508 | ] 2509 | 2510 | [[package]] 2511 | name = "signal-hook" 2512 | version = "0.3.15" 2513 | source = "registry+https://github.com/rust-lang/crates.io-index" 2514 | checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" 2515 | dependencies = [ 2516 | "libc", 2517 | "signal-hook-registry", 2518 | ] 2519 | 2520 | [[package]] 2521 | name = "signal-hook-mio" 2522 | version = "0.2.3" 2523 | source = "registry+https://github.com/rust-lang/crates.io-index" 2524 | checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" 2525 | dependencies = [ 2526 | "libc", 2527 | "mio", 2528 | "signal-hook", 2529 | ] 2530 | 2531 | [[package]] 2532 | name = "signal-hook-registry" 2533 | version = "1.4.1" 2534 | source = "registry+https://github.com/rust-lang/crates.io-index" 2535 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 2536 | dependencies = [ 2537 | "libc", 2538 | ] 2539 | 2540 | [[package]] 2541 | name = "similar" 2542 | version = "2.2.1" 2543 | source = "registry+https://github.com/rust-lang/crates.io-index" 2544 | checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" 2545 | 2546 | [[package]] 2547 | name = "simplelog" 2548 | version = "0.12.1" 2549 | source = "registry+https://github.com/rust-lang/crates.io-index" 2550 | checksum = "acee08041c5de3d5048c8b3f6f13fafb3026b24ba43c6a695a0c76179b844369" 2551 | dependencies = [ 2552 | "log", 2553 | "termcolor", 2554 | "time 0.3.20", 2555 | ] 2556 | 2557 | [[package]] 2558 | name = "siphasher" 2559 | version = "0.3.10" 2560 | source = "registry+https://github.com/rust-lang/crates.io-index" 2561 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 2562 | 2563 | [[package]] 2564 | name = "slab" 2565 | version = "0.4.8" 2566 | source = "registry+https://github.com/rust-lang/crates.io-index" 2567 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 2568 | dependencies = [ 2569 | "autocfg", 2570 | ] 2571 | 2572 | [[package]] 2573 | name = "slug" 2574 | version = "0.1.4" 2575 | source = "registry+https://github.com/rust-lang/crates.io-index" 2576 | checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" 2577 | dependencies = [ 2578 | "deunicode", 2579 | ] 2580 | 2581 | [[package]] 2582 | name = "sluice" 2583 | version = "0.5.5" 2584 | source = "registry+https://github.com/rust-lang/crates.io-index" 2585 | checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" 2586 | dependencies = [ 2587 | "async-channel", 2588 | "futures-core", 2589 | "futures-io", 2590 | ] 2591 | 2592 | [[package]] 2593 | name = "smallvec" 2594 | version = "1.10.0" 2595 | source = "registry+https://github.com/rust-lang/crates.io-index" 2596 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 2597 | 2598 | [[package]] 2599 | name = "socket2" 2600 | version = "0.4.9" 2601 | source = "registry+https://github.com/rust-lang/crates.io-index" 2602 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 2603 | dependencies = [ 2604 | "libc", 2605 | "winapi", 2606 | ] 2607 | 2608 | [[package]] 2609 | name = "stable_deref_trait" 2610 | version = "1.2.0" 2611 | source = "registry+https://github.com/rust-lang/crates.io-index" 2612 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 2613 | 2614 | [[package]] 2615 | name = "str-buf" 2616 | version = "1.0.6" 2617 | source = "registry+https://github.com/rust-lang/crates.io-index" 2618 | checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" 2619 | 2620 | [[package]] 2621 | name = "string_cache" 2622 | version = "0.8.7" 2623 | source = "registry+https://github.com/rust-lang/crates.io-index" 2624 | checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" 2625 | dependencies = [ 2626 | "new_debug_unreachable", 2627 | "once_cell", 2628 | "parking_lot", 2629 | "phf_shared", 2630 | "precomputed-hash", 2631 | ] 2632 | 2633 | [[package]] 2634 | name = "strsim" 2635 | version = "0.8.0" 2636 | source = "registry+https://github.com/rust-lang/crates.io-index" 2637 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 2638 | 2639 | [[package]] 2640 | name = "structopt" 2641 | version = "0.3.26" 2642 | source = "registry+https://github.com/rust-lang/crates.io-index" 2643 | checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" 2644 | dependencies = [ 2645 | "clap", 2646 | "lazy_static", 2647 | "structopt-derive", 2648 | ] 2649 | 2650 | [[package]] 2651 | name = "structopt-derive" 2652 | version = "0.4.18" 2653 | source = "registry+https://github.com/rust-lang/crates.io-index" 2654 | checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" 2655 | dependencies = [ 2656 | "heck 0.3.3", 2657 | "proc-macro-error", 2658 | "proc-macro2", 2659 | "quote", 2660 | "syn 1.0.109", 2661 | ] 2662 | 2663 | [[package]] 2664 | name = "symbolic-common" 2665 | version = "9.2.1" 2666 | source = "registry+https://github.com/rust-lang/crates.io-index" 2667 | checksum = "800963ba330b09a2ae4a4f7c6392b81fbc2784099a98c1eac68c3437aa9382b2" 2668 | dependencies = [ 2669 | "debugid", 2670 | "memmap2", 2671 | "stable_deref_trait", 2672 | "uuid", 2673 | ] 2674 | 2675 | [[package]] 2676 | name = "symbolic-demangle" 2677 | version = "9.2.1" 2678 | source = "registry+https://github.com/rust-lang/crates.io-index" 2679 | checksum = "2b940a1fdbc72bb3369e38714efe6cd332dbbe46d093cf03d668b9ac390d1ad0" 2680 | dependencies = [ 2681 | "cpp_demangle", 2682 | "msvc-demangler", 2683 | "rustc-demangle", 2684 | "symbolic-common", 2685 | ] 2686 | 2687 | [[package]] 2688 | name = "syn" 2689 | version = "1.0.109" 2690 | source = "registry+https://github.com/rust-lang/crates.io-index" 2691 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2692 | dependencies = [ 2693 | "proc-macro2", 2694 | "quote", 2695 | "unicode-ident", 2696 | ] 2697 | 2698 | [[package]] 2699 | name = "syn" 2700 | version = "2.0.5" 2701 | source = "registry+https://github.com/rust-lang/crates.io-index" 2702 | checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" 2703 | dependencies = [ 2704 | "proc-macro2", 2705 | "quote", 2706 | "unicode-ident", 2707 | ] 2708 | 2709 | [[package]] 2710 | name = "synstructure" 2711 | version = "0.12.6" 2712 | source = "registry+https://github.com/rust-lang/crates.io-index" 2713 | checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" 2714 | dependencies = [ 2715 | "proc-macro2", 2716 | "quote", 2717 | "syn 1.0.109", 2718 | "unicode-xid", 2719 | ] 2720 | 2721 | [[package]] 2722 | name = "tabled" 2723 | version = "0.8.0" 2724 | source = "registry+https://github.com/rust-lang/crates.io-index" 2725 | checksum = "e5b2f8c37d26d87d2252187b0a45ea3cbf42baca10377c7e7eaaa2800fa9bf97" 2726 | dependencies = [ 2727 | "papergrid", 2728 | "tabled_derive", 2729 | "unicode-width", 2730 | ] 2731 | 2732 | [[package]] 2733 | name = "tabled_derive" 2734 | version = "0.4.0" 2735 | source = "registry+https://github.com/rust-lang/crates.io-index" 2736 | checksum = "f9ee618502f497abf593e1c5c9577f34775b111480009ffccd7ad70d23fcaba8" 2737 | dependencies = [ 2738 | "heck 0.4.1", 2739 | "proc-macro-error", 2740 | "proc-macro2", 2741 | "quote", 2742 | "syn 1.0.109", 2743 | ] 2744 | 2745 | [[package]] 2746 | name = "tempfile" 2747 | version = "3.4.0" 2748 | source = "registry+https://github.com/rust-lang/crates.io-index" 2749 | checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" 2750 | dependencies = [ 2751 | "cfg-if", 2752 | "fastrand", 2753 | "redox_syscall", 2754 | "rustix", 2755 | "windows-sys 0.42.0", 2756 | ] 2757 | 2758 | [[package]] 2759 | name = "tera" 2760 | version = "1.18.1" 2761 | source = "registry+https://github.com/rust-lang/crates.io-index" 2762 | checksum = "95a665751302f22a03c56721e23094e4dc22b04a80f381e6737a07bf7a7c70c0" 2763 | dependencies = [ 2764 | "chrono", 2765 | "chrono-tz", 2766 | "globwalk", 2767 | "humansize", 2768 | "lazy_static", 2769 | "percent-encoding", 2770 | "pest", 2771 | "pest_derive", 2772 | "rand", 2773 | "regex", 2774 | "serde", 2775 | "serde_json", 2776 | "slug", 2777 | "thread_local", 2778 | "unic-segment", 2779 | ] 2780 | 2781 | [[package]] 2782 | name = "term" 2783 | version = "0.7.0" 2784 | source = "registry+https://github.com/rust-lang/crates.io-index" 2785 | checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" 2786 | dependencies = [ 2787 | "dirs-next", 2788 | "rustversion", 2789 | "winapi", 2790 | ] 2791 | 2792 | [[package]] 2793 | name = "termcolor" 2794 | version = "1.1.3" 2795 | source = "registry+https://github.com/rust-lang/crates.io-index" 2796 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 2797 | dependencies = [ 2798 | "winapi-util", 2799 | ] 2800 | 2801 | [[package]] 2802 | name = "terminal-clipboard" 2803 | version = "0.4.0" 2804 | source = "registry+https://github.com/rust-lang/crates.io-index" 2805 | checksum = "bb56a93aa750a8e07858eb8f6692fce91b78ed4b129b8ba4bb477dfcaf3b8ab8" 2806 | dependencies = [ 2807 | "clipboard-win", 2808 | "clipboard_macos", 2809 | "once_cell", 2810 | "termux-clipboard", 2811 | "x11-clipboard", 2812 | ] 2813 | 2814 | [[package]] 2815 | name = "termux-clipboard" 2816 | version = "0.1.0" 2817 | source = "registry+https://github.com/rust-lang/crates.io-index" 2818 | checksum = "9f6aff13ca3293315b94f6dbd9c69e1c958fe421c294681e2ffda80c9858e36f" 2819 | 2820 | [[package]] 2821 | name = "textwrap" 2822 | version = "0.11.0" 2823 | source = "registry+https://github.com/rust-lang/crates.io-index" 2824 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 2825 | dependencies = [ 2826 | "unicode-width", 2827 | ] 2828 | 2829 | [[package]] 2830 | name = "thiserror" 2831 | version = "1.0.40" 2832 | source = "registry+https://github.com/rust-lang/crates.io-index" 2833 | checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" 2834 | dependencies = [ 2835 | "thiserror-impl", 2836 | ] 2837 | 2838 | [[package]] 2839 | name = "thiserror-impl" 2840 | version = "1.0.40" 2841 | source = "registry+https://github.com/rust-lang/crates.io-index" 2842 | checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" 2843 | dependencies = [ 2844 | "proc-macro2", 2845 | "quote", 2846 | "syn 2.0.5", 2847 | ] 2848 | 2849 | [[package]] 2850 | name = "thread_local" 2851 | version = "1.1.4" 2852 | source = "registry+https://github.com/rust-lang/crates.io-index" 2853 | checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" 2854 | dependencies = [ 2855 | "once_cell", 2856 | ] 2857 | 2858 | [[package]] 2859 | name = "time" 2860 | version = "0.1.45" 2861 | source = "registry+https://github.com/rust-lang/crates.io-index" 2862 | checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" 2863 | dependencies = [ 2864 | "libc", 2865 | "wasi 0.10.0+wasi-snapshot-preview1", 2866 | "winapi", 2867 | ] 2868 | 2869 | [[package]] 2870 | name = "time" 2871 | version = "0.3.20" 2872 | source = "registry+https://github.com/rust-lang/crates.io-index" 2873 | checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" 2874 | dependencies = [ 2875 | "itoa", 2876 | "libc", 2877 | "num_threads", 2878 | "serde", 2879 | "time-core", 2880 | "time-macros", 2881 | ] 2882 | 2883 | [[package]] 2884 | name = "time-core" 2885 | version = "0.1.0" 2886 | source = "registry+https://github.com/rust-lang/crates.io-index" 2887 | checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" 2888 | 2889 | [[package]] 2890 | name = "time-macros" 2891 | version = "0.2.8" 2892 | source = "registry+https://github.com/rust-lang/crates.io-index" 2893 | checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" 2894 | dependencies = [ 2895 | "time-core", 2896 | ] 2897 | 2898 | [[package]] 2899 | name = "tiny-keccak" 2900 | version = "2.0.2" 2901 | source = "registry+https://github.com/rust-lang/crates.io-index" 2902 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 2903 | dependencies = [ 2904 | "crunchy", 2905 | ] 2906 | 2907 | [[package]] 2908 | name = "tinyvec" 2909 | version = "1.6.0" 2910 | source = "registry+https://github.com/rust-lang/crates.io-index" 2911 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2912 | dependencies = [ 2913 | "tinyvec_macros", 2914 | ] 2915 | 2916 | [[package]] 2917 | name = "tinyvec_macros" 2918 | version = "0.1.1" 2919 | source = "registry+https://github.com/rust-lang/crates.io-index" 2920 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2921 | 2922 | [[package]] 2923 | name = "tokio" 2924 | version = "1.26.0" 2925 | source = "registry+https://github.com/rust-lang/crates.io-index" 2926 | checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" 2927 | dependencies = [ 2928 | "autocfg", 2929 | "bytes", 2930 | "libc", 2931 | "memchr", 2932 | "mio", 2933 | "num_cpus", 2934 | "parking_lot", 2935 | "pin-project-lite", 2936 | "signal-hook-registry", 2937 | "socket2", 2938 | "tokio-macros", 2939 | "windows-sys 0.45.0", 2940 | ] 2941 | 2942 | [[package]] 2943 | name = "tokio-macros" 2944 | version = "1.8.2" 2945 | source = "registry+https://github.com/rust-lang/crates.io-index" 2946 | checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" 2947 | dependencies = [ 2948 | "proc-macro2", 2949 | "quote", 2950 | "syn 1.0.109", 2951 | ] 2952 | 2953 | [[package]] 2954 | name = "tokio-native-tls" 2955 | version = "0.3.1" 2956 | source = "registry+https://github.com/rust-lang/crates.io-index" 2957 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 2958 | dependencies = [ 2959 | "native-tls", 2960 | "tokio", 2961 | ] 2962 | 2963 | [[package]] 2964 | name = "tokio-util" 2965 | version = "0.7.7" 2966 | source = "registry+https://github.com/rust-lang/crates.io-index" 2967 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" 2968 | dependencies = [ 2969 | "bytes", 2970 | "futures-core", 2971 | "futures-sink", 2972 | "pin-project-lite", 2973 | "tokio", 2974 | "tracing", 2975 | ] 2976 | 2977 | [[package]] 2978 | name = "toml" 2979 | version = "0.5.11" 2980 | source = "registry+https://github.com/rust-lang/crates.io-index" 2981 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 2982 | dependencies = [ 2983 | "serde", 2984 | ] 2985 | 2986 | [[package]] 2987 | name = "tower-service" 2988 | version = "0.3.2" 2989 | source = "registry+https://github.com/rust-lang/crates.io-index" 2990 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 2991 | 2992 | [[package]] 2993 | name = "tracing" 2994 | version = "0.1.37" 2995 | source = "registry+https://github.com/rust-lang/crates.io-index" 2996 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 2997 | dependencies = [ 2998 | "cfg-if", 2999 | "log", 3000 | "pin-project-lite", 3001 | "tracing-attributes", 3002 | "tracing-core", 3003 | ] 3004 | 3005 | [[package]] 3006 | name = "tracing-attributes" 3007 | version = "0.1.23" 3008 | source = "registry+https://github.com/rust-lang/crates.io-index" 3009 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" 3010 | dependencies = [ 3011 | "proc-macro2", 3012 | "quote", 3013 | "syn 1.0.109", 3014 | ] 3015 | 3016 | [[package]] 3017 | name = "tracing-core" 3018 | version = "0.1.30" 3019 | source = "registry+https://github.com/rust-lang/crates.io-index" 3020 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 3021 | dependencies = [ 3022 | "once_cell", 3023 | ] 3024 | 3025 | [[package]] 3026 | name = "tracing-futures" 3027 | version = "0.2.5" 3028 | source = "registry+https://github.com/rust-lang/crates.io-index" 3029 | checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 3030 | dependencies = [ 3031 | "pin-project", 3032 | "tracing", 3033 | ] 3034 | 3035 | [[package]] 3036 | name = "try-lock" 3037 | version = "0.2.4" 3038 | source = "registry+https://github.com/rust-lang/crates.io-index" 3039 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 3040 | 3041 | [[package]] 3042 | name = "typenum" 3043 | version = "1.16.0" 3044 | source = "registry+https://github.com/rust-lang/crates.io-index" 3045 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 3046 | 3047 | [[package]] 3048 | name = "ucd-trie" 3049 | version = "0.1.5" 3050 | source = "registry+https://github.com/rust-lang/crates.io-index" 3051 | checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" 3052 | 3053 | [[package]] 3054 | name = "uncased" 3055 | version = "0.9.7" 3056 | source = "registry+https://github.com/rust-lang/crates.io-index" 3057 | checksum = "09b01702b0fd0b3fadcf98e098780badda8742d4f4a7676615cad90e8ac73622" 3058 | dependencies = [ 3059 | "version_check", 3060 | ] 3061 | 3062 | [[package]] 3063 | name = "unic-char-property" 3064 | version = "0.9.0" 3065 | source = "registry+https://github.com/rust-lang/crates.io-index" 3066 | checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" 3067 | dependencies = [ 3068 | "unic-char-range", 3069 | ] 3070 | 3071 | [[package]] 3072 | name = "unic-char-range" 3073 | version = "0.9.0" 3074 | source = "registry+https://github.com/rust-lang/crates.io-index" 3075 | checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" 3076 | 3077 | [[package]] 3078 | name = "unic-common" 3079 | version = "0.9.0" 3080 | source = "registry+https://github.com/rust-lang/crates.io-index" 3081 | checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" 3082 | 3083 | [[package]] 3084 | name = "unic-segment" 3085 | version = "0.9.0" 3086 | source = "registry+https://github.com/rust-lang/crates.io-index" 3087 | checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" 3088 | dependencies = [ 3089 | "unic-ucd-segment", 3090 | ] 3091 | 3092 | [[package]] 3093 | name = "unic-ucd-segment" 3094 | version = "0.9.0" 3095 | source = "registry+https://github.com/rust-lang/crates.io-index" 3096 | checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" 3097 | dependencies = [ 3098 | "unic-char-property", 3099 | "unic-char-range", 3100 | "unic-ucd-version", 3101 | ] 3102 | 3103 | [[package]] 3104 | name = "unic-ucd-version" 3105 | version = "0.9.0" 3106 | source = "registry+https://github.com/rust-lang/crates.io-index" 3107 | checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" 3108 | dependencies = [ 3109 | "unic-common", 3110 | ] 3111 | 3112 | [[package]] 3113 | name = "unicode-bidi" 3114 | version = "0.3.13" 3115 | source = "registry+https://github.com/rust-lang/crates.io-index" 3116 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 3117 | 3118 | [[package]] 3119 | name = "unicode-ident" 3120 | version = "1.0.8" 3121 | source = "registry+https://github.com/rust-lang/crates.io-index" 3122 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 3123 | 3124 | [[package]] 3125 | name = "unicode-normalization" 3126 | version = "0.1.22" 3127 | source = "registry+https://github.com/rust-lang/crates.io-index" 3128 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 3129 | dependencies = [ 3130 | "tinyvec", 3131 | ] 3132 | 3133 | [[package]] 3134 | name = "unicode-segmentation" 3135 | version = "1.10.1" 3136 | source = "registry+https://github.com/rust-lang/crates.io-index" 3137 | checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" 3138 | 3139 | [[package]] 3140 | name = "unicode-width" 3141 | version = "0.1.10" 3142 | source = "registry+https://github.com/rust-lang/crates.io-index" 3143 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 3144 | 3145 | [[package]] 3146 | name = "unicode-xid" 3147 | version = "0.2.4" 3148 | source = "registry+https://github.com/rust-lang/crates.io-index" 3149 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 3150 | 3151 | [[package]] 3152 | name = "url" 3153 | version = "2.3.1" 3154 | source = "registry+https://github.com/rust-lang/crates.io-index" 3155 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 3156 | dependencies = [ 3157 | "form_urlencoded", 3158 | "idna", 3159 | "percent-encoding", 3160 | ] 3161 | 3162 | [[package]] 3163 | name = "uuid" 3164 | version = "1.3.0" 3165 | source = "registry+https://github.com/rust-lang/crates.io-index" 3166 | checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" 3167 | dependencies = [ 3168 | "getrandom", 3169 | ] 3170 | 3171 | [[package]] 3172 | name = "value-bag" 3173 | version = "1.0.0-alpha.9" 3174 | source = "registry+https://github.com/rust-lang/crates.io-index" 3175 | checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" 3176 | dependencies = [ 3177 | "ctor", 3178 | "version_check", 3179 | ] 3180 | 3181 | [[package]] 3182 | name = "vcpkg" 3183 | version = "0.2.15" 3184 | source = "registry+https://github.com/rust-lang/crates.io-index" 3185 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 3186 | 3187 | [[package]] 3188 | name = "vec_map" 3189 | version = "0.8.2" 3190 | source = "registry+https://github.com/rust-lang/crates.io-index" 3191 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 3192 | 3193 | [[package]] 3194 | name = "version_check" 3195 | version = "0.9.4" 3196 | source = "registry+https://github.com/rust-lang/crates.io-index" 3197 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 3198 | 3199 | [[package]] 3200 | name = "waker-fn" 3201 | version = "1.1.0" 3202 | source = "registry+https://github.com/rust-lang/crates.io-index" 3203 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 3204 | 3205 | [[package]] 3206 | name = "walkdir" 3207 | version = "2.3.3" 3208 | source = "registry+https://github.com/rust-lang/crates.io-index" 3209 | checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" 3210 | dependencies = [ 3211 | "same-file", 3212 | "winapi-util", 3213 | ] 3214 | 3215 | [[package]] 3216 | name = "want" 3217 | version = "0.3.0" 3218 | source = "registry+https://github.com/rust-lang/crates.io-index" 3219 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 3220 | dependencies = [ 3221 | "log", 3222 | "try-lock", 3223 | ] 3224 | 3225 | [[package]] 3226 | name = "wasi" 3227 | version = "0.10.0+wasi-snapshot-preview1" 3228 | source = "registry+https://github.com/rust-lang/crates.io-index" 3229 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 3230 | 3231 | [[package]] 3232 | name = "wasi" 3233 | version = "0.11.0+wasi-snapshot-preview1" 3234 | source = "registry+https://github.com/rust-lang/crates.io-index" 3235 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 3236 | 3237 | [[package]] 3238 | name = "wasm-bindgen" 3239 | version = "0.2.84" 3240 | source = "registry+https://github.com/rust-lang/crates.io-index" 3241 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" 3242 | dependencies = [ 3243 | "cfg-if", 3244 | "wasm-bindgen-macro", 3245 | ] 3246 | 3247 | [[package]] 3248 | name = "wasm-bindgen-backend" 3249 | version = "0.2.84" 3250 | source = "registry+https://github.com/rust-lang/crates.io-index" 3251 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" 3252 | dependencies = [ 3253 | "bumpalo", 3254 | "log", 3255 | "once_cell", 3256 | "proc-macro2", 3257 | "quote", 3258 | "syn 1.0.109", 3259 | "wasm-bindgen-shared", 3260 | ] 3261 | 3262 | [[package]] 3263 | name = "wasm-bindgen-futures" 3264 | version = "0.4.34" 3265 | source = "registry+https://github.com/rust-lang/crates.io-index" 3266 | checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" 3267 | dependencies = [ 3268 | "cfg-if", 3269 | "js-sys", 3270 | "wasm-bindgen", 3271 | "web-sys", 3272 | ] 3273 | 3274 | [[package]] 3275 | name = "wasm-bindgen-macro" 3276 | version = "0.2.84" 3277 | source = "registry+https://github.com/rust-lang/crates.io-index" 3278 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" 3279 | dependencies = [ 3280 | "quote", 3281 | "wasm-bindgen-macro-support", 3282 | ] 3283 | 3284 | [[package]] 3285 | name = "wasm-bindgen-macro-support" 3286 | version = "0.2.84" 3287 | source = "registry+https://github.com/rust-lang/crates.io-index" 3288 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" 3289 | dependencies = [ 3290 | "proc-macro2", 3291 | "quote", 3292 | "syn 1.0.109", 3293 | "wasm-bindgen-backend", 3294 | "wasm-bindgen-shared", 3295 | ] 3296 | 3297 | [[package]] 3298 | name = "wasm-bindgen-shared" 3299 | version = "0.2.84" 3300 | source = "registry+https://github.com/rust-lang/crates.io-index" 3301 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" 3302 | 3303 | [[package]] 3304 | name = "web-sys" 3305 | version = "0.3.61" 3306 | source = "registry+https://github.com/rust-lang/crates.io-index" 3307 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" 3308 | dependencies = [ 3309 | "js-sys", 3310 | "wasm-bindgen", 3311 | ] 3312 | 3313 | [[package]] 3314 | name = "winapi" 3315 | version = "0.3.9" 3316 | source = "registry+https://github.com/rust-lang/crates.io-index" 3317 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3318 | dependencies = [ 3319 | "winapi-i686-pc-windows-gnu", 3320 | "winapi-x86_64-pc-windows-gnu", 3321 | ] 3322 | 3323 | [[package]] 3324 | name = "winapi-i686-pc-windows-gnu" 3325 | version = "0.4.0" 3326 | source = "registry+https://github.com/rust-lang/crates.io-index" 3327 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3328 | 3329 | [[package]] 3330 | name = "winapi-util" 3331 | version = "0.1.5" 3332 | source = "registry+https://github.com/rust-lang/crates.io-index" 3333 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 3334 | dependencies = [ 3335 | "winapi", 3336 | ] 3337 | 3338 | [[package]] 3339 | name = "winapi-x86_64-pc-windows-gnu" 3340 | version = "0.4.0" 3341 | source = "registry+https://github.com/rust-lang/crates.io-index" 3342 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3343 | 3344 | [[package]] 3345 | name = "windows" 3346 | version = "0.46.0" 3347 | source = "registry+https://github.com/rust-lang/crates.io-index" 3348 | checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" 3349 | dependencies = [ 3350 | "windows-targets 0.42.2", 3351 | ] 3352 | 3353 | [[package]] 3354 | name = "windows-sys" 3355 | version = "0.42.0" 3356 | source = "registry+https://github.com/rust-lang/crates.io-index" 3357 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 3358 | dependencies = [ 3359 | "windows_aarch64_gnullvm 0.42.2", 3360 | "windows_aarch64_msvc 0.42.2", 3361 | "windows_i686_gnu 0.42.2", 3362 | "windows_i686_msvc 0.42.2", 3363 | "windows_x86_64_gnu 0.42.2", 3364 | "windows_x86_64_gnullvm 0.42.2", 3365 | "windows_x86_64_msvc 0.42.2", 3366 | ] 3367 | 3368 | [[package]] 3369 | name = "windows-sys" 3370 | version = "0.45.0" 3371 | source = "registry+https://github.com/rust-lang/crates.io-index" 3372 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 3373 | dependencies = [ 3374 | "windows-targets 0.42.2", 3375 | ] 3376 | 3377 | [[package]] 3378 | name = "windows-sys" 3379 | version = "0.48.0" 3380 | source = "registry+https://github.com/rust-lang/crates.io-index" 3381 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 3382 | dependencies = [ 3383 | "windows-targets 0.48.5", 3384 | ] 3385 | 3386 | [[package]] 3387 | name = "windows-targets" 3388 | version = "0.42.2" 3389 | source = "registry+https://github.com/rust-lang/crates.io-index" 3390 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 3391 | dependencies = [ 3392 | "windows_aarch64_gnullvm 0.42.2", 3393 | "windows_aarch64_msvc 0.42.2", 3394 | "windows_i686_gnu 0.42.2", 3395 | "windows_i686_msvc 0.42.2", 3396 | "windows_x86_64_gnu 0.42.2", 3397 | "windows_x86_64_gnullvm 0.42.2", 3398 | "windows_x86_64_msvc 0.42.2", 3399 | ] 3400 | 3401 | [[package]] 3402 | name = "windows-targets" 3403 | version = "0.48.5" 3404 | source = "registry+https://github.com/rust-lang/crates.io-index" 3405 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 3406 | dependencies = [ 3407 | "windows_aarch64_gnullvm 0.48.5", 3408 | "windows_aarch64_msvc 0.48.5", 3409 | "windows_i686_gnu 0.48.5", 3410 | "windows_i686_msvc 0.48.5", 3411 | "windows_x86_64_gnu 0.48.5", 3412 | "windows_x86_64_gnullvm 0.48.5", 3413 | "windows_x86_64_msvc 0.48.5", 3414 | ] 3415 | 3416 | [[package]] 3417 | name = "windows_aarch64_gnullvm" 3418 | version = "0.42.2" 3419 | source = "registry+https://github.com/rust-lang/crates.io-index" 3420 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 3421 | 3422 | [[package]] 3423 | name = "windows_aarch64_gnullvm" 3424 | version = "0.48.5" 3425 | source = "registry+https://github.com/rust-lang/crates.io-index" 3426 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 3427 | 3428 | [[package]] 3429 | name = "windows_aarch64_msvc" 3430 | version = "0.42.2" 3431 | source = "registry+https://github.com/rust-lang/crates.io-index" 3432 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 3433 | 3434 | [[package]] 3435 | name = "windows_aarch64_msvc" 3436 | version = "0.48.5" 3437 | source = "registry+https://github.com/rust-lang/crates.io-index" 3438 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 3439 | 3440 | [[package]] 3441 | name = "windows_i686_gnu" 3442 | version = "0.42.2" 3443 | source = "registry+https://github.com/rust-lang/crates.io-index" 3444 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 3445 | 3446 | [[package]] 3447 | name = "windows_i686_gnu" 3448 | version = "0.48.5" 3449 | source = "registry+https://github.com/rust-lang/crates.io-index" 3450 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 3451 | 3452 | [[package]] 3453 | name = "windows_i686_msvc" 3454 | version = "0.42.2" 3455 | source = "registry+https://github.com/rust-lang/crates.io-index" 3456 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 3457 | 3458 | [[package]] 3459 | name = "windows_i686_msvc" 3460 | version = "0.48.5" 3461 | source = "registry+https://github.com/rust-lang/crates.io-index" 3462 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 3463 | 3464 | [[package]] 3465 | name = "windows_x86_64_gnu" 3466 | version = "0.42.2" 3467 | source = "registry+https://github.com/rust-lang/crates.io-index" 3468 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 3469 | 3470 | [[package]] 3471 | name = "windows_x86_64_gnu" 3472 | version = "0.48.5" 3473 | source = "registry+https://github.com/rust-lang/crates.io-index" 3474 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 3475 | 3476 | [[package]] 3477 | name = "windows_x86_64_gnullvm" 3478 | version = "0.42.2" 3479 | source = "registry+https://github.com/rust-lang/crates.io-index" 3480 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 3481 | 3482 | [[package]] 3483 | name = "windows_x86_64_gnullvm" 3484 | version = "0.48.5" 3485 | source = "registry+https://github.com/rust-lang/crates.io-index" 3486 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 3487 | 3488 | [[package]] 3489 | name = "windows_x86_64_msvc" 3490 | version = "0.42.2" 3491 | source = "registry+https://github.com/rust-lang/crates.io-index" 3492 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 3493 | 3494 | [[package]] 3495 | name = "windows_x86_64_msvc" 3496 | version = "0.48.5" 3497 | source = "registry+https://github.com/rust-lang/crates.io-index" 3498 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 3499 | 3500 | [[package]] 3501 | name = "winreg" 3502 | version = "0.10.1" 3503 | source = "registry+https://github.com/rust-lang/crates.io-index" 3504 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 3505 | dependencies = [ 3506 | "winapi", 3507 | ] 3508 | 3509 | [[package]] 3510 | name = "x11-clipboard" 3511 | version = "0.5.3" 3512 | source = "registry+https://github.com/rust-lang/crates.io-index" 3513 | checksum = "473068b7b80ac86a18328824f1054e5e007898c47b5bbc281bd7abe32bc3653c" 3514 | dependencies = [ 3515 | "xcb", 3516 | ] 3517 | 3518 | [[package]] 3519 | name = "xcb" 3520 | version = "0.10.1" 3521 | source = "registry+https://github.com/rust-lang/crates.io-index" 3522 | checksum = "771e2b996df720cd1c6dd9ff90f62d91698fd3610cc078388d0564bdd6622a9c" 3523 | dependencies = [ 3524 | "libc", 3525 | "log", 3526 | "quick-xml 0.22.0", 3527 | ] 3528 | 3529 | [[package]] 3530 | name = "zip" 3531 | version = "0.6.4" 3532 | source = "registry+https://github.com/rust-lang/crates.io-index" 3533 | checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef" 3534 | dependencies = [ 3535 | "byteorder", 3536 | "crc32fast", 3537 | "crossbeam-utils", 3538 | "flate2", 3539 | ] 3540 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "gpt-cli" 3 | version = "0.1.0" 4 | edition = "2021" 5 | authors = ["Daniel Gustaw "] 6 | license = "MIT" 7 | description = "Run linux commands with natural language. Eg.: 'show my graphic card' instead 'lspci | grep VGA'" 8 | readme = "README.md" 9 | homepage = "https://github.com/gustawdaniel/gpt-cli" 10 | repository = "https://github.com/gustawdaniel/gpt-cli" 11 | keywords = ["cli", "openai", "gpt3", "gpt3-cli", "gpt3-turbo"] 12 | categories = ["command-line-utilities"] 13 | 14 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 15 | 16 | [dependencies] 17 | dirs = "5.0.0" 18 | serde_json = "1.0.94" 19 | rand = "0.8.5" 20 | hex = "0.4.3" 21 | colored = "2.0.0" 22 | serde = { version = "1.0.155", features = ["derive"] } 23 | reqwest = { version = "0.11", features = ["json"] } 24 | futures = "0.3.27" 25 | tokio = { version = "1.26.0", features = ["full"] } 26 | inquire = { version = "0.6.0" } 27 | terminal-clipboard = "0.4.0" 28 | async-recursion = "1.0.2" 29 | openssl = { version = "0.10", features = ["vendored"] } 30 | 31 | [dev-dependencies] 32 | grcov = "0.8.13" 33 | httpmock="0.6.7" 34 | 35 | [package.metadata.generate-rpm] 36 | assets = [ 37 | { source = "target/release/gpt-cli", dest = "/usr/bin/gpt-cli", mode = "755" }, 38 | { source = "gpt-cli.svg", dest = "/usr/share/icons/hicolor/", mode = "644" }, 39 | ] -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest as certs 2 | RUN apk add --no-cache ca-certificates 3 | 4 | FROM scratch 5 | COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt 6 | 7 | ENV GPT_POST=out 8 | COPY target/x86_64-unknown-linux-musl/release/gpt-cli /gpt-cli 9 | ENTRYPOINT ["/gpt-cli"] 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Daniel Gustaw 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Test](https://github.com/gustawdaniel/gpt-cli/actions/workflows/test.yml/badge.svg)](https://github.com/gustawdaniel/gpt-cli/actions/workflows/test.yml) 2 | [![Release](https://github.com/gustawdaniel/gpt-cli/actions/workflows/release.yml/badge.svg)](https://github.com/gustawdaniel/gpt-cli/actions/workflows/release.yml) 3 | [![codecov](https://codecov.io/gh/gustawdaniel/gpt-cli/branch/main/graph/badge.svg?token=KB4F1JF9W6)](https://codecov.io/gh/gustawdaniel/gpt-cli) 4 | ![Crates.io](https://img.shields.io/crates/d/gpt-cli?label=Crates.io%20downloads) 5 | ![Docker Pulls](https://img.shields.io/docker/pulls/gustawdaniel/gpt-cli) 6 | ![Crates.io](https://img.shields.io/crates/v/gpt-cli) 7 | ![GitHub](https://img.shields.io/github/license/gustawdaniel/gpt-cli) 8 | 9 | # Gpt Cli 10 | 11 | Linux terminal GPT3 integration with killer prompt that skip descriptions and other human-readable bullshit. It shows 12 | you commands that can be executed by `ENTER`. 13 | 14 | ## Example: 15 | 16 | You typing: 17 | 18 | ``` 19 | p show me my graphic cards 20 | ``` 21 | 22 | You will see: 23 | 24 | ``` 25 | lspci -k | grep -A 2 -E "(VGA|3D)" 26 | ``` 27 | 28 | After `ENTER` you will see 29 | 30 | ``` 31 | 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c) 32 | Subsystem: CLEVO/KAPOK Computer Device 65f5 33 | Kernel driver in use: i915 34 | -- 35 | 01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1) 36 | Subsystem: CLEVO/KAPOK Computer Device 67f5 37 | Kernel driver in use: nvidia 38 | ``` 39 | 40 | ## Customization 41 | 42 | ### Context and output mode 43 | 44 | Default system context is 45 | 46 | > Imagine you are linux terminal command selector. I will describe task, and you will respond only using linux command, 47 | > without description, without explanation. 48 | 49 | Default postprocess mode is `confirm`. It shows answer and asking if it should be executed. 50 | 51 | But you can use it in other use-cases. To translate texts: 52 | 53 | ``` 54 | GPT_SYSTEM_PROMPT="I am translator from polish to english. I need to translate this text." GPT_POST=copy p Witaj świecie 55 | ``` 56 | 57 | You can redirect it to file set these environment variables as permanent. 58 | 59 | ``` 60 | export GPT_SYSTEM_PROMPT="I am translator from polish to english. I need to translate this text."; export GPT_POST=out; 61 | ``` 62 | 63 | and then translate using: 64 | 65 | ``` 66 | p "$(cat polish.txt)" > english.txt 67 | ``` 68 | 69 | To back do default 70 | 71 | ``` 72 | unset GPT_SYSTEM_PROMPT; unset GPT_POST 73 | ``` 74 | 75 | Possible values: 76 | 77 | - `GPT_SYSTEM_PROMPT` - any string that will explain gpt3 how to behave. 78 | - `GPT_POST` 79 | - confirm - default, will ask if execute output in terminal 80 | - copy - will copy your answer to terminal clipboard 81 | - out - will print answer on standard output - usefully for further processing 82 | 83 | ### Model Selection 84 | 85 | OpenAI offers many models https://platform.openai.com/docs/models/overview. Most popular are: 86 | 87 | | Name | Description | Max Tokens | Max Words | Price input / output - per 1k tokens | 88 | |-------------------|-------------------------------------------------------------------------------------------------------------------------------|------------|-----------|--------------------------------------| 89 | | gpt-3.5-turbo | Most capable GPT-3.5 model and optimized for chat at 1/10th the cost of text-davinci-003. | 4,097 | 3,072 | $0.0015 / $0.002 | 90 | | gpt-3.5-turbo-16k | Same capabilities as the standard gpt-3.5-turbo model but with 4 times the context. | 16,385 | 12,228 | $0.003 / $0.004 | 91 | | gpt-4 | More capable than any GPT-3.5 model, able to do more complex tasks, and optimized for chat. | 8,192 | 6,144 | $0.03 / $0.06 | 92 | | gpt-4-32k | Same capabilities as the standard gpt-4 mode but with 4x the context length. Will be updated with our latest model iteration. | 32,768 | 24,576 | $0.06 / $0.12 | 93 | 94 | Updated pricing: https://openai.com/pricing 95 | 96 | You can select your model adding env variable `GPT_MODEL`. For example to translate long text from file `pl.txt` 97 | to `en.txt` use command.: 98 | 99 | ``` 100 | GPT_SYSTEM_PROMPT="I am translator from polish to english. I need to translate this text." GPT_POST=out GPT_MODEL=gpt-3.5-turbo-16k p "$(cat pl.txt)" > en.txt 101 | ``` 102 | 103 | > Access to models 104 | 105 | On July 6, 2023, Open AI gave access to the GPT-4 API (8k) to all API users who have made a successful payment of $1 or 106 | more. We plan to open up access to all developers soon, and then start raising rate-limits after that depending on 107 | compute availability. 108 | 109 | They are not currently granting access to GPT-4-32K API, but it will be made available at a later date. 110 | 111 | https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4 112 | 113 | ## Installation 114 | 115 | There are few options 116 | 117 | ### Shell 118 | 119 | You need: `wget` and `sudo`. 120 | 121 | ``` 122 | wget -qO- https://raw.githubusercontent.com/gustawdaniel/gpt-cli/main/install.sh | bash 123 | ``` 124 | 125 | it will save `gpt-cli` and alias `p` in `/usr/local/bin` so this is why it require sudo. 126 | 127 | ### Cargo 128 | 129 | ``` 130 | cargo install gpt-cli 131 | ln -s ~/.cargo/bin/gpt-cli ~/.cargo/bin/p 132 | ``` 133 | 134 | ### Docker 135 | 136 | ``` 137 | alias p="docker run -v ~/.gpt-cache.json:/.gpt-cache.json -e OPENAPI_API_KEY=${OPENAPI_API_KEY} gustawdaniel/gpt-cli" 138 | ``` 139 | 140 | In Docker, you can't use flag `GPT_POST` and it is automatically set as `out`. It means that you can't confirm command 141 | by `ENTER` and commands will not be copied to your clipboard. 142 | 143 | ## Compilation from source 144 | 145 | ``` 146 | git clone https://github.com/gustawdaniel/gpt-cli && cd gpt-cli 147 | cargo build --release 148 | sudo cp ./target/release/gpt-cli /usr/local/bin/p 149 | ``` 150 | 151 | ## Config 152 | 153 | Copy your `OPENAPI_API_KEY` to env variable. Your `.profile`, `.bashrc`, or `.zshrc` file. 154 | 155 | ```bash 156 | export OPENAPI_API_KEY=sk-xxx 157 | ``` 158 | 159 | You'd need to enter your own OpenAI API key Here's how you can get one 160 | 161 | 1. Go to https://openai.com/api/login 162 | 2. Create an account or log into your existing account 163 | 3. Go to https://platform.openai.com/account/api-keys or 164 | 165 | ![](https://user-images.githubusercontent.com/36589645/202097820-dc6905e6-4514-413b-980f-169c35ffef9a.png) 166 | 167 | Price: `$0.002 per 1,000 tokens`. Single command is about 50 tokens. So in price 1USD you have about `10.000` commands. 168 | Tools with model before `gpt-3.5-turbo` costs 10 times more. 169 | 170 | ## Usage 171 | 172 | | what you typing in terminal | answers you can execute by "ENTER" | 173 | |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------| 174 | | show me graphic card | lspci -k | grep -A 2 -E "(VGA|3D)" | 175 | | jq command that join package name and version by dash | jq '.name + "-" + .version' | 176 | | three processes with highest ram usage | ps aux --sort=-%mem | head -n 4 | 177 | | make backup of mysql db called docs | mysqldump docs > docs_backup.sql | 178 | | setup jest configured for typescript | npm install --save-dev jest @types/jest ts-jest | 179 | | generate ed keys | openssl genpkey -algorithm ed25519 -out privatekey.key | 180 | | show me content of Cargo.toml encoded as base64 | base64 Cargo.toml | 181 | | show me content of Cargo.toml encoded as base64 in single line | cat Cargo.toml | base64 -w 0 | 182 | | show timer that will update every second | watch -n 1 date +%T | 183 | | range from 10 to 15 | seq 10 15 | 184 | | replace all lines starting from "CFG_" to starting from "CONFIG_" in file env.conf | sed -i 's/^CFG_/CONFIG_/g' env.conf | 185 | | write one liner to detect emails in file | grep -Eio '\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b' filename | 186 | | cron line to execute /bin/task every monday at 7pm | 0 19 * * 1 /bin/task | 187 | | run rusts tests one by one | cargo test -- --test-threads=1 | 188 | | who i am and am i still needed | whoami and yes, you are still needed. <-- hahah it is authentic gpt3 answer | 189 | 190 | ## Features 191 | 192 | - [x] Interactive commands 193 | - [x] Colors 194 | - [x] Real time stream 195 | - [x] Overriding system context (`GPT_SYSTEM_PROMPT` env) 196 | - [x] Confirm, Copy and Standard Output modes (`GPT_POST` env) 197 | - [ ] Easy to install (in progress) 198 | - [x] compilation from source 199 | - [x] install by bash like nvm 200 | - [x] docker 201 | - [ ] snap 202 | - [x] aur 203 | - [ ] apt 204 | - [ ] dnf 205 | 206 | ## Exceptions 207 | 208 | If commands contains `export` or `$` it can't be correctly passed from child process to parent. 209 | So there is fallback applied and these commands are copied if you wanted to execute them by confirmation. 210 | 211 | Examples: 212 | 213 | ``` 214 | p change terminal language to english 215 | Text 'export LANG=en_US.UTF-8' was copied to your clipboard 216 | 217 | p show my current shell 218 | Text 'echo $SHELL' was copied to your clipboard 219 | ``` 220 | 221 | ## Constrains 222 | 223 | Ofc GPT3 does not have sense of humor... so 224 | 225 | ```bash 226 | p say mooo as cow that have colors of rainbow 227 | ``` 228 | 229 | will not work. Correct answer is 230 | 231 | ```bash 232 | cowsay mooo | lolcat 233 | ``` 234 | 235 | and for 236 | 237 | ```bash 238 | p show my train in terminal 239 | ``` 240 | 241 | answer is 242 | 243 | ```bash 244 | Sorry, I do not understand. Can you please provide more details about what you want me to do? 245 | ``` 246 | 247 | instead 248 | 249 | ```bash 250 | sl 251 | ``` 252 | 253 | ## Star History 254 | 255 | [![Star History Chart](https://api.star-history.com/svg?repos=gustawdaniel/gpt-cli&type=Date)](https://star-history.com/#gustawdaniel/gpt-cli&Date) 256 | 257 | ## Alternatives 258 | 259 | Stars was updated 14-03-2023 260 | 261 | | This project | | 262 | |-----------------|---------------------------------------------------------------| 263 | | Language | rust | 264 | | Easy to install | no (wip) | 265 | | Streaming | yes | 266 | | Stars | 4 | 267 | | Release | 13-03-2023 | 268 | | Last update | 03-10-2023 | 269 | | Engine | can be selected by GPT_MODEL (default: gpt-3.5-turbo) | 270 | | Goal | save time for cli commands typing if you do not remember them | 271 | 272 | | gpt3-cli | https://github.com/CrazyPython/gpt3-cli | 273 | |-----------------|---------------------------------------------------------| 274 | | Language | python | 275 | | Easy to install | medium | 276 | | Streaming | yes | 277 | | Stars | 50 | 278 | | Release | 23-03-2021 | 279 | | Last update | 22-04-2021 | 280 | | Engine | all before gpt-3.5-turbo | 281 | | Goal | A lightweight command-line interface to OpenAI's GPT-3. | 282 | 283 | | ai-cli | https://github.com/abhagsain/ai-cli | 284 | |-----------------|-----------------------------------------------------------------| 285 | | Language | typescript | 286 | | Easy to install | yes | 287 | | Streaming | no | 288 | | Stars | 935 | 289 | | Release | 15-11-2022 | 290 | | Last update | 09-12-2022 | 291 | | Engine | all before gpt-3.5-turbo | 292 | | Goal | Get answers for CLI commands from GPT3 right from your terminal | 293 | 294 | | heygpt | https://github.com/fuyufjh/heygpt | 295 | |-----------------|-------------------------------------------------| 296 | | Language | rust | 297 | | Easy to install | yes | 298 | | Streaming | yes | 299 | | Stars | 40 | 300 | | Release | 06-03-2023 | 301 | | Last update | 12-03-2023 | 302 | | Engine | gpt-3.5-turbo | 303 | | Goal | A simple common-line interface for ChatGPT API. | 304 | 305 | | caos | https://github.com/dabumana/caos | 306 | |-----------------|---------------------------------------------------------------------| 307 | | Language | go | 308 | | Easy to install | no | 309 | | Streaming | no | 310 | | Stars | 5 | 311 | | Release | 22-01-2023 | 312 | | Last update | 13-03-2023 | 313 | | Engine | all before gpt-3.5-turbo | 314 | | Goal | advanced, configurable conversational assistant for openai services | 315 | 316 | | gptsh | https://github.com/shorwood/gptsh | 317 | |-----------------|-----------------------------------------------------------------------| 318 | | Language | javascript | 319 | | Easy to install | yes | 320 | | Streaming | no | 321 | | Stars | 99 | 322 | | Release | 27-12-2020 | 323 | | Last update | 18-01-2022 | 324 | | Engine | all before gpt-3.5-turbo | 325 | | Goal | translate natural language questions and requests into shell commands | 326 | 327 | | rusty | https://github.com/zahidkhawaja/rusty | 328 | |-----------------|---------------------------------------| 329 | | Language | rust | 330 | | Easy to install | no | 331 | | Streaming | no | 332 | | Stars | 272 | 333 | | Release | 05-09-2022 | 334 | | Last update | 07-02-2023 | 335 | | Engine | text-davinci-003 | 336 | | Goal | help you remember bash commands | 337 | 338 | | cgpt | https://github.com/MagicCube/cli-gpt | 339 | |-----------------|--------------------------------------------------------| 340 | | Language | typescript | 341 | | Easy to install | yes | 342 | | Streaming | no | 343 | | Stars | 18 | 344 | | Release | 07-03-2023 | 345 | | Last update | 15-03-2023 | 346 | | Engine | gpt-3.5-turbo | 347 | | Goal | Translate human language to command line using ChatGPT | 348 | 349 | | linux-command-gpt | https://github.com/asrul10/linux-command-gpt | 350 | |-------------------|-------------------------------------------------------------------| 351 | | Language | go | 352 | | Easy to install | no | 353 | | Streaming | yes | 354 | | Stars | 54 | 355 | | Release | 12-03-2023 | 356 | | Last update | 19-03-2023 | 357 | | Engine | gpt-3.5-turbo | 358 | | Goal | Get Linux commands in natural language with the power of ChatGPT. | 359 | 360 | ## GNU vs MUSL releases 361 | 362 | During compilation, you can use static linking (musl) or dynamic (gnu). To use `terminal-clipboard` there is required 363 | need dynamic linking, but it works only on typical linuxes that uses libc. To make docker image small (12 MB) there is 364 | provided `musl` version. 365 | 366 | So to be able to use all features (support for GPT_POST=copy), I recommend to use standard `gnu` but if you need docker 367 | or run it on alpine then use `musl`. 368 | 369 | ## Support 370 | 371 | I'm looking for challenging, remote job with rust + typescript + advanced math, so if you appreciate this project, you 372 | can share it, leave star, and recommend me earning employment commission. 373 | 374 | https://medium.com/@gustaw.daniel/enhance-your-terminal-experience-with-gpt-cli-a-linux-terminal-gpt-3-integration-1aa526a2ca89 375 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | branch: main 3 | 4 | coverage: 5 | status: 6 | project: 7 | default: 8 | target: auto 9 | threshold: 1% 10 | patch: 11 | default: 12 | target: auto 13 | threshold: 1% -------------------------------------------------------------------------------- /gpt-cli.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 38 | 40 | 43 | 47 | 51 | 52 | 55 | 59 | 60 | 69 | 70 | 74 | 81 | 88 | 89 | gptcli 105 | 106 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | FALLBACK_RELEASE_URL=https://api.github.com/repos/gustawdaniel/gpt-cli/releases/96442904 4 | 5 | # Define a function that prints a message 6 | function download_binary { 7 | BIN_SELECTOR=".assets[] | select(.name==\"gpt-cli.$([ "$PKG_MANAGER" = "apk" ] && echo "musl" || echo "gnu")\").browser_download_url" 8 | SUM_SELECTOR=".assets[] | select(.name==\"gpt-cli.$([ "$PKG_MANAGER" = "apk" ] && echo "musl" || echo "gnu").sha256.txt\").browser_download_url" 9 | 10 | URL="$(wget -qO- https://api.github.com/repos/gustawdaniel/gpt-cli/releases/latest | 11 | jq -r "${BIN_SELECTOR}")" 12 | 13 | URL_SUM="$(wget -qO- https://api.github.com/repos/gustawdaniel/gpt-cli/releases/latest | 14 | jq -r "${SUM_SELECTOR}")" 15 | 16 | if [ -z "$URL" ]; then 17 | echo "Fallback release" 18 | URL="$(wget -qO- ${FALLBACK_RELEASE_URL} | 19 | jq -r "${BIN_SELECTOR}")" 20 | 21 | URL_SUM="$(wget -qO- ${FALLBACK_RELEASE_URL} | 22 | jq -r "${SUM_SELECTOR}")" 23 | fi 24 | 25 | echo "$URL" 26 | wget "${URL}" -O /tmp/gpt-cli 27 | wget "${URL_SUM}" -O /tmp/gpt-cli.sha256.txt 28 | 29 | # Read the expected checksum from the file 30 | EXPECTED_CHECKSUM=$(cat /tmp/gpt-cli.sha256.txt) 31 | 32 | # Compute the actual checksum of the binary 33 | ACTUAL_CHECKSUM=$(shasum -a 256 /tmp/gpt-cli | cut -d " " -f 1) 34 | 35 | # Compare the checksums and display an error message if they differ 36 | if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then 37 | echo -e "\033[31mError: Checksums do not match.\033[0m" 38 | echo "Expected: $EXPECTED_CHECKSUM" 39 | echo "Actual: $ACTUAL_CHECKSUM" 40 | exit 1 41 | else 42 | echo -e "\033[32mChecksums match. The binary file is verified.\033[0m" 43 | fi 44 | } 45 | 46 | function compile_binary { 47 | rm -rf target 48 | cargo build --target x86_64-unknown-linux-gnu --release 49 | cp target/x86_64-unknown-linux-gnu/release/gpt-cli /tmp/gpt-cli 50 | } 51 | 52 | function set_pkg_manager { 53 | if [ -f /etc/os-release ]; then 54 | . /etc/os-release 55 | case $ID in 56 | debian | ubuntu | raspbian) 57 | PKG_MANAGER="apt" 58 | ;; 59 | fedora) 60 | PKG_MANAGER="dnf" 61 | ;; 62 | centos | rhel) 63 | PKG_MANAGER="yum" 64 | ;; 65 | opensuse | opensuse-leap | opensuse-tumbleweed | suse) 66 | PKG_MANAGER="zypper" 67 | ;; 68 | arch | artix | manjaro) 69 | PKG_MANAGER="pacman" 70 | ;; 71 | alpine) 72 | PKG_MANAGER="apk" 73 | ;; 74 | *) 75 | echo "Unknown distribution, cannot determine the package manager" 76 | exit 1 77 | ;; 78 | esac 79 | else 80 | echo "Cannot determine the distribution, please check /etc/os-release" 81 | exit 1 82 | fi 83 | } 84 | 85 | function install_os_dependencies { 86 | case $PKG_MANAGER in 87 | apt) 88 | echo "Installation ${PKG_MANAGER} dependencies" 89 | sudo apt install jq libdigest-sha-perl libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev -y 90 | ;; 91 | dnf) 92 | echo "Installation ${PKG_MANAGER} dependencies" 93 | sudo dnf install jq perl-Digest-SHA libxcb -y 94 | ;; 95 | yum) 96 | echo "Installation ${PKG_MANAGER} dependencies" 97 | sudo yum install jq perl-Digest-SHA libxcb -y 98 | ;; 99 | zypper) 100 | echo "Installation ${PKG_MANAGER} dependencies" 101 | sudo zypper --non-interactive install jq perl-App-cpanminus xorg-x11-util-devel libxcb-composite0 libxcb-render0 libxcb-shape0 libxcb-xfixes0 102 | ;; 103 | pacman) 104 | echo "Installation ${PKG_MANAGER} dependencies" 105 | sudo pacman -Syu --noconfirm jq libxcb perl 106 | PATH="${PATH:+${PATH}:}/usr/bin/core_perl" 107 | ;; 108 | apk) 109 | echo "Installation ${PKG_MANAGER} dependencies" 110 | sudo apk add jq libxcb perl-utils 111 | ;; 112 | esac 113 | } 114 | 115 | if [ "$1" = "--local" ]; then 116 | echo "Compilation started." 117 | compile_binary 118 | else 119 | set_pkg_manager 120 | install_os_dependencies 121 | echo "Downloading started" 122 | download_binary 123 | fi 124 | 125 | cd /tmp && { 126 | echo "Your password is required to save binary in /usr/local/bin" 127 | sudo rm -f /usr/local/bin/gpt-cli /usr/local/bin/p 128 | sudo mv gpt-cli /usr/local/bin/gpt-cli 129 | sudo chmod +x /usr/local/bin/gpt-cli 130 | sudo ln -s /usr/local/bin/gpt-cli /usr/local/bin/p 131 | sudo chmod +x /usr/local/bin/p 132 | cd - || exit 133 | } 134 | -------------------------------------------------------------------------------- /nfpm.yaml: -------------------------------------------------------------------------------- 1 | # check https://nfpm.goreleaser.com/configuration for detailed usage 2 | name: "gpt-cli" 3 | arch: "amd64" 4 | platform: "linux" 5 | version: "v0.0.20" 6 | section: "default" 7 | priority: "extra" 8 | maintainer: "Daniel Gustaw " 9 | description: | 10 | Run linux commands with natural language. Eg.: "show my graphic card" instead "lspci | grep VGA" 11 | vendor: "gustawdaniel" 12 | homepage: "https://github.com/gustawdaniel/gpt-cli" 13 | license: "MIT" 14 | depends: 15 | - libxcb 16 | contents: 17 | - src: ./target/release/gpt-cli 18 | dst: /usr/bin/gpt-cli 19 | - src: /usr/bin/gpt-cli 20 | dst: /sbin/p 21 | type: symlink 22 | overrides: 23 | deb: 24 | depends: 25 | - libxcb1-dev 26 | - libxcb-render0-dev 27 | - libxcb-shape0-dev 28 | - libxcb-xfixes0-dev 29 | - ca-certificates 30 | -------------------------------------------------------------------------------- /snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: gpt-cli 2 | version: git 3 | summary: Commands with natural language. Like "show graphic card" no "lspci | grep VGA" 4 | description: Linux terminal GPT3 integration with killer prompt that skip descriptions and human-readable comments. It shows you commands that can be executed by ENTER. 5 | 6 | base: core20 7 | confinement: classic 8 | grade: devel 9 | 10 | parts: 11 | gpt-cli: 12 | plugin: rust 13 | source: . 14 | build-packages: 15 | - libxcb1-dev 16 | - libxcb-render0-dev 17 | - libxcb-shape0-dev 18 | - libxcb-xfixes0-dev 19 | stage-packages: 20 | - libxau6 21 | - libxcb-render0 22 | - libxcb-shape0 23 | - libxcb-xfixes0 24 | - libxcb1 25 | - libxdmcp6 26 | 27 | apps: 28 | gpt-cli: 29 | command: bin/gpt-cli 30 | plugs: 31 | - network 32 | - network-bind 33 | - process-control 34 | -------------------------------------------------------------------------------- /src/cache.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | use std::fs::{read_to_string, write}; 3 | 4 | pub struct Cache { 5 | path: String, 6 | map: HashMap, 7 | } 8 | 9 | impl Cache { 10 | pub fn new(path: Option<&str>) -> Self { 11 | let default_path = format!("{}/.gpt-cache.json", dirs::home_dir().unwrap().display()); 12 | let path = path.map_or(default_path, |p| p.to_string()); 13 | Cache { 14 | path, 15 | map: HashMap::new(), 16 | } 17 | } 18 | 19 | fn is_empty(&self) -> bool { 20 | self.map.is_empty() 21 | } 22 | 23 | pub fn get(&mut self, key: &str) -> Option { 24 | if !std::path::Path::new(&self.path).exists() { 25 | return None; 26 | } 27 | if self.is_empty() { 28 | let contents = read_to_string(&self.path).unwrap(); 29 | self.map = serde_json::from_str(&contents).unwrap(); 30 | } 31 | self.map.get(key).cloned() 32 | } 33 | 34 | pub fn set(&mut self, key: &str, value: &str) { 35 | self.map.insert(key.to_string(), value.to_string()); 36 | let contents = serde_json::to_string(&self.map).unwrap(); 37 | write(&self.path, contents).unwrap(); 38 | } 39 | } 40 | 41 | #[cfg(test)] 42 | mod tests { 43 | mod rand_hash; 44 | 45 | use super::*; 46 | use crate::cache::tests::rand_hash::get_random_hash; 47 | use std::fs::remove_file; 48 | 49 | #[test] 50 | fn test_new_with_path() { 51 | let cache = Cache::new(Some("/tmp/test_cache.json")); 52 | assert_eq!(cache.path, "/tmp/test_cache.json"); 53 | } 54 | 55 | #[test] 56 | fn test_new_without_path() { 57 | let cache = Cache::new(None); 58 | let default_path = format!("{}/.gpt-cache.json", dirs::home_dir().unwrap().display()); 59 | assert_eq!(cache.path, default_path); 60 | } 61 | 62 | #[test] 63 | fn test_get_nonexistent_key() { 64 | let path = &format!("/tmp/.gpt-cache-{}.json", get_random_hash()); 65 | let mut cache = Cache::new(Some(path)); 66 | assert_eq!(cache.get("nonexistent"), None); 67 | } 68 | 69 | #[test] 70 | fn test_set_and_get() { 71 | let path = &format!("/tmp/.gpt-cache-{}.json", get_random_hash()); 72 | let mut cache = Cache::new(Some(path)); 73 | cache.set("key", "value"); 74 | assert_eq!(cache.get("key"), Some("value".to_string())); 75 | remove_file(path).expect("can't remove cache file"); 76 | } 77 | 78 | #[test] 79 | fn test_set_multiple_and_get() { 80 | let path = &format!("/tmp/.gpt-cache-{}.json", get_random_hash()); 81 | let mut cache = Cache::new(Some(path)); 82 | cache.set("key1", "value1"); 83 | cache.set("key2", "value2"); 84 | assert_eq!(cache.get("key1"), Some("value1".to_string())); 85 | assert_eq!(cache.get("key2"), Some("value2".to_string())); 86 | remove_file(path).expect("can't remove cache file"); 87 | } 88 | 89 | #[test] 90 | fn test_set_same_key() { 91 | let path = &format!("/tmp/.gpt-cache-{}.json", get_random_hash()); 92 | let mut cache = Cache::new(Some(path)); 93 | cache.set("key", "value1"); 94 | cache.set("key", "value2"); 95 | assert_eq!(cache.get("key"), Some("value2".to_string())); 96 | remove_file(path).expect("can't remove cache file"); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/cache/tests/rand_hash.rs: -------------------------------------------------------------------------------- 1 | use hex::encode; 2 | use rand::{rngs::OsRng, Rng}; 3 | 4 | pub fn get_random_hash() -> String { 5 | let mut rng = OsRng; 6 | let bytes: [u8; 12] = rng.gen(); 7 | encode(bytes) 8 | } 9 | 10 | #[test] 11 | fn test_random_hash_length() { 12 | let hash = get_random_hash(); 13 | assert_eq!(hash.len(), 24); 14 | } 15 | 16 | #[test] 17 | fn test_random_hash_hex() { 18 | let hash = get_random_hash(); 19 | let is_hex = hash.chars().all(|c| c.is_ascii_hexdigit()); 20 | assert!(is_hex, "Hash should only contain hexadecimal characters"); 21 | } 22 | -------------------------------------------------------------------------------- /src/decompose.rs: -------------------------------------------------------------------------------- 1 | pub fn decompose(command: &str) -> (String, Vec) { 2 | let mut command = String::from(command); 3 | if command.starts_with('`') && command.ends_with('`') { 4 | command.remove(0); 5 | command.pop(); 6 | } 7 | let mut parts = command.split_whitespace(); 8 | let command_name = parts.next().unwrap_or_default().to_string(); 9 | let command_args: Vec = command 10 | .split_whitespace() 11 | .skip(1) 12 | .map(|part| part.to_string()) 13 | .collect(); 14 | if command_args.contains(&"|".to_string()) || command_args.contains(&"&&".to_string()) { 15 | let remaining_parts: Vec = command 16 | .split_whitespace() 17 | .map(|part| part.to_string()) 18 | .collect(); 19 | return ( 20 | String::from("bash"), 21 | vec!["-c".to_string(), remaining_parts.join(" ")], 22 | ); 23 | } 24 | (command_name, command_args) 25 | } 26 | 27 | #[cfg(test)] 28 | mod tests { 29 | use super::*; 30 | 31 | #[test] 32 | fn test_decompose_ls() { 33 | assert_eq!(decompose("ls"), ("ls".to_string(), Vec::::new())); 34 | } 35 | 36 | #[test] 37 | fn test_decompose_ls_la() { 38 | assert_eq!( 39 | decompose("ls -la"), 40 | ("ls".to_string(), vec!["-la".to_string()]) 41 | ); 42 | } 43 | 44 | #[test] 45 | fn test_decompose_strip_code_marks() { 46 | assert_eq!( 47 | decompose("`ls -l`"), 48 | ("ls".to_string(), vec!["-l".to_string()]) 49 | ); 50 | } 51 | 52 | #[test] 53 | fn test_decompose_graphic_cards() { 54 | assert_eq!( 55 | decompose("lspci | grep VGA"), 56 | ( 57 | "bash".to_string(), 58 | vec!["-c".to_string(), "lspci | grep VGA".to_string()] 59 | ) 60 | ); 61 | } 62 | 63 | #[test] 64 | fn test_decompose_update_locale() { 65 | assert_eq!( 66 | decompose("locale-gen es_ES.UTF-8 && update-locale LANG=es_ES.UTF-8"), 67 | ( 68 | "bash".to_string(), 69 | vec![ 70 | "-c".to_string(), 71 | "locale-gen es_ES.UTF-8 && update-locale LANG=es_ES.UTF-8".to_string() 72 | ] 73 | ) 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/get_postprocess_action.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | 3 | #[derive(Debug, PartialEq)] 4 | pub enum PostprocessAction { 5 | // default 6 | Confirm, 7 | Copy, 8 | Out, 9 | } 10 | 11 | pub fn get_postprocess_action(answer_text: &str) -> PostprocessAction { 12 | let action_by_env = match env::var("GPT_POST") { 13 | Ok(val) => match val.as_str() { 14 | "confirm" => PostprocessAction::Confirm, 15 | "copy" => PostprocessAction::Copy, 16 | "out" => PostprocessAction::Out, 17 | _ => PostprocessAction::Confirm, 18 | }, 19 | Err(_) => PostprocessAction::Confirm, 20 | }; 21 | 22 | if (answer_text.contains('$') || answer_text.starts_with("export")) 23 | && action_by_env == PostprocessAction::Confirm 24 | { 25 | return PostprocessAction::Copy; 26 | } 27 | 28 | action_by_env 29 | } 30 | 31 | #[cfg(test)] 32 | mod tests { 33 | use super::*; 34 | use std::env; 35 | 36 | #[test] 37 | fn test_get_postprocess_action_confirm() { 38 | env::remove_var("GPT_POST"); 39 | let answer = "This is a normal answer.".to_string(); 40 | let action = get_postprocess_action(&answer); 41 | assert_eq!(action, PostprocessAction::Confirm); 42 | } 43 | 44 | #[test] 45 | fn test_get_postprocess_action_copy() { 46 | env::remove_var("GPT_POST"); 47 | let answer = "This is an answer containing $variable.".to_string(); 48 | let action = get_postprocess_action(&answer); 49 | assert_eq!(action, PostprocessAction::Copy); 50 | } 51 | 52 | #[test] 53 | fn test_get_postprocess_action_export() { 54 | env::remove_var("GPT_POST"); 55 | let answer = "export MY_VARIABLE=value".to_string(); 56 | let action = get_postprocess_action(&answer); 57 | assert_eq!(action, PostprocessAction::Copy); 58 | } 59 | 60 | #[test] 61 | fn test_get_postprocess_action_env_confirm() { 62 | env::set_var("GPT_POST", "confirm"); 63 | let answer = "This is a normal answer.".to_string(); 64 | let action = get_postprocess_action(&answer); 65 | assert_eq!(action, PostprocessAction::Confirm); 66 | } 67 | 68 | #[test] 69 | fn test_get_postprocess_action_env_copy() { 70 | env::set_var("GPT_POST", "copy"); 71 | let answer = "This is a normal answer.".to_string(); 72 | let action = get_postprocess_action(&answer); 73 | assert_eq!(action, PostprocessAction::Copy); 74 | } 75 | 76 | #[test] 77 | fn test_get_postprocess_action_env_out() { 78 | let answer = "This is a normal answer.".to_string(); 79 | env::set_var("GPT_POST", "out"); 80 | let action = get_postprocess_action(&answer); 81 | assert_eq!(action, PostprocessAction::Out); 82 | } 83 | 84 | #[test] 85 | fn test_get_postprocess_action_env_invalid() { 86 | env::set_var("GPT_POST", "invalid"); 87 | let answer = "This is a normal answer.".to_string(); 88 | let action = get_postprocess_action(&answer); 89 | assert_eq!(action, PostprocessAction::Confirm); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/gpt3.rs: -------------------------------------------------------------------------------- 1 | use crate::cache::Cache; 2 | use async_recursion::async_recursion; 3 | use serde::{Deserialize, Serialize}; 4 | use serde_json::json; 5 | use std::thread; 6 | use std::time::Duration; 7 | 8 | pub(crate) struct Gpt { 9 | debug: bool, 10 | api_key: String, 11 | openapi_host: String, 12 | } 13 | 14 | impl Gpt { 15 | const OPEN_AI_HOST: &'static str = "https://api.openai.com"; 16 | 17 | pub(crate) fn new(debug: Option, openapi_host: Option<&str>) -> Self { 18 | let api_key = std::env::var("OPENAI_API_KEY") 19 | .or_else(|_| std::env::var("GPT3_API_KEY")) 20 | .unwrap_or_else(|_| String::new()); 21 | 22 | let openapi_host = String::from(openapi_host.unwrap_or(Gpt::OPEN_AI_HOST)); 23 | 24 | Self { 25 | api_key, 26 | debug: debug.unwrap_or(false), 27 | openapi_host, 28 | } 29 | } 30 | 31 | pub fn is_open_ai(&self) -> bool { 32 | self.openapi_host == Gpt::OPEN_AI_HOST 33 | } 34 | 35 | pub(crate) fn get_system_prompt() -> String { 36 | match std::env::var("GPT_SYSTEM_PROMPT") { 37 | Ok(val) => val, 38 | Err(_) => String::from("Imagine you are linux terminal commands selector. I will describe task and you will respond only using linux command, without description, without explanation.") 39 | } 40 | } 41 | 42 | fn check_api_key(&self) -> Result<(), String> { 43 | if self.api_key.len().gt(&0) { 44 | Ok(()) 45 | } else { 46 | Err(String::from( 47 | "Error: OPENAPI_API_KEY environment variable is not defined.", 48 | )) 49 | } 50 | } 51 | 52 | #[async_recursion] 53 | pub(crate) async fn ask(&self, messages: Vec) -> Result { 54 | let base_url = format!("{}/v1/chat/completions", self.openapi_host); 55 | 56 | if self.debug { 57 | let response = Gpt3Response { 58 | id: "chatcmpl-6taJ9NwJAFdKNafz0Y49j5ga0jFiF".to_string(), 59 | object: "chat.completion".to_string(), 60 | created: 1678705627, 61 | model: "gpt-3.5-turbo-0301".to_string(), 62 | usage: Usage { 63 | prompt_tokens: 45, 64 | completion_tokens: 3, 65 | total_tokens: 48, 66 | }, 67 | choices: vec![Choice { 68 | message: Message { 69 | role: "assistant".to_string(), 70 | content: "npx ncu -i".to_string(), 71 | }, 72 | finish_reason: Some("stop".to_string()), 73 | index: 0, 74 | }], 75 | }; 76 | return Ok(response); 77 | } 78 | 79 | self.check_api_key()?; 80 | 81 | let mut cache = Cache::new(None); 82 | let key = serde_json::to_string(&messages).unwrap(); 83 | 84 | if self.is_open_ai() { 85 | if let Some(cached_data) = cache.get(&key) { 86 | let response: Gpt3Response = serde_json::from_str(&cached_data).unwrap(); 87 | return Ok(response); 88 | } 89 | } 90 | 91 | let model = std::env::var("GPT_MODEL").unwrap_or_else(|_| String::from("gpt-3.5-turbo")); 92 | 93 | let data = json!({ 94 | "model": model, 95 | "messages": messages 96 | }); 97 | 98 | let response = reqwest::Client::new() 99 | .post(base_url) 100 | .header("Content-Type", "application/json") 101 | .header("Authorization", format!("Bearer {}", self.api_key)) 102 | .json(&data) 103 | .send() 104 | .await 105 | .map_err(|e| format!("{e}"))?; 106 | 107 | let status = response.status(); 108 | 109 | if status.is_success() { 110 | // Parse the response body 111 | let json = response 112 | .json::() 113 | .await 114 | .map_err(|e| format!("{e}"))?; 115 | 116 | // Use the parsed data 117 | match json.choices[0].finish_reason.as_deref() { 118 | Some("stop") | Some("") | None => { 119 | let response_str = serde_json::to_string(&json).unwrap(); 120 | if self.is_open_ai() { 121 | cache.set(&key, &response_str); 122 | } 123 | } 124 | Some(_) => { 125 | println!("{:?}", json.choices[0]); 126 | } 127 | } 128 | 129 | Ok(json) 130 | } else if status == reqwest::StatusCode::TOO_MANY_REQUESTS { 131 | let error_body = response.text().await.map_err(|e| format!("{e}"))?; 132 | let error_json = serde_json::from_str::(&error_body) 133 | .map_err(|e| format!("{e}"))?; 134 | let seconds_to_wait = error_json["seconds_to_wait"].as_u64().unwrap_or_default(); 135 | thread::sleep(Duration::from_secs(seconds_to_wait)); 136 | 137 | self.ask(messages).await 138 | } else { 139 | let error_body = response.text().await.map_err(|e| format!("{e}"))?; 140 | Err(format!( 141 | "Request failed with status code: {}\nError response body: {}", 142 | status, error_body 143 | )) 144 | } 145 | } 146 | } 147 | 148 | #[derive(Serialize, Deserialize)] 149 | pub struct Gpt3Message { 150 | pub(crate) role: String, 151 | pub(crate) content: String, 152 | } 153 | 154 | #[derive(Debug, Serialize, Deserialize)] 155 | pub struct Gpt3Response { 156 | id: String, 157 | object: String, 158 | created: i64, 159 | model: String, 160 | usage: Usage, 161 | pub choices: Vec, 162 | } 163 | 164 | #[derive(Debug, Serialize, Deserialize)] 165 | struct Usage { 166 | prompt_tokens: i32, 167 | completion_tokens: i32, 168 | total_tokens: i32, 169 | } 170 | 171 | #[derive(Debug, Serialize, Deserialize)] 172 | pub struct Choice { 173 | pub message: Message, 174 | finish_reason: Option, 175 | index: i32, 176 | } 177 | 178 | #[derive(Debug, Serialize, Deserialize)] 179 | pub struct Message { 180 | role: String, 181 | pub content: String, 182 | } 183 | 184 | #[cfg(test)] 185 | mod tests { 186 | use super::*; 187 | 188 | #[test] 189 | fn test_get_system_prompt_with_env_var() { 190 | std::env::set_var("GPT_SYSTEM_PROMPT", "Custom prompt"); 191 | let prompt = Gpt::get_system_prompt(); 192 | assert_eq!(prompt, "Custom prompt"); 193 | } 194 | 195 | #[test] 196 | fn test_get_system_prompt_without_env_var() { 197 | std::env::remove_var("GPT_SYSTEM_PROMPT"); 198 | let prompt = Gpt::get_system_prompt(); 199 | assert_eq!( 200 | prompt, 201 | "Imagine you are linux terminal commands selector. I will describe task and you will respond only using linux command, without description, without explanation." 202 | ); 203 | } 204 | 205 | #[test] 206 | fn test_ask_with_env_var_and_debug_true() { 207 | std::env::set_var("OPENAPI_API_KEY", "test_key"); 208 | let gpt = Gpt::new(Some(true), None); 209 | let messages = vec![Gpt3Message { 210 | content: "hello".to_string(), 211 | role: "user".to_string(), 212 | }]; 213 | let result = futures::executor::block_on(gpt.ask(messages)); 214 | assert!(result.is_ok()); 215 | // Check that the response is correct 216 | let response = result.unwrap(); 217 | assert_eq!(response.model, "gpt-3.5-turbo-0301"); 218 | assert_eq!(response.choices.len(), 1); 219 | assert_eq!(response.choices[0].finish_reason, Some("stop".to_string())); 220 | } 221 | 222 | #[test] 223 | fn test_ask_without_env_var() { 224 | std::env::remove_var("OPENAPI_API_KEY"); 225 | let gpt = Gpt::new(Some(false), None); 226 | let messages = vec![Gpt3Message { 227 | content: "hello".to_string(), 228 | role: "user".to_string(), 229 | }]; 230 | let result = futures::executor::block_on(gpt.ask(messages)); 231 | assert!(result.is_err()); 232 | // Check that the error message is correct 233 | let error = result.unwrap_err(); 234 | assert!(error.contains("Error: OPENAPI_API_KEY environment variable is not defined.")); 235 | } 236 | 237 | #[tokio::test] 238 | async fn test_http_mock() { 239 | let server = httpmock::MockServer::start(); 240 | 241 | let mock = server.mock(|when, then| { 242 | when.path("/hi"); 243 | then.status(200); 244 | }); 245 | 246 | let response = reqwest::get(format!("{}/hi", server.url(""))) 247 | .await 248 | .unwrap(); 249 | 250 | assert_eq!(response.status(), 200); 251 | mock.assert(); 252 | } 253 | 254 | #[tokio::test] 255 | async fn test_ask_success() { 256 | let server = httpmock::MockServer::start(); 257 | 258 | let mock = server.mock(|when, then| { 259 | when.method(httpmock::Method::POST) 260 | .path("/v1/chat/completions"); 261 | then.status(200).json_body_obj(&json!({ 262 | "id": "testid", 263 | "object": "chat.completion", 264 | "created": 1678705627, 265 | "model": "gpt-3.5-turbo-0301", 266 | "usage": { "prompt_tokens": 45, "completion_tokens": 3, "total_tokens": 48 }, 267 | "choices": [ 268 | { 269 | "message": { "role": "assistant", "content": "npx ncu -i" }, 270 | "finish_reason": "stop", 271 | "index": 0 272 | } 273 | ] 274 | })); 275 | }); 276 | 277 | std::env::set_var("OPENAPI_API_KEY", "test_key"); 278 | let gpt = Gpt::new(Some(false), Some(&server.url(""))); 279 | let messages = vec![ 280 | Gpt3Message { 281 | role: "system".to_string(), 282 | content: Gpt::get_system_prompt(), 283 | }, 284 | Gpt3Message { 285 | role: "user".to_string(), 286 | content: "Update all npm packages to the latest version.".to_string(), 287 | }, 288 | ]; 289 | 290 | // Call 291 | let response = gpt.ask(messages).await.unwrap(); 292 | 293 | // Assert 294 | assert_eq!( 295 | response.choices[0].message.content, 296 | "npx ncu -i".to_string() 297 | ); 298 | mock.assert(); 299 | } 300 | 301 | #[tokio::test] 302 | async fn test_ask_fail() { 303 | let server = httpmock::MockServer::start(); 304 | 305 | let mock = server.mock(|when, then| { 306 | when.method(httpmock::Method::POST) 307 | .path("/v1/chat/completions"); 308 | then.status(500).json_body_obj(&json!({ 309 | "status": "error", 310 | "message": "unexpected error" 311 | })); 312 | }); 313 | 314 | std::env::set_var("OPENAPI_API_KEY", "test_key"); 315 | let gpt = Gpt::new(Some(false), Some(&server.url(""))); 316 | let messages = vec![ 317 | Gpt3Message { 318 | role: "system".to_string(), 319 | content: Gpt::get_system_prompt(), 320 | }, 321 | Gpt3Message { 322 | role: "user".to_string(), 323 | content: "Update all npm packages to the latest version.".to_string(), 324 | }, 325 | ]; 326 | 327 | // Call 328 | match gpt.ask(messages).await { 329 | Ok(_) => assert!(false, "Error was expected from mock."), 330 | Err(error_message) => { 331 | // Assert 332 | assert_eq!( 333 | error_message, 334 | "Request failed with status code: 500 Internal Server Error\nError response body: {\"message\":\"unexpected error\",\"status\":\"error\"}" 335 | ); 336 | mock.assert(); 337 | } 338 | } 339 | } 340 | } 341 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | extern crate core; 2 | 3 | mod cache; 4 | mod decompose; 5 | mod get_postprocess_action; 6 | mod gpt3; 7 | mod should_exit; 8 | 9 | use inquire::Confirm; 10 | 11 | use colored::*; 12 | use std::env; 13 | 14 | use crate::get_postprocess_action::{get_postprocess_action, PostprocessAction}; 15 | use crate::gpt3::Gpt3Message; 16 | use crate::should_exit::{should_exit, ShouldExit}; 17 | use std::process::{Command, Stdio}; 18 | use tokio::runtime::Runtime; 19 | 20 | fn postprocess(answer_text: &String) { 21 | let action = get_postprocess_action(answer_text); 22 | 23 | match action { 24 | PostprocessAction::Confirm => { 25 | let ans = Confirm::new(&format!("Execute.:\n\n{}\n\n", answer_text.green())) 26 | .with_default(true) 27 | .with_help_message("Pressing enter you confirm execution of this command") 28 | .prompt(); 29 | 30 | match ans { 31 | Ok(true) => { 32 | let (command_name, command_args) = decompose::decompose(answer_text); 33 | 34 | let mut child = Command::new(command_name) 35 | .args(command_args) 36 | .stdin(Stdio::inherit()) 37 | .stdout(Stdio::inherit()) 38 | .stderr(Stdio::inherit()) 39 | .spawn() 40 | .expect("Failed to execute command"); 41 | 42 | child.wait().expect("Failed to wait for command"); 43 | } 44 | Ok(false) => println!("That's too bad, I've heard great things about it."), 45 | Err(_) => println!("Error with questionnaire, try again later"), 46 | } 47 | } 48 | PostprocessAction::Copy => { 49 | #[cfg(not(target_env = "musl"))] 50 | { 51 | terminal_clipboard::set_string(answer_text).unwrap(); 52 | assert_eq!(*answer_text, terminal_clipboard::get_string().unwrap()); 53 | println!("Text '{answer_text}' was copied to your clipboard") 54 | } 55 | #[cfg(target_env = "musl")] 56 | { 57 | println!("{}", answer_text); 58 | } 59 | } 60 | PostprocessAction::Out => { 61 | println!("{}", answer_text); 62 | } 63 | } 64 | } 65 | 66 | fn exit_with_messages_if_required(should_exit: ShouldExit) { 67 | let ShouldExit { 68 | exit, 69 | messages, 70 | is_error, 71 | } = should_exit; 72 | 73 | if exit { 74 | for message in messages.iter() { 75 | if is_error { 76 | eprintln!("{}", message); 77 | } else { 78 | println!("{}", message) 79 | } 80 | } 81 | std::process::exit(if is_error { 1 } else { 0 }); 82 | } 83 | } 84 | 85 | async fn async_main() { 86 | let args: Vec = env::args().skip(1).collect(); 87 | exit_with_messages_if_required(should_exit(&args)); 88 | 89 | let content = args.join(" "); 90 | let rt = Runtime::new().unwrap(); 91 | 92 | rt.block_on(async { 93 | let client = gpt3::Gpt::new(Some(false), None); 94 | let response = client 95 | .ask(vec![ 96 | Gpt3Message { 97 | content: gpt3::Gpt::get_system_prompt(), 98 | role: String::from("system"), 99 | }, 100 | Gpt3Message { 101 | role: String::from("user"), 102 | content, 103 | }, 104 | ]) 105 | .await; 106 | 107 | match response { 108 | Err(error) => { 109 | let mut messages = vec![error.red()]; 110 | if error == *"Error: OPENAPI_API_KEY environment variable is not defined." { 111 | messages.push( 112 | "Please set the OPENAPI_API_KEY environment variable to your OpenAI API key." 113 | .normal(), 114 | ); 115 | } 116 | exit_with_messages_if_required(ShouldExit { 117 | is_error: true, 118 | exit: true, 119 | messages, 120 | }); 121 | } 122 | Ok(data) => { 123 | let choice = data.choices.first().expect("No choice in response"); 124 | let answer_text = &choice.message.content; 125 | 126 | postprocess(answer_text); 127 | } 128 | } 129 | }); 130 | } 131 | 132 | fn main() { 133 | futures::executor::block_on(async_main()); 134 | } 135 | -------------------------------------------------------------------------------- /src/should_exit.rs: -------------------------------------------------------------------------------- 1 | use colored::{ColoredString, Colorize}; 2 | 3 | const VERSION: &str = env!("CARGO_PKG_VERSION"); 4 | 5 | pub struct ShouldExit { 6 | pub exit: bool, 7 | pub is_error: bool, 8 | pub messages: Vec, 9 | } 10 | 11 | pub fn should_exit(args: &Vec) -> ShouldExit { 12 | if args.len().eq(&0) { 13 | return ShouldExit { 14 | exit: true, 15 | messages: vec![ 16 | "Please add description, which command you want to execute.".red(), 17 | "eg.: p show calendar".white(), 18 | ], 19 | is_error: true, 20 | }; 21 | } else if args.len().eq(&1) && args.first().unwrap().eq("--version") { 22 | return ShouldExit { 23 | exit: true, 24 | messages: vec![VERSION.into()], 25 | is_error: false, 26 | }; 27 | } 28 | ShouldExit { 29 | exit: false, 30 | messages: vec![], 31 | is_error: false, 32 | } 33 | } 34 | 35 | #[cfg(test)] 36 | mod tests { 37 | use super::*; 38 | use colored::Color; 39 | 40 | #[test] 41 | fn test_should_exit_empty_args() { 42 | let args: Vec = vec![]; 43 | let result = should_exit(&args); 44 | 45 | assert_eq!(result.exit, true); 46 | assert_eq!(result.is_error, true); 47 | assert_eq!(result.messages.len(), 2); 48 | assert_eq!( 49 | result.messages[0].clone().clear().to_string().as_str(), 50 | "Please add description, which command you want to execute." 51 | ); 52 | assert_eq!(result.messages[0].fgcolor(), Some(Color::Red)); 53 | assert_eq!( 54 | result.messages[1].clone().clear().to_string().as_str(), 55 | "eg.: p show calendar" 56 | ); 57 | assert_eq!(result.messages[1].fgcolor(), Some(Color::White)); 58 | } 59 | 60 | #[test] 61 | fn test_should_exit_version() { 62 | let args: Vec = vec![String::from("--version")]; 63 | let result = should_exit(&args); 64 | 65 | assert_eq!(result.exit, true); 66 | assert_eq!(result.is_error, false); 67 | assert_eq!(result.messages.len(), 1); 68 | assert_eq!(result.messages[0].to_string().as_str(), VERSION); 69 | } 70 | 71 | #[test] 72 | fn test_should_exit_no_exit() { 73 | let args: Vec = vec![String::from("show"), String::from("calendar")]; 74 | let result = should_exit(&args); 75 | 76 | assert_eq!(result.exit, false); 77 | assert_eq!(result.is_error, false); 78 | assert_eq!(result.messages.len(), 0); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /test_version.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | testEquality() { 4 | RES=$(grep -E "^version" Cargo.toml | cut -d "\"" -f 2) 5 | EXP=$(gpt-cli --version) 6 | assertEquals "${EXP}" "${RES}" 7 | } 8 | 9 | # Load shUnit2. 10 | . /usr/share/shunit2/shunit2 --------------------------------------------------------------------------------