Live data from Hacker News

Gemini CLI tips and tricks for agentic coding

github.com

81–90 of 152 posts

Re: Gemini CLI tips and tricks for agentic coding

#81
> $ time gemini -p "hello world"

> Loaded cached credentials. > Hello world! I am ready for your first command. > gemini -p "hello world" 2.35s user 0.81s system 33% cpu 29.454 total

seeing between 10-80 seconds for responses on hello world. 10-20s of which is for loading the god damn credentials. this thing needs a lot of work.

Re: Gemini CLI tips and tricks for agentic coding

#82
post #72

Gemini CLI at this stage isn't good at complex coding tasks (vs. Claude Code, Codex, Cursor CLI, Qoder CLI, etc.). Mostly because of the simple ReAct loop, compounded by relatively weak tool calling capability of the Gemini 2.5 Pro model. > I haven't tried complex coding tasks using Gemini 3.0 Pro Preview yet. I reckon it won't be materially different. Gemini CLI is open source and being actively developed, which is…

> I haven't tried complex coding tasks using Gemini 3.0 Pro Preview yet. I reckon it won't be materially different. In my limited testing, I found that Gemini 3 Pro struggles with even simple coding tasks. Sure, I haven't tested complex scenarios yet and have only done so via Antigravity. But it is very difficult to do that with the limited quota it provides. Impressions here - https://dev.amitgawande.com/2025/antigr…

Thanks for sharing, insightful.

Personally, I consider Antigravity was a positive & ambitious launch. Initial impression was that there are many rough edges to be smoothed out. I hit many errors like 1. communicating with Gemini (Model-as-a-Service) 2. Agent execution terminated due to errors, etc., but somehow it completed the task (verification/review UX is bad).

Pricing for paid plans with AI Pro or Workspace would be key for its adoption, when Gemini 3.x and Antigravity IDE are ready for serious work.

Re: Gemini CLI tips and tricks for agentic coding

#83

I really wish there were a de facto state-of-the-art coding agent that is LLM-agnostic, so that LLM providers wouldn't bother reinventing their own wheels like Codex and Gemini-CLI. They should be pluggable providers, not independent programs. In this way, the CLI would focus on refining the agentic logic and would grow faster than ever before. Currently Claude Code is the best, but I don't think Anthropic would pivo…

Opencode (from SST; not the thing that got rebranded as Crush) seems to be just that. I've had a very good experience with it for the last couple of days; having previously used gemini-cli quite a bit. Opencode also has/hosts a couple of "free" models options right now, which are quite decent IMO.

https://github.com/sst/opencode

There are many many similar alternatives, so here's a random sampling: Crush, Aider, Amp Code, Emacs with gptel/acp-shell, Editor Code Assistant (which aims for an editor-agnostic backend that plugs into different editors)

Finally... there is quite a lot of scope for co-designing the affordances / primitives supported by the coding agent and the LLM backing it (especially in LLM post-training). So factorizing these two into completely independent pieces currently seems unlikely to give the most powerful capabilities.

Re: Gemini CLI tips and tricks for agentic coding

#84
I've been using Gemini CLI for months now, mainly because we have a free subscription for it through work.

Tip 1, it consistently ignores my GEMINI.md file, both global and local. Even though it's always saying that "1 GEMINI.md file is being used", probably because the file exists in the right path.

Tip 12, had no idea you could do this, seems like a great tip to me.

Tip 16 was great, thanks. I've been restarting it everytime my environment changes for some reason. Or having it run direnv for me.

All the same warnings about AI apply for Gemini CLI, it hallucinates wildly.

But I have to say gemini cli gave me my first real fun experience using AI. I was a late comer to AI, but what really hooked me was when I gave it permission to freely troubleshoot a k8s PoC cluster I was setting up. Watching it autonomously fetch logs, objects, troubleshoot until it found the error was the closest thing to getting a new toy for christmas for me in many years.

So I've kept using it, but it is frustrating sometimes when AI is behaving so stupid you just /quit and do it yourself.

Re: Gemini CLI tips and tricks for agentic coding

#85

Gemini CLI at this stage isn't good at complex coding tasks (vs. Claude Code, Codex, Cursor CLI, Qoder CLI, etc.). Mostly because of the simple ReAct loop, compounded by relatively weak tool calling capability of the Gemini 2.5 Pro model. > I haven't tried complex coding tasks using Gemini 3.0 Pro Preview yet. I reckon it won't be materially different. Gemini CLI is open source and being actively developed, which is…

