@ikyyofc/gemini-cli
v5.0.8
Published
AI Agent CLI — native function calling · GEMINI.md context · extensions
Readme
Gemini CLI 🤖
AI Agent CLI — native function calling · GEMINI.md context · extension system
██████╗ ███████╗███╗ ███╗██╗███╗ ██╗██╗
██╔════╝ ██╔════╝████╗ ████║██║████╗ ██║██║
██║ ███╗█████╗ ██╔████╔██║██║██╔██╗ ██║██║
██║ ██║██╔══╝ ██║╚██╔╝██║██║██║╚██╗██║██║
╚██████╔╝███████╗██║ ╚═╝ ██║██║██║ ╚████║██║
╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝Instalasi
npm install
chmod +x index.js
npm link # optional: pakai sebagai `gemini` di terminalPenggunaan
gemini # interactive agent
gemini "buatkan REST API di ./api" # one-shot
gemini --system "Kamu senior backend engineer"
gemini --file ./app.js "jelaskan kode ini"
gemini --yolo "refactor semua file di src/"
gemini --chat # plain chat tanpa toolsGEMINI.md — Context Files
Buat GEMINI.md di lokasi berikut (dimuat hierarki, seperti Gemini CLI asli):
| Lokasi | Scope |
|--------|-------|
| ~/.gemini/GEMINI.md | Global semua project |
| ./GEMINI.md | Project root (sampai .git) |
Support import antar file:
@./components/style.md
@../shared/conventions.mdCommands:
/memory show → tampilkan semua context yang dimuat
/memory reload → reload dari disk
/memory add <text> → append ke ~/.gemini/GEMINI.mdExtensions
Manifest: ~/.gemini/extensions/<name>/gemini-extension.json
{
"name": "my-ext",
"version": "1.0.0",
"description": "...",
"contextFileName": "GEMINI.md",
"enabled": true,
"commands": {
"do-thing": {
"description": "Does a thing",
"prompt": "Do this: {{args}}"
}
}
}Commands:
/ext list
/ext install /path/to/ext
/ext install https://github.com/user/repo
/ext uninstall <name>
/ext enable / disable <name>
/ext update <name>Custom commands dipanggil: /code-reviewer:review ./src/app.js
Tools (Native Function Calling)
| Tool | Aksi |
|------|------|
| read_file | Baca file |
| write_file | Tulis/overwrite file |
| patch_file | Edit bagian spesifik |
| append_file | Append ke file |
| list_dir | List direktori |
| find_files | Cari file (glob) |
| search_in_files | Grep dalam file |
| run_shell | Jalankan shell command |
| create_dir | Buat direktori |
| delete_file | Hapus file |
| move_file | Pindah/rename |
| get_env | Info environment |
| read_url | Fetch URL / API |
Struktur
gemini-cli/
├── index.js ← CLI entry + REPL + commands
├── GEMINI.md ← Project context (auto-loaded)
├── package.json
├── src/
│ ├── gemini.js ← API client (native function calling)
│ ├── tools.js ← functionDeclarations + executor
│ ├── agent.js ← ReAct loop
│ ├── memory.js ← GEMINI.md hierarchy loader
│ ├── extensions.js ← Extension manager
│ └── renderer.js ← Terminal UI + markdown
└── extensions/
└── code-reviewer/
├── gemini-extension.json
└── GEMINI.md
~/.gemini/ ← Global config dir
├── GEMINI.md
├── extensions/
└── commands/