Gemini CLI
Set up dkod with Gemini CLI — Google's agentic coding CLI.
Quick Setup
Paste the prompt below into your Gemini CLI session. It will automatically install and configure the dkod CLI.
Install MCP
Connect Gemini CLI to dkod's MCP server for direct access to semantic code tools.
Cloud (dkod.io)
Add to your Gemini settings file (~/.gemini/settings.json):
{
"mcpServers": {
"dkod": {
"url": "https://api.dkod.io/mcp"
}
}
}Gemini CLI will prompt for authentication on first use. Once connected, dkod tools are available directly in your session.
Self-Hosted
For self-hosted setups, see the Self-Hosted quickstart.
Point to your local dkod server in ~/.gemini/settings.json:
{
"mcpServers": {
"dkod": {
"url": "http://localhost:8080/mcp"
}
}
}For self-hosted, set your auth token before use:
export DKOD_AUTH_TOKEN=your-secret-tokenInstall the CLI
# Install via Cargo (requires Rust)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cargo install dk-cliInitialize & Authenticate
# Authenticate via browser (cloud only)
dk login
# Open a session (auto-detects from git remote)
dk initFor self-hosted setups, skip
dk loginand setexport DKOD_AUTH_TOKEN=your-secret-tokenandexport DKOD_GRPC_ADDR=localhost:50051, then rundk init.
Usage
Once configured, you can use the dkod CLI in your workflow:
# Search code semantically
dk search "authentication middleware"
# Check project status
dk status
# View changes
dk diff
# Commit and push
dk commit -m "Fix token refresh logic"
dk push