> For the complete documentation index, see [llms.txt](https://ja.docs.monaca.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ja.docs.monaca.io/reference/monaca_api/monaca_api_guide.md).

# Monaca クラウド & リモートビルド API

「 Monaca クラウド & リモートビルド API 」 を組み込めば、Cordova アプリのビルド処理を始め、Monaca クラウドが提供する各種 Web サービスを使用することができます ( [Monaca クラウド IDE](/products_guide/monaca_ide.md) と [Monaca CLI](/products_guide/monaca_cli.md) で提供しているサービス・機能が、この API 経由で使用できるようになります )。

ここでは、Node.js を使用したプロジェクトを例として、「 Monaca クラウド & リモートビルド API 」 の組み込み方法と使用方法を解説します。

## 「 Monaca クラウド & リモートビルド API 」 の組み込み方法

「 Monaca クラウド & リモートビルド API 」 は、[monaca-lib ( GitHub 上 )](https://github.com/monaca/monaca-lib) のライブラリー内に置かれている API 群の総称を指します。プロジェクトの中で、この API ( 群 ) を使用する場合、次の手順に従います ( ここでは、Node.js を使用したプロジェクトを例にします )。

1. `monaca-lib` をインストールします。

   ```bash
   $ npm install monaca-lib
   ```
2. js ファイル内で、次のようにモジュールを呼び出します。

   ```javascript
   var Monaca = require('monaca-lib').Monaca;
   ```
3. 呼び出し後は、次のように、「 Monaca クラウド & リモートビルド API 」 を使用できます ( js ファイル内 )。

   ```javascript
   var Monaca = require('monaca-lib').Monaca;
   var monaca = new Monaca();
   monaca.login('some@email.com', 'password').then(
   function() {
       console.log('Succesfully logged in!');
   },
   function(error) {
       console.log('Login failed: ' + error);
   }
   );
   ```

## 「 Monaca クラウド & リモートビルド API 」 の使用方法

「 Monaca クラウド & リモートビルド API 」 が提供しているサービス・機能の例を、次に記します。

* Monaca へのサインイン、Monaca からのサインアウト
* プロジェクトの新規作成
* プロジェクトのコンパイルとビルド
* Monaca クラウド側のプロジェクトとの同期
* プロジェクトのコード変換 ( トランスパイル/Transpile )

機能の詳細 ( 各 API の詳細 ) は、`monaca-lib/src/monaca.js` ファイル内をご確認ください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ja.docs.monaca.io/reference/monaca_api/monaca_api_guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
