mcpField
N
notte-browser

notte-browser

github.com/nottelabsエージェントワークフロー24181 回インストール今日更新
リポジトリ

notte-browser について

notte.ccを使ったブラウザー自動化、スクレイピング、AIによるウェブ操作のためのコマンドラインスキルです。ブラウザーセッション、再利用可能なワークフロー、ペルソナ、認証情報の保管庫も管理できます。

主な機能

  1. 01ブラウザーセッションの開始と管理
  2. 02ページの移動、クリック、入力、スクレイピング
  3. 03スクリーンショット、ネットワークログ、リプレイの確認
  4. 04ブラウザーAIエージェントの作成と管理
  5. 05再利用可能なワークフローと認証情報の管理

活用シーン

  1. 01ウェブフォームの自動入力と送信
  2. 02ページ内容のスクレイピングとデータ収集
  3. 03認証情報の保管庫を使った認証済み操作
  4. 04定期的なデータ収集ワークフローの作成と管理

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/nottelabs/notte-cli --skill notte-browser

インストール後、Claude Code で/notte-browserを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

references/
account-management.md
function-management.md
session-management.md
templates/
authenticated-session.sh
data-extraction.sh
form-automation.sh

詳細

Notte Browser CLI スキル

notte.cc プラットフォームを使用したブラウザーの自動化、ウェブスクレイピング、AI を活用したウェブ操作のためのコマンドラインインターフェースです。

クイックスタート

# 1. Authenticate
notte auth login

# 2. Start a browser session
notte sessions start

# 3. Goto and observe
notte page goto "https://example.com"
notte page observe
notte page screenshot

# 4. Execute actions (use @IDs from observe, or Playwright selectors)
notte page click "@B3"
notte page fill "@I1" "hello world"
# If @IDs don't work, use Playwright selectors:
# notte page click "button:has-text('Submit')"

# 5. Scrape content
notte page scrape --instructions "Extract all product names and prices"

# 6. Stop the session
notte sessions stop

コマンドのカテゴリ

セッション管理

ブラウザーセッションのライフサイクルを管理します。

# Start a new session
notte sessions start [flags]
  --headless                 Run in headless mode (default: true)
  --idle-timeout-minutes     Idle timeout in minutes
  --max-duration-minutes     Maximum session lifetime in minutes
  --proxy                    Use default proxies
  --proxy-country <code>     Proxy country code (e.g. us, gb, fr)
  --solve-captchas           Automatically solve captchas
  --viewport-width           Viewport width in pixels
  --viewport-height          Viewport height in pixels
  --user-agent               Custom user agent string
  --cdp-url                  CDP URL of remote session provider
  --use-file-storage         Enable file storage for the session

# Get current session status
notte sessions status

# Stop current session
notte sessions stop

# List sessions (with optional pagination and filters)
notte sessions list [--page N] [--page-size N] [--only-active]

注: セッションを開始すると、自動的に「現在の」セッションになります(つまり、NOTTE_SESSION_ID 環境変数が設定されます)。以降のすべてのコマンドでは、このセッションがデフォルトで使用されます。複数のセッションを同時に管理する場合や、特定のセッションを指定する場合に限り、--session-id <session-id> を使用してください。

セッションのデバッグとエクスポート:

# Get network logs
notte sessions network

# Get replay URL/data
notte sessions replay

# Export session steps as Python workflow code
notte sessions workflow-code

Cookie の管理:

# Get all cookies
notte sessions cookies

# Set cookies from JSON file
notte sessions cookies-set --file cookies.json
ページ操作

ページ操作を簡単に行うためのコマンド:

要素の操作:

# Click an element (use either the ids from an observe, or a selector)
notte page click "@B3"
notte page click "#submit-button"
  --timeout     Timeout in milliseconds
  --enter       Press Enter after clicking

# Fill an input field
notte page fill "@I1" "hello world"
  --clear       Clear field before filling
  --enter       Press Enter after filling

# Check/uncheck a checkbox
notte page check "#my-checkbox"
  --value       true to check, false to uncheck (default: true)

# Select dropdown option
notte page select "#dropdown-element" "Option 1"

# Download file by clicking element
notte page download "@L5"

# Upload file to input
notte page upload "#file-input" --file /path/to/file

# Run JavaScript in the Page
- Escape single quotes if needed.
- Don’t use logging (output won’t be captured).
- Use a single statement or a function that returns a value.

# Single expression
notte page eval-js 'document.title'

# Function with return value
notte page eval-js '
() => {
  const els = document.querySelectorAll("a");
  return els.length;
}
'

ナビゲーション:

notte page goto "https://example.com"
notte page new-tab "https://example.com"
notte page back
notte page forward
notte page reload

スクロール:

notte page scroll-down [amount]
notte page scroll-up [amount]

キーボード:

notte page press "Enter"
notte page press "Escape"
notte page press "Tab"

