MyRelay

← Back to the notebook

One small script, then a look at the token bill

Start with a chore you already understand

A folder of lecture notes needs an index. A spreadsheet export contains duplicate rows. A collection of photos needs consistent names. These are good first jobs for Gemini CLI: small, specific tasks whose results you can check yourself.

Gemini CLI is an AI assistant that runs in a terminal, the text-based application used to interact with your computer. You describe a task in ordinary English, and it can help write a script, explain it, and, depending on its permissions, use tools to work with local files. A script is simply a short program that performs a repeatable job.

For a beginner watching their spending, the useful habit is not asking for everything at once. Ask for one small result, inspect it, and decide whether another request is worth paying for.

Prepare a small workspace before connecting an account

Install Gemini CLI using its official installation instructions. Check the current prerequisites first, including the supported version of Node.js, the software environment it needs to run. Avoid copying installation advice from an old tutorial without comparing it with the current documentation.

Next, make a separate working folder containing only a few sample files. Use copies rather than originals. Leave out passwords, personal records, private keys, and anything you would not want sent to an external service.

This gives the assistant a smaller area to work in and makes mistakes easier to undo. It also reduces the temptation to ask it to inspect an entire project when three example files would explain the task.

Connect billing without guessing at settings

Gemini CLI offers different authentication arrangements, and the way you connect affects who bills you and which limits apply. Follow the current instructions for your chosen route rather than assuming every login or API key behaves the same way.

MyRelay can be useful if you want one personal, pay-as-you-go balance across several AI services instead of managing separate balances. Create a MyRelay account, then use its current Gemini CLI setup instructions to connect your personal key through the supported relay configuration.

Keep that key private, and do not paste it into a chat prompt or save it in a shared project. MyRelay also supports OpenAI-compatible tools, but that does not mean their settings are interchangeable with Gemini CLI settings. Use the instructions intended for this client.

Ask for a preview before allowing changes

Your first request should describe the input, the desired output, and the boundary. For example, ask for a script that identifies duplicate rows in a sample export, writes a separate cleaned copy, and leaves the original untouched.

Ask the assistant to explain its plan before writing or running anything. Then request a preview mode that reports proposed changes without applying them. For file-renaming tasks, that preview should show each old name alongside its proposed replacement.

Read permission prompts carefully. Approving one understandable action is safer than broadly allowing future actions. If the explanation is unclear, ask for a simpler version before proceeding.

Keep each paid conversation narrow

For a straightforward script, Gemini 2.5 Flash is one option to consider if it is available through your selected setup. Check current pricing rather than treating a model name as a promise of low cost.

Requests can include your instructions, conversation history, file contents, and tool results. These are measured in tokens, small pieces of text used for billing. Repeatedly sending a large file or asking for lengthy explanations can increase spending even when the finished script is short.

After your first task, check MyRelay’s per-request token and cost records. Set a personal spending ceiling for the exercise and stop when you reach it. A working local script usually does not need another AI request each time you run it.

Finish with a test you can explain

Try the script on a tiny sample with a known answer. Include an empty input, an ordinary case, and a duplicate or unusual entry. Confirm that the original files remain unchanged.

Keep the script only when you understand its basic behavior and can repeat the test. The useful outcome is a small tool you can trust, not a long conversation you have to keep paying to continue.

More to read