EmailVerify LogoEmailVerify

Gemini CLI

Email checker with Google Gemini CLI. Verify emails in Gemini automation.

Gemini CLIはGoogleのターミナル向けAIアシスタントです。Gemini CLIワークフローでメール検証にEmailVerifyを使用する方法を学びます。

Gemini CLIとは?

Gemini CLIはGoogleのGemini AIモデルをターミナルに持ち込みます:

  • コード生成とデバッグ
  • シェルコマンドの実行
  • ファイル操作と分析
  • API連携

セットアップ

EmailVerify CLIのインストール

まず、EmailVerify CLIツールをインストール:

npm install -g @emailverify/cli
bv config set api-key YOUR_API_KEY

環境変数

または環境変数を設定:

export EMAILVERIFY_API_KEY=your-api-key

Gemini CLIでの使用

単一メールの検証

あなた: bvコマンドでjohn@google.comを検証して

Gemini:

I'll run the EmailVerify CLI to check that email.

$ bv verify john@google.com --json

{
  "email": "john@google.com",
  "status": "valid",
  "result": {
    "deliverable": true,
    "disposable": false,
    "role": false
  },
  "score": 0.95
}

The email john@google.com is valid with a 95% confidence score.
It's deliverable and not a disposable or role-based address.

バッチ検証

あなた: newsletter-subscribers.txtファイルのすべてのメールを検証して

Gemini:

I'll verify each email in your subscriber list.

$ cat newsletter-subscribers.txt | head -5
alice@gmail.com
bob@company.org
test@mailinator.com
jane@outlook.com
invalid@asdfgh.xyz

$ bv verify --file newsletter-subscribers.txt --json > results.json

Processing 500 emails...

Summary:
- Valid: 423 (84.6%)
- Invalid: 52 (10.4%)
- Unknown: 25 (5.0%)

Would you like me to:
1. Create a cleaned list with only valid emails?
2. Generate a report of invalid addresses?
3. Show the emails that need manual review?

Geminiでのスクリプト作成

あなた: 標準入力からメールを検証して有効なものだけを出力するbashスクリプトを書いて

Gemini:

#!/bin/bash
# verify-emails.sh - Filter valid emails from stdin

while IFS= read -r email; do
    # Skip empty lines
    [ -z "$email" ] && continue

    # Verify the email
    result=$(bv verify "$email" --quiet 2>/dev/null)
    exit_code=$?

    # Output only valid emails (exit code 0)
    if [ $exit_code -eq 0 ]; then
        echo "$email"
    fi
done

# Usage:
# cat emails.txt | ./verify-emails.sh > valid-emails.txt

Let me save this script for you.


### Google Workspaceとの統合

**あなた:** Googleコンタクトに追加しようとしているメールアドレスを検証して

**Gemini:**

I'll verify the emails before you import them.

Please provide the emails (paste them or give me a file path).

[User pastes emails]

Verifying 10 email addresses...

Results:

EmailStatusSafe to Add?
john.doe@gmail.comValidYes
sales@tempmail.ioInvalidNo (disposable)
info@company.comValidRole-based
test@invalid.xyzInvalidNo (domain error)
...

Recommendations:

  • 7 emails are safe to add
  • Remove 2 invalid emails
  • Consider if you want role-based addresses (info@, support@)

## シェル関数

シェル設定にこれらを追加:

```bash
# Quick verify with Gemini
gverify() {
    gemini "Use bv to verify this email and explain the result: $1"
}

# Batch verify with summary
gverify-batch() {
    gemini "Verify all emails in $1 using the bv CLI and provide a summary report"
}

# Check email before sending
email-check() {
    local result=$(bv verify "$1" --quiet 2>/dev/null)
    if [ $? -eq 0 ]; then
        echo "OK $1 is valid"
    else
        echo "NG $1 may have issues - running detailed check..."
        gemini "Verify $1 with bv and explain why it might be problematic"
    fi
}

自動化の例

送信前検証

# Before sending a campaign, verify the list
gemini "Read marketing-list.csv, verify all emails in the 'email' column using bv,
and create a new file with only the valid ones"

データクリーンアップ

# Clean up a database export
gemini "Process exported-users.json, verify each email field,
and generate a report of users with invalid emails"

CI統合

# .github/workflows/verify-emails.yml
- name: Verify test emails
  run: |
    npm install -g @emailverify/cli
    gemini "Find all email addresses in test/fixtures/ and verify them with bv.
    Fail if any real emails are found in test data."

ベストプラクティス

1. 構造化された出力

Geminiに構造化された結果を求める:

"Verify these emails and output as CSV: email,status,score"

2. 説明

結果のコンテキストを取得:

"Why might test@mailinator.com be flagged as invalid?"

3. バッチ処理

大きなリストにはファイル入力を使用:

"Verify the emails in large-list.csv in batches of 100"

次のステップ

On this page