--- title: "Autify コマンドラインインターフェース (CLI) ガイド | Autify Guide" slug: "autify-command-line-interface" description: "Autifyのコマンドラインインターフェース (CLI) を使って効率的にテストを実行する方法を学びましょう。シームレスな自動化テストを開始しましょう!" updated: 2025-01-30T23:48:21Z published: 2025-01-30T23:48:21Z canonical: "help.autify.com/autify-command-line-interface" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Autify Command Line Interface (CLI) Autify Command Line Interface (CLI) はテキストベースのコマンドラインによってAutify のサービス達とやりとりするためのソフトウェアです。このAutify CLI によって、ブラウザを立ち上げることなくAutify を操作できるので、CI/CD 連携といった自動連携を簡単に行うことができます。 このドキュメントでは、Autify CLI の基礎からコマンドの一覧について解説しています。 ![Autify_CLI_ogp 2.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/Autify_CLI_ogp%20%282%29.png?sv=2026-02-06&spr=https&st=2026-11-04T03%3A25%3A34Z&se=2026-11-04T04%3A25%3A34Z&sr=c&sp=r&sig=dU9l0EFzWCkrnNIuZuaVQjA088CW%2FooUXi%2Bamj8S7cI%3D) ## はじめてみよう ### 要約 Autify CLI はAutify のシステムに対してブラウザUI 以外のもう一つのインターフェースを提供します。テキストベースのコマンドラインインターフェースによって、Autify との自動連携を容易に行うことができます。 Autify CLI を利用するためには、まずお使いのプラットフォームにAutify CLI をインストールする必要があります。次に、Autify のパーソナルアクセストークンを使ってCLI をログインさせると、Autify CLI が提供する"テストシナリオを実行して終了するまで待つ" といった便利なコマンドを使うことができるようになります。次のいくつかのセクションでこのプロセスを実際に試してみましょう。 ### インストール Autify CLI はHomebrew (Linux/macOS)、shell installer (Linux/macOS)、またはnative installer (macOS/Windows) を使ってインストール可能です。また、tarball を直接インストールすることも可能です。 #### Homebrew Linux と macOS では、[Homebrew](https://brew.sh/) とAutify の[tap](https://github.com/autifyhq/homebrew-tap) を使うことで、`autify-cli` をインストールできます: ``` brew install autifyhq/tap/autify-cli ``` または ``` brew tap autifyhq/tap brew install autify-cli ``` 出力例: ``` $ brew install autifyhq/tap/autify-cli ==> Tapping autifyhq/tap Cloning into '/usr/local/Homebrew/Library/Taps/autifyhq/homebrew-tap'... remote: Enumerating objects: 19, done. remote: Counting objects: 100% (19/19), done. remote: Compressing objects: 100% (15/15), done. remote: Total 19 (delta 1), reused 19 (delta 1), pack-reused 0 Receiving objects: 100% (19/19), done. Resolving deltas: 100% (1/1), done. Tapped 1 formula (16 files, 12.9KB). ==> Cloning https://github.com/autifyhq/autify-cli Cloning into '/Users/runner/Library/Caches/Homebrew/autify-cli--git'... ==> Checking out revision b03bec6 HEAD is now at b03bec6 Release 0.2.0 ==> Installing autify-cli from autifyhq/tap ==> curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/versions/0.2.0/b03bec6/autify-v0.2.0-b03bec6-darwin-arm64.tar.gz | tar xz 🍺 /usr/local/Cellar/autify-cli/0.2.0: 10,082 files, 98.7MB, built in 29 seconds ``` #### Shell installer Linux と macOS では、shell installer を以下のコマンドで利用できます: ``` curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/install-standalone.sh | sh ``` 出力例: ``` $ curl https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/install-standalone.sh | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2049 100 2049 0 0 10784 0 --:--:-- --:--:-- --:--:-- 10784 This script requires superuser access. You will be prompted for your password by sudo. Installing CLI from https://autify-cli-assets.s3.amazonaws.com/autify-cli/channels/stable/autify-linux-x64.tar.xz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 21.9M 100 21.9M 0 0 2157k 0 0:00:10 0:00:10 --:--:-- 2588k v16.15.0 autify installed to /usr/local/bin/autify autify-cli/0.1.0 linux-x64 node-v16.15.0 ``` #### Native installer macOS と Windows では、native installer を提供しています。 注: これらは現時点では正しく署名されていません。そのため、インストール時にいくつかの警告が出ます。適切に署名したものを近いうちに出す予定です。 | OS | Architecture | Package type | Download Link | Note | | --- | --- | --- | --- | --- | | macOS | Intel 64bit | Installer | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-x64.pkg) | Not properly signed yet. | | macOS | Arm 64bit | Installer | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-arm64.pkg) | Not properly signed yet. | | Windows | Intel 64bit | Installer | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-x64.exe) | Not properly signed yet. | | Windows | Intel 32bit | Installer | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-x86.exe) | Not properly signed yet. | #### Tarball 以下のtarball を提供しています: | OS | Architecture | Package type | Download Link | Note | | --- | --- | --- | --- | --- | | Linux | Intel 64bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-x64.tar.gz) | | | Linux | Intel 64bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-x64.tar.xz) | | | Linux | Arm 32bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-arm.tar.gz) | | | Linux | Arm 32bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-arm.tar.xz) | | | Linux | Arm 64bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-arm64.tar.gz) | | | Linux | Arm 64bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-arm64.tar.xz) | | | macOS | Intel 64bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-darwin-x64.tar.gz) | | | macOS | Intel 64bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-darwin-x64.tar.xz) | | | macOS | Arm 64bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-darwin-arm64.tar.gz) | | | macOS | Arm 64bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-darwin-arm64.tar.xz) | | | Windows | Intel 64bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-win32-x64.tar.gz) | | | Windows | Intel 64bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-win32-x64.tar.xz) | | | Windows | Intel 32bit | tar.gz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-win32-x86.tar.gz) | | | Windows | Intel 32bit | tar.xz | [`stable`](https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-win32-x86.tar.xz) | | こちらが、Linux (Intel 64bit) で`tag.gz` ファイルをダウンロードして展開するコマンドの例です: ``` $ curl -O https://autify-cli-assets.s3.us-west-2.amazonaws.com/autify-cli/channels/stable/autify-linux-x64.tar.gz $ tar -xzf ./autify-linux-x64.tar.gz $ ./autify/bin/autify --version autify-cli/0.1.0 linux-x64 node-v16.15.0 ``` 以下の様にして、`/path/to/autify/bin/autify` を `PATH` 環境変数内のどこかにリンクすることをお勧めします: ``` $ sudo ln -s /path/to/autify/bin/autify /usr/local/bin/autify ``` 注: `/path/to/autify/bin` は `node` 実行ファイルを含んでいます。従って、 `/path/to/autify/bin` を `PATH` 環境変数に追加すると、既存の`node` 実行ファイルよりも優先されてしまう可能性があります。 そのため、`/path/to/autify/bin/autify` だけをリンクすることをお勧めしていますし、shell installer はまさにそれを実行しています。 ### 利用方法 まず、パーソナルアクセストークンを生成する必要があります。 [Autify NoCode Web](https://help.autify.com/docs/ja/integrate-with-api#%E3%83%91%E3%83%BC%E3%82%BD%E3%83%8A%E3%83%AB%E3%82%A2%E3%82%AF%E3%82%BB%E3%82%B9%E3%83%88%E3%83%BC%E3%82%AF%E3%83%B3%E3%81%AE%E7%99%BA%E8%A1%8C) または[Autify NoCode Mobile](https://help.autify.com/mobile/docs/ja/api-integration#api-%E8%AA%8D%E8%A8%BC%E3%83%88%E3%83%BC%E3%82%AF%E3%83%B3%E7%94%9F%E6%88%90%E6%96%B9%E6%B3%95) のドキュメントをご覧ください。 そうしたら、Autify CLI でログインできます。以下のコマンドを実行し、パーソナルアクセストークンを入力してください: ``` ## Autify NoCode Web $ autify web auth login ? Enter Access Token ********** ## Autify NoCode Mobile $ autify mobile auth login ? Enter Access Token ********** ``` #### Autify NoCode Web では、すでにお持ちのテストシナリオを実行してみましょう。今から実行したいテストシナリオのURLをコピーしてください。(この様な形式のはずです: `https://app.autify.com/projects/000/scenarios/00000`) その後に以下を実行してください: ``` autify web test run --wait <コピーしたテストシナリオURL> ``` 出力例: ``` $ autify web test run --wait https://app.autify.com/projects/000/scenarios/00000 ✅ Successfully started: https://app.autify.com/projects/000/results/000000 (Capability is Linux Chrome 101.0) 🕐 Waiting for the test result: https://app.autify.com/projects/000/results/000000 ✔ Waiting... (timeout: 300 s) ✅ Test passed!: https://app.autify.com/projects/000/results/000000 $ echo $? 0 ``` このコマンドは、そのテストシナリオをデフォルト環境 (Linux/Chrome) で実行し、(デフォルトでは5分の)タイムアウトをするまでテストが終了するのを待ちます。もしパスしていたら、コマンドは終了コード`0` で終了します。そうでなければ、`0` 以外の終了コードで終了します。結果は上の`$?`の出力で見ることができます。 #### Autify NoCode Mobile もしAutify NoCode Mobile をご利用でしたら、Autify NoCode Webとほぼ同じ様にテストプランを実行することができます。今から実行したいテストプランのURL をコピーして (この様な形式のはずです: `https://mobile-app.autify.com/projects/AAA/test_plans/BBB`)、テストしたいアプリケーションのビルドファイルのファイルパス(iOS なら`*.ipa`、Android なら`*.apk` )もコピーして下さい。その後に以下を実行してください: ``` autify mobile test run --wait --build-path <コピーしたビルドファイルパス> <コピーしたテストプランURL> ``` ``` $ autify mobile test run --wait --build-path /path/to/android.apk https://mobile-app.autify.com/projects/AAA/test_plans/BBB ✅ Successfully uploaded android.apk (ID: CCC). See https://mobile-app.autify.com/projects/AAA/builds?os=android&selectedBuildId=CCC&page=1 ✅ Successfully started: https://mobile-app.autify.com/projects/AAA/results/DDD 🕐 Waiting for the test result: https://mobile-app.autify.com/projects/AAA/results/DDD ✔ Waiting... (timeout: 300 s) ✅ Test passed!: https://mobile-app.autify.com/projects/AAA/results/DDD $ echo $? 0 ``` このコマンドは、指定したビルドファイルをアップロードし、そのアップロードしたビルドを使ってテストプランを実行し、(デフォルトでは5分の)タイムアウトをするまでテストが終了するのを待ちます。もしパスしていたら、コマンドは終了コード`0` で終了します。そうでなければ、`0` 以外の終了コードで終了します。結果は上の`$?`の出力で見ることができます。 ## 更新 Autify CLI はチャンネルリリースで更新していて、都度再インストールする必要がありません。デフォルトで`stable` チャンネルが使われていて、以下を実行することでAutify CLI を最新にすることができます: ``` $ autify update autify-cli: Updating CLI from 0.0.0-aaaaaa to 0.1.0-bbbbbb... done ``` 注: Homebrew をお使いの方はこのコマンドを使わずにHomebrew に更新させた方が良いです。全ての`stable` リリースは[tap](https://github.com/autifyhq/homebrew-tap) にも自動的に反映されるので、以下のコマンドだけで最新に更新することができます: ``` $ brew upgrade autify-cli ``` 注: `beta` チャンネルとリリース候補のチャンネルも存在して、リリース前のバージョンを試すことができますが、多くの場合`stable` チャンネルで十分です。 ## 設定 設定ファイルは`~/.config/autify/config.env` (macOS or Linux) / `%LOCALAPPDATA%\autify\config.env` (Windows) に保存されます。設定ファイルのベースディレクトリは`XDG_CONFIG_HOME` 環境変数で変更することも可能です。 全ての設定は環境変数の形をしているので、同じ名前の環境変数を実行時に与えることでいつでも別の設定を利用して実行できます。例: `AUTIFY_WEB_ACCESS_TOKEN=mytoken autify web test run ...` 4つの設定が利用できます: ### AUTIFY_WEB_ACCESS_TOKEN Autify NoCode Web に認証するためのパーソナルアクセストークン。 ### AUTIFY_WEB_BASE_PATH Autify NoCode Web と通信する際のAPI ベースパス。デフォルトは `https://app.autify.com/api/v1` ### AUTIFY_MOBILE_ACCESS_TOKEN Autify NoCode Mobile に認証するためのパーソナルアクセストークン。 ### AUTIFY_MOBILE_BASE_PATH Autify NoCode Mobile と通信する際のAPI ベースパス。デフォルトは `https://mobile-app.autify.com/api/v1` ## コマンド こちらがコマンドの一覧になります。これらは、Autify のAPI 仕様を知る必要なく簡単に使えるように設計されています。多くのユースケースをサポートしていて、今後もコマンドや機能の追加を続けて改善していきます。特定のユースケースに対する新しいコマンドが必要でしたら、[GitHub Issues](https://github.com/autifyhq/autify-cli/issues) で自由にリクエストをお願いします。 ### Autify NoCode Web #### `autify web auth login` このコマンドは、対話的または非対話的にCLI をAutify NoCode Web にログインさせます。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-web-auth-login) をご覧ください。 #### `autify web test run` このコマンドは作成済のテストシナリオかテストプランを、環境やURL 置換などの多数のオプションを指定して実行できます。更に、テストが終了するまで待つ`--wait` オプションもサポートしています。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-web-test-run-scenario-or-test-plan-url) をご覧ください。 #### `autify web test wait` このコマンドは既にリクエスト済みのテストシナリオかテストプランを、終了するまで待ちます。ただし、ほとんどの場合は`autify web test run --wait` を代わりに使うことになるでしょう。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-web-test-wait-test-result-url) をご覧ください。 ### Autify NoCode Mobile #### `autify mobile auth login` このコマンドは、対話的または非対話的にCLI をAutify NoCode Mobile にログインさせます。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-mobile-auth-login) をご覧ください。 #### `autify mobile build upload` このコマンドは新しいビルドファイルをAutify NoCode Mobile にアップロードして、ビルドID を返してくれます。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-mobile-build-upload-build-path) をご覧ください。 #### `autify mobile test run` このコマンドは作成済のテストプランを、新しいビルドファイルか既にアップロード済みのビルドID をオプションで指定して実行できます。更に、テストが終了するまで待つ`--wait` オプションもサポートしています。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-mobile-test-run-test-plan-url) をご覧ください。 #### `autify mobile test wait` このコマンドは既にリクエスト済みのテストプランを、終了するまで待ちます。ただし、ほとんどの場合は`autify mobile test run --wait` を代わりに使うことになるでしょう。 より詳しい情報は [GitHub](https://github.com/autifyhq/autify-cli#autify-mobile-test-wait-test-result-url) をご覧ください。 ### API コマンド `api` という名前空間以下にあるコマンド(`autify web api` と`autify mobile api`)は、Autify のAPI 仕様から自動生成されたものなのでここには意図的に表示していません。もし詳細を知りたければ、[GitHub](https://github.com/autifyhq/autify-cli) をご覧ください。`api` コマンドを使って複数のAPI を組み合わせるユースケースがあれば、他のユーザも同じロジックを利用できるように、ぜひそれをユースケース特化したコマンドとして`autify web test run` の様に実装したいと考えています。皆さんのアイデアを[GitHub Issues](https://github.com/autifyhq/autify-cli/issues) でぜひ共有してください。 ## CI/CD 連携 Autify CLI をベースにしたAutify 公式のCI/CD 連携に関するドキュメントがいくつかあります。CI/CD 連携とはどんなもので、どういった連携をAutify が持っているかについて理解するには、[Autify でCI/CD](https://help.autify.com/docs/ja/cicd-with-autify) をご覧下さい。 ## 貢献 Autify CLI はオープンソースソフトウェアとして [GitHub](https://github.com/autifyhq/autify-cli) でホストしています。貢献方法についてのガイダンスを近いうちに出す予定です。