Skip to content

feat: native Gemini CLI support via GEMINI.md configuration files#565

Open
ChetanTekur wants to merge 2 commits intogarrytan:mainfrom
ChetanTekur:gemini-config-fix
Open

feat: native Gemini CLI support via GEMINI.md configuration files#565
ChetanTekur wants to merge 2 commits intogarrytan:mainfrom
ChetanTekur:gemini-config-fix

Conversation

@ChetanTekur
Copy link
Copy Markdown

What

Adds native support for the Gemini CLI by migrating hardcoded CLAUDE.md references to a dynamic configuration file (GEMINI.md for Gemini, CLAUDE.md for Claude/Codex).

Why

Currently, gstack assumes CLAUDE.md is the universal source of truth for project configurations. When using the Gemini CLI, agents attempting to update or read configurations default to CLAUDE.md. This creates friction, confuses the agent, and pollutes the workspace with Claude-specific files for non-Claude users.

How

  1. Dynamic Config Path: Added configFile to HostPaths (scripts/resolvers/types.ts) and updated existing resolvers (testing.ts, utility.ts) to use ctx.paths.configFile instead of hardcoded strings.
  2. Template Tag: Added a {{CONFIG_FILE}} resolver (scripts/resolvers/index.ts) for future template authoring.
  3. Generator Pipeline: Added a global replacement in scripts/gen-skill-docs.ts so any static CLAUDE.md references in .tmpl files are automatically rewritten to GEMINI.md when compiling for the --host gemini target.
  4. Setup Script: Updated ./setup to perform the CLAUDE.md -> GEMINI.md translation via sed when installing skills into ~/.gemini/skills/gstack.
  5. Documentation: Added GEMINI.md and GEMINI.md.tmpl at the root.

This ensures 100% backward compatibility for Claude and Codex hosts while providing a seamless, native experience for Gemini users.

Testing

  • Rebased against main and resolved merge conflicts.
  • Verified TypeScript compilation via bun run build.
  • Verified the setup script correctly formats .agents/skills for the Gemini host without altering Claude's output.

- Update templates and resolvers to use `ctx.paths.configFile` instead of hardcoding `CLAUDE.md`
- Add dynamic `CONFIG_FILE` resolver for future template usage
- Apply global replacement in `gen-skill-docs.ts` so `CLAUDE.md` references become `GEMINI.md` for the gemini host
- Update `setup` to remap `CLAUDE.md` to `GEMINI.md` when installing the skills
- Provide `GEMINI.md` and `GEMINI.md.tmpl` configuration docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant