Wiki / Start

First run#

Five minutes from install to your first task.

1. Open a folder#

Run portcode in the folder you want to work in. For a port, that is the folder that holds the program to port: put the original in original/.

When the prompt is empty, PortCode looks at the folder and puts a guess at your first message in the prompt box as grey text. Press tab to use it, esc to dismiss it, or just type something else. See A tour of the app.

2. Pick a model and give it a key#

PortCode speaks the OpenAI chat protocol, so almost any server works. Choose one way:

TypeWhat it does
/providerlists providers and shows which still need a key
/provider <name> [model]switches provider and model
/key [provider]asks for the API key, hidden
/modelslists the models the current provider serves
/model <provider>/<model>picks a model
/setupprints these steps again

The model you choose is remembered for the next start. -m and PORTCODE_MODEL still win.

3. Check that it works#

portcode doctor

To test the model itself (chat, tool calls, valid JSON, edits) run portcode eval.

4. Start working#

Type a task, or type /create. /create asks what you want to recreate (a website, a program, a game, a file format or nothing yet), how closely PortCode may look inside the original, and what to build it with. Then it starts the right agent in the right mode.

Port this CLI to Rust, following rustport

PortCode pins the original's sha256, records what it learns, and calls a module done only after parity passes. The details are in The port workflow.

Settings worth knowing early#

SettingDefaultWhat it does
esc twicecancels the running request
/yolooffapproves every permission request without asking, see Permissions
"venv"onlets the agent create and use a Python .venv, see Python environments
"team"offadds the team agent, see Team mode
"suggest"onthe grey first-message suggestion

Edit this page on GitHub