Gemini · Module 02 of 6

Coding

Build small apps in Canvas, get code that fits your repo, choose a CLI, and work with large codebases.

2 lessons7 techniques

Code generation

Build small apps in Canvas, import your code so answers fit your repo, and choose between Gemini CLI and Antigravity CLI.

3 techniques →

Large-context code

Find out how much code fits on your plan, import a repo instead of pasting it, put your question last, and cut repeat costs on the API.

4 techniques →
Check yourself

Can you code with Gemini?

Four questions on the right tool, context windows and API costs. You see each answer right away, with no account to create.

Take the quiz
Gemini for coding

Pick the right tool first

Google now has several coding routes, and they do different jobs. The Gemini app reads code you import and answers questions about it. Canvas builds small one-page apps you can click through. Antigravity, with its agy command, is the agent that edits your files and runs commands. Gemini CLI remains for organizations on Gemini Code Assist and for paid API keys, but it stopped serving free and Google AI Pro users on June 18, 2026. Many tutorials still say otherwise.

Why the context window matters here

Coding is where the size of the window really shows. Google estimates that 1 million tokens holds roughly 30,000 lines of code in its app docs, and 50,000 lines in its API docs. That size is available only on Google AI Pro and Ultra, or on the API. On lower plans you'll need to choose the files that matter, and the lessons below show how to work out what fits.

Frequently asked
Can Gemini read a GitHub repository?

Yes. In the Gemini app, click Add files, More Uploads, then Import Code, and enter a repository or branch URL. Google's limit is one repository per chat, with up to 5,000 files and 100 MB.

Is Gemini CLI still free?

Not for individuals who sign in with Google. Free and Google AI Pro and Ultra users were moved to Antigravity CLI on June 18, 2026. Gemini CLI itself is still open source, and it works with Code Assist Standard or Enterprise licenses and with paid API keys.

Which Gemini model is best for coding?

Google's models page describes Pro as suited to advanced coding and Argon as its top tier for complex workflows, both in the app. On the API, it recommends Gemini 3.8 Flash for long-horizon software engineering, and Gemini 4 Argon as its flagship reasoning model.

Does Google AI Pro include Gemini API access?

No. The API is billed separately per token through Google AI Studio. Google AI Pro does include entry rate limits for the agent model in Antigravity.