> 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

`rome` membawa seorang builder — manusia atau agen AI — sepanjang seluruh siklus hidup build-on-Rome: fakta chain yang ter-grounding, pola yang tepat, pemanggilan kontrak, jalur masuk pendanaan, deploy/send, diagnosis lintas-VM, dan works-gate untuk kedua jalur. Satu inti kapabilitas, 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

Utamakan repo (publikasi npm tertunda):

```bash
# sekali jalan, tanpa instal:
npx github:rome-protocol/rome-cli facts chain hadrian

# instalasi permanen — clone + tautkan:
git clone 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` tidak **berfungsi** hari 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 + tautkan. Sematkan tag (`github:rome-protocol/rome-cli#v0.8.0`) saat Anda membutuhkan eksekusi yang dapat direproduksi.

## Dua lapisan di atas satu inti

**Baca — grounding + diagnosis.** Tanpa kunci; baik di CLI maupun server MCP.

| Perintah                                                 | Apa yang dikembalikan                                                                                                                      |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `rome facts chain·tokens·contracts·gas·balance·programs` | fakta chain langsung dari registry + RPC — tanpa id, alamat, atau selector yang dihalusinasi                                               |
| `rome cookbook patterns·cpi-recipe·errors`               | contoh mana yang cocok untuk tujuan Anda · aturan akun CPI yang sering salah dipahami agen · uraikan kegagalan Rome → penyebab + perbaikan |
| `rome call <chain> <addr> <sig> [args]`                  | membaca kontrak (`eth_call`) — argumen multi-nilai dipisahkan koma dalam satu argumen: `"0xOwner…,0xSpender…"`                             |
| `rome doctor <chain>`                                    | pra-terbang — chain aktif? RPC dapat dijangkau? program dikonfigurasi? dompet terisi dana?                                                 |
| `rome tx <chain> <hash>`                                 | mendiagnosis tx — receipt EVM + tx penyelesaian Solana + tautan Via (Rome tidak memiliki `debug_trace*`)                                   |
| `rome preset foundry\|hardhat <chain>`                   | konfigurasi jaringan Rome siap pakai untuk toolchain Anda + keunikannya                                                                    |

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

| Perintah                                                                   | Apa yang dilakukannya                                                                                                                                                                                                                                                                                                               |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rome deploy <chain> <artifact>`                                           | mendeploy kontrak yang telah 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>`                           | bridge USDC → gas Rome (CCTP) — jalur masuk "dari home"                                                                                                                                                                                                                                                                             |
| `rome bridge <chain> --from <src> --amount <usdc> [--intent gas\|wrapper]` | bridge USDC **masuk** sebagai gas atau wUSDC                                                                                                                                                                                                                                                                                        |
| `rome bridge <chain> --to <dest> --amount <usdc>`                          | bridge wUSDC **keluar** — dibakar di Rome; Anda mengklaim di tujuan (Rome mensponsori inbound, bukan klaim outbound)                                                                                                                                                                                                                |
| `rome activate <chain>`                                                    | pendanaan PDA satu kali diperlukan sebelum **bridge keluar pertama** (inbound tanpa hambatan — tidak memerlukan apa pun)                                                                                                                                                                                                            |
| `rome verify <chain> [--path …]`                                           | itu **works-gate yang sadar jalur**, satu untuk setiap jalur masuk: `solidity` — kontrak yang sama merespons di jalur EVM *dan* jalur Solana · `solana-program` — panggilan di jalur EVM menjalankan program Solana Anda via CPI · `dari home` — bridge masuk → bertindak di Rome → bridge keluar, perjalanan pulang-pergi terbukti |

## Hubungkan 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", "mcp"] } } }
```

(Dengan instalasi clone + tautkan, `{ "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` — didasarkan pada registry langsung + RPC, jadi ia berhenti menebak alamat dan selector. Permukaan MCP bersifat **hanya-baca dan tidak menyimpan kunci** — aman dihubungkan ke agen mana pun; ia tidak akan pernah dapat menandatangani atau memindahkan dana. Tindakan penandatanganan tetap di CLI, dengan kunci disediakan melalui environment.

## Loop grounding agen

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

## Pelajari lebih lanjut

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