Live data from Hacker News

Gemini CLI tips and tricks for agentic coding

github.com

141–150 of 152 posts

Re: Gemini CLI tips and tricks for agentic coding

#141
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…

> It becomes obsolete in literally weeks, and it also doesn't work 80% of the time.

You can tell Gemini or Claude it has to use your MCP tool of choice; you can also tell it not to use other tools if it's confused.

Lots of MCPs come with dozens of functions that can be called; you can disable the ones you don't need. Saves on tokens and the agent is less likely to get confused due to a crowded context window.

You can also write a script for the agent that calls the MCP if you needed to. If the functionality you need is available via the cli, you can use that instead of writing an MCP.

Re: Gemini CLI tips and tricks for agentic coding

#142

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…

> Currently Claude Code is the best, but I don't think Anthropic would pivot it into what I described.

They don't have to pivot, since it already exists: Claude Code Router [1].

[1]: https://github.com/musistudio/claude-code-router

Re: Gemini CLI tips and tricks for agentic coding

#143

Earlier quoted context omitted.

There is Aider (aider.chat), and it has been there for couple years now. Great tool. Alas, you don't install Claude Code or Gemini CLI for the actual CLI tool. You install it because the only way agentic coding makes sense is through subscription billing at the vendor - SOTA models burns through tokens too fast for pay-per-use API billing to make sense here; we're talking literally a day of basic use costing more tha…

Aider is in a sad state. The maintainer does not "maintain" for quite some time now (look at the open PRs and issues). It's not state of the art definitely but one of the first and best ones in the past. A fork was created, Aider CE, from some members of the Discord community https://github.com/dwash96/aider-ce The fork looks and works promising but there is (sadly) so much more development in the other AI CLI tools…

Agreed. Alternatives seem too "agentic" for me, where Aider strikes the right balance of AI pair programming.

Re: Gemini CLI tips and tricks for agentic coding

#144
post #116

Earlier quoted context omitted.

A perspective which has helped me is viewing LLM-based offerings strictly as statistical document generators, whose usefulness is entirely dependent upon their training data set plus model evolution, and whose usage is best modeled as a form of constraint programming[0] lacking a formal (repeatable) grammar. As such, and when considering the subjectivity of natural languages in general, the best I hope for when using…

Doesn't look like your handwritten example follows the direction on commenting. (While we're at it, there's no need for an apostrophe when pluralising an initialism, like "URLs".)

> Doesn't look like your handwritten example follows the direction on commenting.

Please read posts fully before replying:

  For reference, a hand-written script satisfying the above 
  (excluding comments for brevity) ...

Re: Gemini CLI tips and tricks for agentic coding

#145

Earlier quoted context omitted.

A perspective which has helped me is viewing LLM-based offerings strictly as statistical document generators, whose usefulness is entirely dependent upon their training data set plus model evolution, and whose usage is best modeled as a form of constraint programming[0] lacking a formal (repeatable) grammar. As such, and when considering the subjectivity of natural languages in general, the best I hope for when using…

Do you get tangibly different results if you don't capitalize MUST (NOT)?

> Do you get tangibly different results if you don't capitalize MUST (NOT)?

My use of MUST/MUST NOT is from experience with various web specification documents and is capitalized more for visual recognition than any other reason. Having only used this form, I cannot answer your question as to document generation impact. I would imagine use of Markdown emphasis, such as:

  - _must not_ ...
Would have some effect though. Perhaps both even more?

Re: Gemini CLI tips and tricks for agentic coding

#146

Earlier quoted context omitted.

Do you get tangibly different results if you don't capitalize MUST (NOT)?

> Do you get tangibly different results if you don't capitalize MUST (NOT)? My use of MUST/MUST NOT is from experience with various web specification documents and is capitalized more for visual recognition than any other reason. Having only used this form, I cannot answer your question as to document generation impact. I would imagine use of Markdown emphasis, such as: - _must not_ ... Would have some effect though.…

I asked because I've seen other folks mention capitalizing things for emphasis so the LLM follows instructions more closely (which is one of those things that make me feel like the UX around LLMs is bananas).

Re: Gemini CLI tips and tricks for agentic coding

#147

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…

There is Aider (aider.chat), and it has been there for couple years now. Great tool. Alas, you don't install Claude Code or Gemini CLI for the actual CLI tool. You install it because the only way agentic coding makes sense is through subscription billing at the vendor - SOTA models burns through tokens too fast for pay-per-use API billing to make sense here; we're talking literally a day of basic use costing more tha…

With increasingly aggressive usage limits (Claude weekly usage now), "agentic" style of token burning seems much less practical to me. Coming from Aider and trying tools like OpenCode, the "use models to discover the relevant files" etc pattern seems very token heavy and even wasteful - whereas with Aider you include relevant files up front and use your tokens for the real work.

Re: Gemini CLI tips and tricks for agentic coding

#148

Earlier quoted context omitted.

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…

I don't think you can say it learns - and that is part of the issue. Time mentoring a new colleague is well spent making the colleague grow professionally. Time hand-holding an AI agent is wasted when all you guidance inevitably falls out of the context window and it start making the same mistakes again.

> you guidance inevitably falls out of the context window

Yes, for a pure LLM session.

But using GitHub Copilot, the agent server picks out what it thinks is your most important rules, and inserts them as part of the context before running each new prompt.

So it becomes a sort of "long-term memory" outside of the context window.

You can also write your own copilot-instructions.md which is also inserted into the context window.

Re: Gemini CLI tips and tricks for agentic coding

#149
post #60

Earlier quoted context omitted.

There are some clear objective signals that aren’t just user preference. I shelled out the $250 for Gemini’s top tier and am profoundly disappointed. I had forgotten that loops were still a thing. I’ve hit this multiple times in Gemini CLI, and in different projects. It gets stuck in a loop (as in the exact same, usually nonsense, message over and over) and the automated loop detection stops the whole operation. It a…

have you received your money's worth in other products?

Deep Think is TBD. Maybe. So far I like it better than GPT 5.1 Pro, but that came after the initial purchase. I likely won’t renew at this tier.

Re: Gemini CLI tips and tricks for agentic coding

#150

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.

Gemini seriously need a built-in "Plan" mode that will properly prevent it from doing any write operations.

It's pretty good at code review and figuring out massive codebases, but its tendency to just rush in and "fix" things is annoying.

Post reply on HN