> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/id/produk/rome-cli.md).

# Rome CLI + MCP

CLI pengembang Rome dan server MCP — fakta chain yang terkurasi, pola build yang tepat, dan tindakan khas Rome (danai, deploy, verifikasi) untuk manusia atau agen AI.

`rome` mendampingi pembangun — manusia atau agen AI — sepanjang seluruh siklus pengembangan di Rome: fakta chain yang terverifikasi, pola yang tepat, pemanggilan kontrak, jalur masuk pendanaan, deploy/kirim, diagnosis lintas-VM, dan gerbang verifikasi yang berfungsi untuk kedua jalur. Satu inti kemampuan, dua antarmuka yang selaras — sebuah CLI (`rome <command>`) dan sebuah [MCP](https://modelcontextprotocol.io) server (`rome mcp`) — sehingga agen dan manusia berbagi satu model mental.

## Instal

Utamakan repo (publikasi npm tertunda):

```bash
# sekali jalan, tanpa instalasi:
npx github:rome-protocol/rome-cli#v0.11.0 facts chain hadrian

# instalasi permanen — clone + link:
git clone --branch v0.11.0 https://github.com/rome-protocol/rome-cli
cd rome-cli && npm install && npm install -g .
```

Perintah biasa `npm install -g github:rome-protocol/rome-cli` memang **bukan** berfungsi saat ini — npm menyiapkan dependensi git paket tanpa node\_modules mereka sendiri ([rome-cli#25](https://github.com/rome-protocol/rome-cli/issues/25)). Gunakan npx sekali jalan atau clone + link, dan sematkan tag seperti di atas: npx menyimpan salinan yang pertama kali diambilnya, sehingga perintah tanpa tag tetap `npx github:rome-protocol/rome-cli` dapat terus menjalankan versi lama, sedangkan tag yang disematkan selalu mengambil versi tersebut.

## Dua lapisan di atas satu inti

**Pembacaan — landasan + diagnosis.** Tanpa kunci; tersedia di CLI dan server MCP.

| Perintah                                                 | Yang dikembalikan                                                                                                                    |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `rome facts chain·tokens·contracts·gas·balance·programs` | fakta chain langsung dari registry + RPC — tanpa id, alamat, atau selector yang dihalusinasikan                                      |
| `rome cookbook patterns·cpi-recipe·errors`               | contoh mana yang sesuai tujuan Anda · aturan akun CPI yang sering salah dipahami agen · dekode kegagalan Rome → penyebab + perbaikan |
| `rome call <chain> <addr> <sig> [args]`                  | membaca kontrak (`eth_call`) — argumen bernilai banyak dipisahkan koma dalam satu argumen: `"0xOwner…,0xSpender…"`                   |
| `rome doctor <chain>`                                    | pemeriksaan awal — chain aktif? RPC dapat dijangkau? program terkonfigurasi? wallet didanai?                                         |
| `rome tx <chain> <hash>`                                 | mendiagnosis tx — receipt EVM + tx settlement Solana + tautan Via (Rome tidak memiliki `debug_traceTransaction`)                     |
| `rome preset foundry\|hardhat <chain>`                   | konfigurasi jaringan Rome siap pakai untuk toolchain Anda + keunikannya                                                              |

**Tindakan — tanda tangani on-chain.** Khusus CLI, kunci dari environment, **tidak pernah** di MCP.

| Perintah                                                                   | Yang dilakukan                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rome deploy <chain> <artifact>`                                           | deploy kontrak yang dikompilasi, sambil menangani keunikan gas Rome                                                                                                                                                                                                                                                                             |
| `rome send <chain> <addr> <sig>`                                           | menulis ke kontrak melalui jalur penulisan Rome yang benar                                                                                                                                                                                                                                                                                      |
| `rome fund <chain> --from <src> --amount <usdc>`                           | bridge USDC → gas Rome (CCTP) — jalur masuk "dari rumah"                                                                                                                                                                                                                                                                                        |
| `rome bridge <chain> --from <src> --amount <usdc> [--intent gas\|wrapper]` | bridge USDC **dari** sebagai gas atau wUSDC                                                                                                                                                                                                                                                                                                     |
| `rome bridge <chain> --to <dest> --amount <usdc>`                          | bridge wUSDC **keluar** — burn di Rome; Anda melakukan claim di tujuan (Rome mensponsori inbound, bukan claim outbound)                                                                                                                                                                                                                         |
| `rome activate <chain>`                                                    | pendanaan PDA satu kali diperlukan sebelum **bridge keluar pertama** (inbound tanpa hambatan — tidak memerlukannya)                                                                                                                                                                                                                             |
| `rome verify <chain> [--path …]`                                           | gerbang verifikasi **yang mengenali jalur**, satu untuk setiap cara masuk: `solidity` — kontrak yang sama merespons di jalur EVM *dan* jalur Solana · `solana-program` — pemanggilan jalur EVM menggerakkan program Solana Anda melalui CPI · `dari-rumah` — bridge masuk → bertindak di Rome → bridge keluar, perjalanan pulang-pergi terbukti |

## Hubungkan ke agen AI (MCP)

Anda tidak perlu menjalankan atau meng-host apa pun — klien MCP Anda meluncurkan `rome mcp` (server stdio) sesuai permintaan. Daftarkan sekali:

```json
{ "mcpServers": { "rome": { "command": "npx", "args": ["-y", "github:rome-protocol/rome-cli#v0.11.0", "mcp"] } } }
```

(Dengan instalasi clone + link, `{ "command": "rome", "args": ["mcp"] }` juga berfungsi — bentuk npx hanya tidak memerlukan instalasi sebelumnya.)

Agen kemudian memanggil alat seperti `facts_chain`, `cookbook_cpi_recipe`, `doctor`, `tx`, dan `preset` — berlandaskan registry + RPC aktif, sehingga agen berhenti menebak-nebak alamat dan selector. Antarmuka MCP bersifat **hanya-baca dan tidak menyimpan kunci** — aman dihubungkan ke agen mana pun; agen tidak pernah dapat menandatangani atau memindahkan dana. Tindakan penandatanganan tetap berada di CLI, dengan kunci disediakan melalui environment.

## Siklus landasan agen

1. `rome cookbook patterns <what I'm building>` → repo contoh + arsitektur yang mana
2. `rome facts chain <chain>` → RPC, id program, token gas (tanpa hardcoding)
3. …tulis kode berdasarkan nilai-nilai persis tersebut…
4. `rome verify <chain> --path <your way in>` → buktikan bahwa ini berfungsi, dari jalur mana pun Anda datang

## Pelajari lebih lanjut

* Repo + panduan lengkap: [`rome-protocol/rome-cli`](https://github.com/rome-protocol/rome-cli)
* [Ekosistem & repo](/id/memulai/ecosystem.md) · [Build a dual-lane app](/id/panduan-pengembang/dual-lane-app.md) · [Dari rumah: jangkau Rome dari chain lain](/id/panduan-pengembang/from-home.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/id/produk/rome-cli.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
