Tips for Gemini CLI Users
This guide provides helpful tips for users who are migrating from or using both Gemini CLI and LLxprt Code.
Syncing Configurations with Symbolic Links
If you're using both Gemini CLI and LLxprt Code, you can keep your configurations in sync using symbolic links. This prevents the need for manual copying or rsync.
Setup Instructions
# Link settings file
ln -s ~/.gemini/settings.json ~/.llxprt/settings.json
# Link context file (GEMINI.md/LLXPRT.md)
ln -s ~/.gemini/GEMINI.md ~/.llxprt/LLXPRT.md
# Link environment variables
ln -s ~/.gemini/.env ~/.llxprt/.env
Platform-Specific Examples
Termux (Android)
ln -s /data/data/com.termux/files/home/.gemini/settings.json /data/data/com.termux/files/home/.llxprt/settings.json
ln -s /data/data/com.termux/files/home/.gemini/GEMINI.md /data/data/com.termux/files/home/.llxprt/LLXPRT.md
ln -s /data/data/com.termux/files/home/.gemini/.env /data/data/com.termux/files/home/.llxprt/.env
macOS/Linux
ln -s ~/.gemini/settings.json ~/.llxprt/settings.json
ln -s ~/.gemini/GEMINI.md ~/.llxprt/LLXPRT.md
ln -s ~/.gemini/.env ~/.llxprt/.env
Important Compatibility Notes
While the symlink approach works for many use cases, please be aware that LLxprt Code and Gemini CLI configurations are not 100% compatible due to the following differences:
Key Differences
-
Authentication
- LLxprt Code supports multiple auth providers (OAuth, API keys for different providers)
- Auth configuration structure differs from Gemini CLI
- Use
/authcommand to set up authentication in LLxprt Code
-
Model Configuration
- LLxprt Code uses a profile-based system instead of a single default model
- Multiple models can be configured and switched between easily
- Use
/profile saveand/profile set-defaultto manage model profiles
-
Provider Support
- LLxprt Code supports multiple AI providers (OpenAI, Anthropic, Google)
- Provider-specific settings may not transfer from Gemini CLI
- Each provider has its own configuration options
-
Settings Structure
- Some settings have different names or structures
- New settings in LLxprt Code that don't exist in Gemini CLI
- Provider-specific tool format overrides
Testing Your Setup
After creating the symbolic links, test the configuration:
- Start LLxprt Code and check if your settings loaded correctly
- Test authentication with
/auth status - Check your model profiles with
/profile list - If you encounter issues, you may need to:
- Set up authentication again using
/auth - Create new model profiles using
/profile save
- Set up authentication again using
When to Use Separate Configurations
Consider maintaining separate configurations if you:
- Use different models or providers in each tool
- Need different authentication methods
- Have customized settings specific to each tool
- Experience conflicts with the shared configuration
Understanding Authentication in LLxprt Code
Mixed Authentication Strategy
LLxprt Code offers a unique capability that allows you to use Google authentication for Google-specific features (web search, web fetch) while using API keys for other providers. This gives you the best of both worlds:
- Google Authentication (
/auth): Provides access to Google Search grounding and other Google-specific features - Provider API Keys: Use different AI providers (OpenAI, Anthropic, etc.) while maintaining Google features
Setting API Keys
LLxprt Code provides two commands for managing API keys:
/key Command
Sets an API key directly in the current session:
/key sk-your-api-key-here
- The key is stored in memory for the current session only
- Useful for quick testing or temporary access
- Does not persist between sessions
/keyfile Command
Loads an API key from a file:
/keyfile ~/.keys/openai.txt
- More secure than typing keys directly
- Keeps sensitive keys out of command history
- Allows different key files for different providers
Example: Using Google Auth with OpenAI
-
First, authenticate with Google for web features:
/auth -
Switch to OpenAI as your AI provider:
/provider openai -
Set your OpenAI API key:
/keyfile ~/.keys/openai.txt
Now you can use OpenAI models while still having access to Google's web search and web fetch capabilities!
Migration Tips
If you're migrating from Gemini CLI to LLxprt Code:
-
Start Fresh (Recommended)
- Run LLxprt Code without symlinks first
- Set up authentication:
/auth - Configure your preferred model:
/model <model-name> - Save as default profile:
/profile save defaultand/profile set-default default
-
Gradual Migration
- Start with symlinking only
.envfor API keys - Manually configure LLxprt Code-specific settings
- Test thoroughly before symlinking other files
- Start with symlinking only
-
Check MCP Servers
- MCP server configurations should work if paths are correct
- You may need to update paths if they're absolute and platform-specific
Troubleshooting
Common Issues
-
Authentication Failures
- Remove the symlinked settings.json
- Run
/authto set up authentication properly for LLxprt Code - Save your configuration
-
Model Not Found
- LLxprt Code may not recognize Gemini CLI's default model setting
- Use
/modelto see available models - Set your preferred model and save a profile
-
MCP Server Errors
- Check that MCP server paths exist and are executable
- Update paths in settings if needed
- Some MCP servers may need to be reinstalled for LLxprt Code
Getting Help
- Check the LLxprt Code documentation
- Report issues on GitHub
- See the CLI commands reference for all available commands
- For troubleshooting common issues, see the troubleshooting guide