タブの管理:

notte page switch-tab 1
notte page close-tab

ページの状態:

# Observe page state and available actions
notte page observe

# Save a screenshot in tmp folder
notte page screenshot

# Scrape content with instructions
notte page scrape --instructions "Extract all links" [--only-main-content]

ユーティリティ:

# Wait for specified duration
notte page wait 1000

# Solve CAPTCHA
notte page captcha-solve "recaptcha"

# Mark task complete
notte page complete "Task finished successfully" [--success=true]

# Fill form with JSON data
notte page form-fill --data '{"email": "[email protected]", "name": "John"}'
AI エージェント

AI を活用したブラウザーエージェントを開始、管理します。

# List all agents (with optional pagination and filters)
notte agents list [--page N] [--page-size N] [--only-active] [--only-saved]

# Start a new agent (auto-uses current session if active)
notte agents start --task "Navigate to example.com and extract the main heading"
  --session-id             Session ID (uses current session if not specified)
  --vault-id               Vault ID for credential access
  --persona-id             Persona ID for identity
  --max-steps              Maximum steps for the agent (default: 30)
  --reasoning-model        Custom reasoning model

# Get current agent status
notte agents status

# Stop current agent
notte agents stop

# Export agent steps as workflow code
notte agents workflow-code

# Get agent execution replay
notte agents replay

注: エージェントを開始すると、自動的に「現在の」エージェントになります(~/.notte/cli/current_agent に保存されます)。以降のすべてのコマンドでは、このエージェントがデフォルトで使用されます。複数のエージェントを同時に管理する場合や、特定のエージェントを指定する場合に限り、--agent-id <agent-id> を使用してください。

エージェント ID の解決順序:

  1. --agent-id フラグ(最優先)
  2. NOTTE_AGENT_ID 環境変数
  3. ~/.notte/cli/current_agent ファイル(最も優先度が低い)
関数(ワークフローの自動化)

再利用可能なワークフローを作成、管理、スケジュール設定します。

# List all functions (with optional pagination and filters)
notte functions list [--page N] [--page-size N] [--only-active]

# Create a function from a workflow file
notte functions create --file workflow.py [--name "My Function"] [--description "..."] [--shared]

# Show current function details
notte functions show

# Update current function code
notte functions update --file workflow.py

# Delete current function
notte functions delete

# Run current function
notte functions run

# List runs for current function (with optional pagination and filters)
notte functions runs [--page N] [--page-size N] [--only-active]

# Stop a running function execution
notte functions run-stop --run-id <run-id>

# Get run logs and results
notte functions run-metadata --run-id <run-id>

# Schedule current function with cron expression
notte functions schedule --cron "0 9 * * *"

# Remove schedule from current function
notte functions unschedule

# Fork a shared function to your account
notte functions fork --function-id <shared-function-id>

注: 関数を作成すると、自動的に「現在の」関数になります。以降のすべてのコマンドでは、この関数がデフォルトで使用されます。複数の関数を同時に管理する場合や、特定の関数を指定する場合(共有関数をフォークする場合など)に限り、--function-id <function-id> を使用してください。

アカウント管理

ペルソナ - メールアドレス付きの自動生成 ID:

# List personas (with optional pagination and filters)
notte personas list [--page N] [--page-size N] [--only-active]

# Create a persona
notte personas create [--create-vault]

# Show persona details
notte personas show --persona-id <persona-id>

# Delete a persona
notte personas delete --persona-id <persona-id>

# List emails received by persona
notte personas emails --persona-id <persona-id>

# List SMS messages received
notte personas sms --persona-id <persona-id>

Vault - 独自の認証情報を保存します。

# List vaults (with optional pagination and filters)
notte vaults list [--page N] [--page-size N] [--only-active]

# Create a vault
notte vaults create [--name "My Vault"]

# Update vault name
notte vaults update --vault-id <vault-id> --name "New Name"

# Delete a vault
notte vaults delete --vault-id <vault-id>

# Manage credentials
notte vaults credentials list --vault-id <vault-id>
notte vaults credentials add --vault-id <vault-id> --url "https://site.com" --password "pass" [--email "..."] [--username "..."] [--mfa-secret "..."]
notte vaults credentials get --vault-id <vault-id> --url "https://site.com"
notte vaults credentials delete --vault-id <vault-id> --url "https://site.com"

グローバルオプション

すべてのコマンドで使用できます。

--output, -o    Output format: text, json (default: text)
--timeout       API request timeout in seconds (default: 30)
--no-color      Disable color output
--verbose, -v   Verbose output
--yes, -y       Skip confirmation prompts

環境変数

変数説明
NOTTE_API_KEY認証用 API キー
NOTTE_SESSION_IDデフォルトのセッション ID(--session-id フラグを省略できます)
NOTTE_API_URLカスタム API エンドポイント URL

セッション ID の解決順序

