Skip to main content
You point the built-in Move to Forge workflow at an existing Go codebase. It plans the port, waits for your approval, then builds a new Forge project beside the original and ports your code into it one component at a time. Each component has to pass forge generate, forge lint --contract, go build and your tests before the next one starts. Your source repository is left as it was, and the cutover stays with you. Use it when you want your app on Forge’s Go stack: Connect RPC, schema from SQL migrations, typed config and the generated store. If you only want to deploy an app as it is, in any language, adopt it from its Dockerfile instead. That path changes no code and takes about an hour.

Before you begin

  • The reliant CLI, v1.21 or later, signed in (Sign in and tokens), with a machine that holds the source repository. The workflow uses the Forge built into Reliant (v1.6.1 or later) and pins it in the new project.
  • A Go codebase in git, with tests that pass. This example is a 340-line net/http API over a Postgres tasks table, with a Store interface, five JSON routes and a table test.
  • Model credit. A run takes hours on a flagship model, not minutes. In an organization, reliant workflow funding shows whether a run asks before it uses your own AI account.
1

Start the workflow

In the app, choose Move to Forge in a new chat’s workflow selector and describe what you want. From the terminal, the built-in’s id is forge-migrate:
terminal
Output
For an app that is not written in Go, the planner first recommends adopting it from its Dockerfile, and ports only if you still ask for it.
2

Read the plan, then approve it

The planner reads the code first and asks you only what the code cannot answer. It then writes two files into the source repository and stops at Approve the migration plan?:
  • MIGRATION_PLAN.md: the source inventory, the target shape, the components in port order, the parity bar and the deferred list
  • .forge-migrate/target: the absolute path of the new project
MIGRATION_PLAN.md (excerpt)
Approve it from the Inbox or from the run under Workflows → Runs. Edit the plan first if a mapping is wrong. If you deny it, nothing is scaffolded, and the plan stays on disk for the next run.
3

Follow the port

After approval the workflow runs Get It Right loops: one for the scaffold and green baseline, one per component in dependency order, and one to converge. A separate reviewer passes or fails each loop.
terminal
Output (trimmed)
The threads are, in order: the plan, the scaffold and baseline, the three components (tasks-schema, tasks-service, server-composition) and the converge step. This 340-line app took about two hours after approval. The run ends with Migration Complete, which names the new project and points at the cutover checklist.
4

Check the new project

The project is in the directory recorded in .forge-migrate/target. Run the same gates the workflow ran:
terminal
Output
In the source repository, git status lists only new files: the two plan files, and the .reliant/ folder and reliant.md that registering the project added. No source file changed.
5

See what was kept and what was rewritten

MIGRATION_PLAN.md accounts for every source file. For this app:Choices it could not settle from the code stay as open questions with the default it used, such as pagination on ListTasks and the wire type of due_date.
6

Cut over

The plan ends with a cutover checklist, and the workflow performs none of it. The new project’s git repository has no commits yet. Commit it, rehearse the migration against a copy of your production database, move your clients to the Connect API, then deploy (Deploy a Go API with managed Postgres). The module path keeps its -next suffix until the last step, so the old and new code build side by side until you switch.

What this does not do

  • It does not change your source repository, beyond writing MIGRATION_PLAN.md and .forge-migrate/target.
  • It does not commit, deploy or cut over. The new project, the module rename and the switch of traffic are yours.
  • It does not keep your old API shape. Routes become Connect RPCs, field names follow proto JSON, and errors become Connect codes. There is no REST shim, so clients change with the server.
  • It stops at the first component that cannot go green, rather than building the next one on a broken base.
  • It is not the way to bring a non-Go app. For those, adopt the app from its Dockerfile.

Troubleshooting

The plan was denied or the approval timed out after 24 hours. Nothing was scaffolded. Edit MIGRATION_PLAN.md and start the workflow again.
A gate stayed red after its repair attempts. MIGRATION_PLAN.md records how far the port got and what failed. Fix that component in the new project, or change the plan, and run the workflow again.
A phase hit a tooling or environment problem, such as a missing buf or go on the machine, and escalated rather than working around it. The message above it names the problem.

Next steps

Bring an existing app

Deploy an app in any language from its Dockerfile, with no rewrite.

Build an app from one prompt

Start a new Forge project from a description instead.

Generated code and yours

Which files in the new project Forge regenerates and which you own.

Deploy a Go API

Ship the ported project with a managed Postgres.