OpenCode is an open-source coding agent available through terminal, desktop and web interfaces; its terminal supports connecting different model providers. [sources]
Documentation and availability checked .
Access and costs
Its Console lists free and metered models and optional paid access. Check the model and any automatic recharge before starting. [sources]
Practical project: Create a repeatable import check
Set up. Install the platform-appropriate binary or package from the current docs. In an empty test project launch opencode, use /connect and select a provider you are authorised to use.
Prepare the example. Save sample.csv with columns sku and quantity. Include one valid row, one blank sku and one negative quantity; do not use customer data.
Ask for one change.
Write a local Python CSV checker using only the standard library. Print the line number and reason for each invalid row. Do not modify the input, call online services or install packages.
Inspect and revise. Inspect the generated checker, then run it on the sample. Add another valid row and rerun. Ask for an explanation if the reported line numbers shift unexpectedly.
Check the result. Only the two invalid rows should be reported, and the input file must remain unchanged.
Strengths and limits
Provider choice is useful for cost control. Different models can suggest different validation rules; keep the fixture authoritative.
Watch alongside the project
OpenCode · Intermediate
OpenCode Tutorial for Beginners: Setup, Agents, Skills & MCP
Leon van Zyl · Published · Checked 2026-12-05
Watch alongside the written exercise: Create a repeatable import check.