セッション ID は次の順序で解決されます。

  1. --session-id フラグ
  2. NOTTE_SESSION_ID 環境変数
  3. 現在のセッションファイル(sessions start によって自動設定されます)

使用例

基本的なウェブスクレイピング
# Scrape with session
notte sessions start --headless
notte page goto "https://news.ycombinator.com"
notte page scrape --instructions "Extract top 10 story titles"
notte sessions stop

# Multi-page scraping
notte sessions start --headless
notte page goto "https://example.com/products"
notte page observe
notte page scrape --instructions "Extract product names and prices"
notte page click "@L3"
notte page scrape --instructions "Extract product names and prices"
notte sessions stop
フォームの自動化
notte sessions start
notte page goto "https://example.com/signup"
notte page fill "#email-field" "[email protected]"
notte page fill "#password-field" "securepassword"
notte page click "#submit-button"
notte sessions stop
Vault を使用した認証済みセッション
# Setup credentials once
notte vaults create --name "MyService"
notte vaults credentials add --vault-id <vault-id> \
  --url "https://myservice.com" \
  --email "[email protected]" \
  --password "mypassword" \
  --mfa-secret "JBSWY3DPEHPK3PXP"

# Use in automation (vault credentials auto-fill on matching URLs)
notte sessions start
notte page goto "https://myservice.com/login"
# Credentials from vault are used automatically
notte sessions stop
スケジュールに基づくデータ収集
# Create workflow file
cat > collect_data.py << 'EOF'
# Notte workflow script
# ...
EOF

# Upload as function
notte functions create --file collect_data.py --name "Daily Data Collection"

# Schedule to run every day at 9 AM
notte functions schedule --function-id <function-id> --cron "0 9 * * *"

# Check run history
notte functions runs --function-id <function-id>

ヒントとトラブルシューティング

observe の出力が不安定な場合

observe コマンドは、特に動的コンテンツ、モーダル、シングルページアプリケーションで、古い DOM 状態や不完全な DOM 状態を返すことがあります。出力が正しくないように見える場合:

  1. スクリーンショットで確認する:notte page screenshot は常に現在の視覚的な状態を表示します
  2. Playwright セレクターを使用する:@ID 参照の代わりに、#id、.class、button:has-text('Submit') などの標準的なセレクターを使用します
  3. 少し待機する:観察する前に notte page wait 500 を実行すると、動的コンテンツへの対応に役立つ場合があります
セレクターの構文

observe から取得した要素 ID と Playwright セレクターの両方を使用できます。

# Using element IDs from observe output
notte page click "@B3"
notte page fill "@I1" "text"

# Using Playwright selectors (recommended when @IDs don't work)
notte page click "#submit-button"
notte page click ".btn-primary"
notte page click "button:has-text('Submit')"
notte page click "[data-testid='login']"
notte page fill "input[name='email']" "[email protected]"

複数の一致への対応 - 最初に一致した要素を選択するには、>> nth=0 を使用します。

# When multiple elements match, select by index
notte page click "button:has-text('OK') >> nth=0"
notte page click ".submit-btn >> nth=0"
モーダルとダイアログの操作

モーダルやポップアップはページ操作の妨げになる場合があります。ヒント:

  • Escape キーでモーダルを閉じる:notte page press "Escape" を実行すると、ほとんどのダイアログやモーダルを確実に閉じられます
  • モーダル操作後に待機する:モーダルを閉じた後、次の操作の前に notte page wait 500 を追加します
  • オーバーレイを確認する:クリックが機能しない場合、モーダルやオーバーレイが妨げになっている可能性があります。スクリーンショットで確認してください
# Common pattern for handling unexpected modals
notte page press "Escape"
notte page wait 500
notte page click "#target-element"
ヘッドレスセッションの表示

--headless(デフォルト)で実行していても、ブラウザーを確認できます。

  • ViewerUrl:セッションを開始すると、出力に ViewerUrl が含まれます。ブラウザーで開くと、セッションをリアルタイムで確認できます。
  • ビューアーコマンド:notte sessions viewer を実行すると、ビューアーが直接開きます。
  • 非ヘッドレスモード:ローカルのブラウザーウィンドウが必要な場合に限り、--headless=false を使用してください(リモート環境や CI 環境では利用できません)。
# Start headless session and get viewer URL
notte sessions start -o json | jq -r '.viewer_url'

# Or open viewer for current session
notte sessions viewer
ボット検出/ステルス

ブロックされたり、CAPTCHA が表示されたりする場合は、レジデンシャルプロキシを有効にしてみてください。

notte sessions stop
notte sessions start --proxy

注:異なるパラメーターで新しいセッションを開始する前に、必ず現在のセッションを停止してください。セッションの設定は、セッションの途中では変更できません。

その他のリソース

テンプレート

すぐに使えるシェルスクリプトのテンプレート:

コメント