Live data from Hacker News

Gemini CLI tips and tricks for agentic coding

github.com

61–70 of 152 posts

Re: Gemini CLI tips and tricks for agentic coding

#61
ymmv, but I think all of this is too much and you generally don't need to think about how to use an AI properly since screaming at it usually works just as well as very fine tuned instructions.

you don't need claude code, gemini-cli or codex I've been doing it raw as a (recent) lazyvim user with a proprietary agent with 3 tools: git, ask and ripgrep and currently gemini 3 is by far the best for me even without all these tricks.

gemini 3 has a very high token density and a significantly larger context than any model that is actually usable, every 'agent' I start shoves 5 things into the context:

- most basic instructions such as: generate git format diff only when editing files and use the git tool to merge it (simplified, it's more structured and deeper than this)

- tree command that respects git ignore

- $(ask "summarize $(git diff)")

- $(ask "compact the readme $(cat README.MD"))

- (ripgrep tools, mcp details, etc)

when the context is too bloated I just tell it to write important new details to README.MD and then start a new agent

https://github.com/kagisearch/ask

Re: Gemini CLI tips and tricks for agentic coding

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

I think both are helpful

1. starting fresh, because of context poisoning / long-term attention issues

2. lots of tools makes the job easier, if you give them a tool discovery tool, (based on Anthropics recent post)

We don't have reliable ways to evaluate all the prompts and related tweaking. I'm working towards this with my agentic setup. Added time travel for sessions based on Dagger yesterday, with forking, cloning, registry probably toda

Re: Gemini CLI tips and tricks for agentic coding

#64
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 cool (/extensions, /model switching, etc.). I think it has the potential to become a lot better and even close to top players.

The correct way of using Gemini CLI is: ABUSE IT! With 1M Context Window (soon to be 2M) and generous daily (free) quota are huge advantages. It's a pity that people don't use it enough (ABUSE it!). I use it as a TUI / CLI tool to orchestrate tasks and workflows.

> Fun fact: I found Gemini CLI pretty good at judging/critiquing code generated by other tools LoL

Recently I even hook it up with homebrew via MCP (other Linux package managers as well?), and a local LLM powered Knowledge/Context Manager (Nowledge Mem), you can get really creative abusing Gemini CLI, unleash the Gemini power.

I've also seen people use Gemini CLI in SubAgents for MCP Processing (it did work and avoided polluting the main context), can't help laughing when I first read this -> https://x.com/goon_nguyen/status/1987720058504982561

Re: Gemini CLI tips and tricks for agentic coding

#65

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.

Re: Gemini CLI tips and tricks for agentic coding

#66
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 pivot it into what I described. Maybe we still need to wait for the next groundbreaking open-source coding agent to come out.

Re: Gemini CLI tips and tricks for agentic coding

#67

Earlier quoted context omitted.

YMMV I guess but it's my goto tool; fast and reliable results at least for my use cases

Agreed. Been using Claude Code daily for the past year and Codex as a fall back when Claude gets stuck. Codex has two problems: it Windows support sucks and it's way to "mission driven" vs the collaborative Claude. Gemini CLI falls somewhere in the middle, has some seriously cool features (Ctrl+X to edit prompt in notepad) and it's web research capability is actually good.

Claude had the same feature for editing the prompt in $EDITOR

Codex prompt editing sucks

Re: Gemini CLI tips and tricks for agentic coding

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

The ability of newer agents to develop plans that been be reviewed and most importantly do a build test modify cycle has really helped. You can task an agent with some junior programmer task and then go off and do something else.

Re: Gemini CLI tips and tricks for agentic coding

#70

Notable re author: “Addy Osmani is an Irish Software Engineer and leader currently working on the Google Chrome web browser and Gemini with Google DeepMind. A developer for 25+ years, he has worked at Google for over thirteen years, focused on making the web low-friction for users and web developers. He is passionate about AI-assisted engineering and developer tools. He previously worked on Fortune 500 sites. Addy is…

He's published 11 books in the past 5 years?

Is he using AI assisted writing, too?

Post reply on HN