> 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` membawa seorang builder — manusia atau agen AI — melalui seluruh siklus build-on-Rome: fakta rantai yang terperinci, pola yang tepat, panggilan kontrak, jalur masuk pendanaan, deploy/send, diagnosis lintas-VM, dan gerbang keberhasilan untuk kedua jalur. Satu inti kemampuan, dua permukaan yang selaras — sebuah CLI (`rome <command>`) dan sebuah [MCP](https://modelcontextprotocol.io) server (`rome mcp`) — jadi agen dan manusia berbagi satu model mental.

## Instal

Repo-first (publikasi npm tertunda):

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

# instalasi tahan lama — klon + tautkan:
git clone --branch v0.12.0 https://github.com/rome-protocol/rome-cli
cd rome-cli && npm install && npm install -g .
```

Sebuah `npm install -g github:rome-protocol/rome-cli` tidak **bukan** berfungsi saat ini — npm menyiapkan dependensi git paket tanpa node\_modules milik mereka sendiri ([rome-cli#25](https://github.com/rome-protocol/rome-cli/issues/25)). Gunakan npx sekali jalan atau klon + tautkan, dan pin sebuah tag seperti di atas: npx menyimpan salinan yang pertama kali diambilnya, jadi `npx github:rome-protocol/rome-cli` dapat terus menjalankan versi lama, sementara tag yang dipin selalu mengambil versi itu.

## Dua lapisan di atas satu inti

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

| Perintah                                                 | Apa yang dikembalikan                                                                                                                      |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `rome facts chain·tokens·contracts·gas·balance·programs` | fakta rantai langsung dari registry + RPC — tanpa id, alamat, atau selector yang diada-adakan                                              |
| `rome cookbook patterns·cpi-recipe·errors`               | contoh mana yang cocok dengan tujuan Anda · aturan akun CPI yang sering salah dipahami agen · dekode kegagalan Rome → penyebab + perbaikan |
| `rome call <chain> <addr> <sig> [args]`                  | baca sebuah kontrak (`eth_call`) — argumen multi-nilai dipisahkan koma dalam satu argumen: `"0xOwner…,0xSpender…"`                         |
| `rome doctor <chain>`                                    | preflight — chain hidup? RPC dapat dijangkau? program terkonfigurasi? dompet terdanai?                                                     |
| `rome tx <chain> <hash>`                                 | diagnosis sebuah tx — kuitansi EVM + tx penyelesaian Solana + tautan Via (Rome tidak punya `debug_traceTransaction`)                       |
| `rome preset foundry\|hardhat <chain>`                   | konfigurasi jaringan Rome siap pakai untuk toolchain Anda + keunikannya                                                                    |

**Aksi — tanda tangani on-chain.** hanya CLI, kunci dari lingkungan, **tidak pernah** di MCP.

| Perintah                                                                   | Apa yang dilakukannya                                                                                                                                                                                                                                                                                                                               |
| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rome deploy <chain> <artifact>`                                           | deploy sebuah kontrak yang sudah dikompilasi, 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>`                           | jembatani USDC → gas Rome (CCTP) — jalur masuk "dari rumah"                                                                                                                                                                                                                                                                                         |
| `rome bridge <chain> --from <src> --amount <usdc> [--intent gas\|wrapper]` | jembatani USDC **di** sebagai gas atau wUSDC                                                                                                                                                                                                                                                                                                        |
| `rome bridge <chain> --to <dest> --amount <usdc>`                          | jembatani wUSDC **keluar** — bakar di Rome; Anda mengklaim di tujuan (Rome mensponsori masuk, bukan klaim keluar)                                                                                                                                                                                                                                   |
| `rome activate <chain>`                                                    | pendanaan PDA opsional; bridging keluar tidak memerlukannya, karena kontrak bridge (RomeBridgeWithdraw v12 dan yang lebih baru) membayar biaya sewa pesan dan membebankannya ke gas                                                                                                                                                                 |
| `rome verify <chain> [--path …]`                                           | jalur **gerbang keberhasilan yang peka terhadap jalur**, satu untuk tiap jalur masuk: `solidity` — kontrak yang sama merespons di jalur EVM *dan* jalur Solana · `solana-program` — panggilan jalur EVM menggerakkan program Solana Anda via CPI · `from-home` — bridge masuk → bertindak di Rome → bridge keluar, perjalanan pulang-pergi terbukti |

## Integrasikan ke agen AI (MCP)

Anda tidak 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.12.0", "mcp"] } } }
```

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

Lalu agen memanggil alat seperti `facts_chain`, `cookbook_cpi_recipe`, `doctor`, `tx`, dan `preset` — dibumikan pada registry langsung + RPC, jadi ia berhenti menebak alamat dan selector. Permukaan MCP bersifat **hanya-baca dan tidak menyimpan kunci** — aman untuk dihubungkan ke agen mana pun; ia tidak pernah bisa menandatangani atau memindahkan dana. Tindakan penandatanganan tetap di CLI, dengan kunci disuplai melalui lingkungan.

## Loop grounding agen

1. `rome cookbook patterns <apa yang sedang saya bangun>` → repo contoh + arsitektur mana
2. `rome facts chain <chain>` → RPC, program id, token gas (tanpa hardcoding)
3. …tulis kode berdasarkan nilai-nilai tepat itu…
4. `rome verify <chain> --path <jalur Anda masuk>` → buktikan bahwa itu berfungsi, lewat jalur mana pun Anda datang

## Pelajari lebih lanjut

* Repo + panduan lengkap: [`rome-protocol/rome-cli`](https://github.com/rome-protocol/rome-cli)
* [Ekosistem & repo](https://docs.rome.builders/id/memulai-1/ecosystem.md) · [Bangun aplikasi jalur ganda](https://docs.rome.builders/id/panduan-pengembang/dual-lane-app.md) · [Dari rumah: menjangkau Rome dari chain lain](https://docs.rome.builders/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.