Gemini CLI is a wild beast. The stories of it just going bonkers and refactoring everything it reads on its own are not rare. My own experience was something like, "Edit no code. Only give me suggestions. blah blah blah" first thing it does is edit a file without any other output. It's completely unreliable. Pro 3 is -very- smart but it's tool use/following directions isn't great.

I've been using Gemini 3 in the CLI for the past few days. Multiple times I've asked it to fix one specific lint error, and it goes off and fixes all of them. A lot of times it fixes them by just disabling lint rules. It makes reviewing much harder. It really has a mind of its own and sometimes starts grinding for 20 minutes doing all kinds of things - most of them pretty good, but again, challenging to review. I wish it would stick to the task.

Re: Gemini CLI tips and tricks for agentic coding

#86

I've been using Gemini CLI for months now, mainly because we have a free subscription for it through work. Tip 1, it consistently ignores my GEMINI.md file, both global and local. Even though it's always saying that "1 GEMINI.md file is being used", probably because the file exists in the right path. Tip 12, had no idea you could do this, seems like a great tip to me. Tip 16 was great, thanks. I've been restarting it…

Thanks for sharing. Gemini CLI doing live troubleshooting for a K8s cluster is surreal. I am keen to try that out, since I have just created RKE2 clusters.

Re: Gemini CLI tips and tricks for agentic coding

#87
The problem is that Gemini CLI simply doesn’t work. Beside simplest of tasks like creating new release it is useless as coding assistant. Doesn’t have a plan mode, jumps right into coding and then gets stuck in the middle of spaghetti code.

Gemini models are actually pretty capable but Gemini CLI tooling makes them dumb and useless. Google is simply months behind Anthropic and OpenAI in this space!

Re: Gemini CLI tips and tricks for agentic coding

#88
post #57

I am not doing any of this. It becomes obsolete in literally weeks, and it also doesn't work 80% of the time. Like why write a mcp server for custom tasks when I don't know if the llm is going to reliably call it. My rule for AI has been steadfast for months (years?) now. I write (myself, not AI because then I spend more time guiding the AI instead of thinking about the problem) documentation for myself (templates, c…

An alternative is to view the AI agent as a new developer on your team. If existing guidance + one-shot doesn't work, revisit the documentation and guidance (ie dotMD file), see what's missing, improve it, and try again. Like telling a new engineer "actually, here is how we do this thing". The engineer learns and next time gets it right.

I don't do MCPs much because of effort and security risks. But I find the loop above really effective. The alternative (one-shot or ignore) would be like hiring someone, then if they get it wrong, telling them "I'll do it myself" (or firing them)... But to each his own (and yes, AI are not human).

Re: Gemini CLI tips and tricks for agentic coding

#89

I have never had a luck with using Gemini. I had a pretty good app create with CODEX. Due to the hype I thought let me give Gemini a try. I asked it find all way to improve security and architecture / design. sure enough it gave a me a list of components etc that didn’t match best patterns and practices. So I let it refactor the code. It Fucked up the entire repot. It hard coded tenant ids and used ids, it completely…

I can't emphasize this enough, it doesn't matter how good a model is or what CLI I'm using, use git and chroot (at the least, container is easier though).

Always make the agent write a plan first and save it to something like plan.md, and tell it to update the list of finished tasks in status.md as it finishes each task from plan.md and to let you review the change before proceeding to next task.

Re: Gemini CLI tips and tricks for agentic coding

#90
post #57

I am not doing any of this. It becomes obsolete in literally weeks, and it also doesn't work 80% of the time. Like why write a mcp server for custom tasks when I don't know if the llm is going to reliably call it. My rule for AI has been steadfast for months (years?) now. I write (myself, not AI because then I spend more time guiding the AI instead of thinking about the problem) documentation for myself (templates, c…

An alternative is to view the AI agent as a new developer on your team. If existing guidance + one-shot doesn't work, revisit the documentation and guidance (ie dotMD file), see what's missing, improve it, and try again. Like telling a new engineer "actually, here is how we do this thing". The engineer learns and next time gets it right. I don't do MCPs much because of effort and security risks. But I find the loop a…

> The engineer learns and next time gets it right.

Antropomorphizing LLMs like that is the path to madness. That's where all the frustration comes from.

Post reply on HN