> ## Documentation Index
> Fetch the complete documentation index at: https://gora.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Devnet quickstart

> Run Gora Devnet on a VM, develop locally, deploy through ngrok, invoke, and inspect results.

# Devnet quickstart

This is the clearest end-to-end flow:

1. A VM runs Gora Devnet, local chains, and ngrok.
2. Your local computer runs the Gora CLI and app code.
3. The local CLI points at the Gora ngrok URL.
4. Contract metadata comes from Gora Devnet, not from VM-only files.

## A. Start Devnet on the VM

On the VM where the Gora repo, local chains, and ngrok live:

```bash theme={null}
gora devnet up --chains base,solana,algorand --mobile-signing true
```

This starts:

* Gora dev HTTP API
* Dev Bridge for mobile approval/signing
* Base/Ganache local RPC
* Solana local validator
* Algorand localnet
* ngrok tunnels
* contract metadata registry

The command stays running. Use `tmux` if you want to detach:

```bash theme={null}
tmux new -s gora-devnet
gora devnet up --chains base,solana,algorand --mobile-signing true
```

Check status from another VM shell:

```bash theme={null}
gora devnet status
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8787/health
curl http://127.0.0.1:8080/v1/contracts
```

Typical public endpoints:

```text theme={null}
Gora API:   https://gora-dev.ngrok.app
Dev Bridge: https://gora-bridge-dev.ngrok.app
Base RPC:   https://base-dev.ngrok.app
Solana RPC: https://solana-dev.ngrok.app
Algorand:   https://algorand-dev.ngrok.app
```

Gora posts mobile signing requests to the bridge over the VM-local URL `http://127.0.0.1:8787`. Mobile apps on another machine read the same requests through `https://gora-bridge-dev.ngrok.app`.

Stop processes started by the helper:

```bash theme={null}
gora devnet down
```

## B. Configure your local app

On your local computer, create an app:

```bash theme={null}
gora init my-agent --template agent-mobile-signing --chain algorand --yes
cd my-agent
```

Set the Gora Devnet URL:

```bash theme={null}
gora config set node.url https://gora-dev.ngrok.app
```

If Devnet requires a token:

```bash theme={null}
gora config set api.token YOUR_TOKEN
```

Check health:

```bash theme={null}
curl https://gora-dev.ngrok.app/health
```

## C. Resolve chain contract metadata

For apps that target Base, Solana, or Algorand, link chain metadata before deploying the Gora app package.

First run doctor:

```bash theme={null}
gora contract doctor --chain algorand --node https://gora-dev.ngrok.app
```

Then resolve and link:

```bash theme={null}
gora contract build --chain algorand
gora contract deploy --chain algorand --node https://gora-dev.ngrok.app
gora contract link --chain algorand
```

For Base:

```bash theme={null}
gora contract build --chain base
gora contract deploy --chain base --node https://gora-dev.ngrok.app
gora contract link --chain base
```

For Solana:

```bash theme={null}
gora contract build --chain solana
gora contract deploy --chain solana --node https://gora-dev.ngrok.app
gora contract link --chain solana
```

The `--node` form calls `GET /v1/contracts/{chain}` and records the deployed address, program id, or Algorand app id in `.gora/contracts/<chain>/latest.json`.

For Algorand, this is the important distinction:

* local developers use `--node https://gora-dev.ngrok.app`
* VM operators may use `--datadir /path/to/Node`

Do not use `--datadir` from a local computer unless that computer is running the Algorand localnet.

## D. Build, validate, package, deploy

```bash theme={null}
gora build
gora validate
gora package
gora deploy
```

`gora deploy` uploads:

* app artifact
* manifest
* policy
* package metadata
* linked contract metadata

It writes a deployment receipt to:

```text theme={null}
.gora/deployments/dev.json
```

## E. Invoke

Use the generated fixture:

```bash theme={null}
gora invoke --app my_agent --input fixtures/request.json --wait
```

The response includes a `request_id`.

If your app result includes a `chain` field, Devnet may attach `contract_metadata` to the invoke or result response. Use that metadata for app ids, program ids, addresses, RPC URLs, and auth hints.

## F. Inspect

```bash theme={null}
gora inspect request <request-id>
gora inspect result <request-id>
gora inspect attestation <request-id>
gora inspect app my_agent
gora status --app my_agent --bridge https://gora-bridge-dev.ngrok.app
```

Inspect receipts are saved under:

```text theme={null}
.gora/inspect/
```

## What success means

A successful invoke means:

1. Devnet found your deployed app.
2. Devnet ran the declared artifact.
3. Your app returned valid JSON.
4. Gora recorded the result and attestation data.

It does not necessarily mean a chain transaction was submitted. Chain execution requires a gateway, wallet, mobile signing flow, or submitter.

For mobile signing flows, use:

```bash theme={null}
gora inspect signing <signing-request-id> --bridge https://gora-bridge-dev.ngrok.app
gora inspect submission <signing-request-id> --bridge https://gora-bridge-dev.ngrok.app
```

## One-screen local flow

```bash theme={null}
gora init my-agent --template agent-mobile-signing --chain algorand --yes
cd my-agent

gora config set node.url https://gora-dev.ngrok.app

gora contract doctor --chain algorand --node https://gora-dev.ngrok.app
gora contract build --chain algorand
gora contract deploy --chain algorand --node https://gora-dev.ngrok.app
gora contract link --chain algorand

gora build
gora validate
gora deploy

gora invoke --app my_agent --input fixtures/request.json --wait
```

Next: [Deploy to Gora](./deploy-to-gora).
