{"id":6724,"date":"2025-11-19T22:12:14","date_gmt":"2025-11-19T22:12:14","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=6724"},"modified":"2026-03-05T16:42:37","modified_gmt":"2026-03-05T16:42:37","slug":"how-to-use-the-gemini-cli-vps-template","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-use-the-gemini-cli-vps-template\/","title":{"rendered":"How to Use the Gemini CLI VPS Template"},"content":{"rendered":"<p>Google Gemini CLI is an open-source command-line interface that allows you to interact with Google&rsquo;s Gemini language model directly from your terminal. With it, you can run prompts, manage conversations, execute shell commands, and integrate AI into development workflows using natural language. The &ldquo;Ubuntu 24.04 with Gemini CLI&rdquo; VPS template comes with Gemini CLI pre-installed, so you can start using it right away.<\/p><h2 class=\"wp-block-heading\" id=\"h-accessing-your-vps\">Accessing Your VPS<\/h2><p>After deploying the template, you can access Gemini CLI in two ways:<\/p><ul class=\"wp-block-list\">\r\n<li><strong>Via SSH<\/strong>: Use a terminal on your computer to connect with: <code>ssh root@[your-vps-ip]<\/code><\/li>\r\n<li><strong>Via Browser Terminal<\/strong>: Open your VPS dashboard in hPanel and launch the browser terminal directly from there.<\/li>\r\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-using-gemini-cli\">Using Gemini CLI<\/h2><p>Once connected, you can start using Gemini CLI immediately. To begin, authenticate your Google account by running:<\/p><pre class=\"wp-block-code\"><code>gemini<\/code><\/pre><p>On first launch, you&rsquo;ll be prompted to:<\/p><ol class=\"wp-block-list\">\r\n<li>Choose a login method (recommended: &ldquo;Login with Google&rdquo;)<\/li>\r\n<li>Complete authentication in your browser<\/li>\r\n<\/ol><p>If you&rsquo;re using Browser terminal and select the authentication method &ldquo;Login with Google&rdquo;, you will need to restart the Gemini to copy the URL. Just close the terminal entirely and re-open it again, enter <code>gemini<\/code> one more time, and you will be able to paste your verification code.<\/p><p>With a personal Google account, you get 60 requests per minute and 1,000 requests per day at no charge.<\/p><h2 class=\"wp-block-heading\" id=\"h-basic-commands\">Basic Commands<\/h2><p>Here are some useful commands to get started.<\/p><p>Start an interactive session:<\/p><pre class=\"wp-block-code\"><code>gemini<\/code><\/pre><p>Run a one-line prompt:<\/p><pre class=\"wp-block-code\"><code>gemini -p \"Explain the difference between HTTP and HTTPS\"<\/code><\/pre><p>View available commands and keyboard shortcuts:<\/p><p>Type <code>\/<\/code> within the interactive session or run:<\/p><pre class=\"wp-block-code\"><code>gemini --help<\/code><\/pre><p>Toggle shell mode (to run direct shell commands):<\/p><p>Press <code>!<\/code> in the message box to switch between Gemini and shell mode.<\/p><h2 class=\"wp-block-heading\" id=\"h-advanced-features\">Advanced Features<\/h2><p>Gemini CLI supports powerful built-in tools and customization:<\/p><p><strong>Built-in Tools:<\/strong><\/p><ul class=\"wp-block-list\">\r\n<li>Google Search grounding for real-time information<\/li>\r\n<li>File operations for reading and manipulating files<\/li>\r\n<li>Shell command execution<\/li>\r\n<li>Web page fetching<\/li>\r\n<\/ul><p><strong>MCP Server Integration:<\/strong><\/p><p>Extend Gemini CLI with custom tools by configuring MCP servers in <code>~\/.gemini\/settings.json<\/code>:<\/p><pre class=\"wp-block-code\"><code>&gt; @github List my open pull requests\r\n&gt; @slack Send a summary to #dev channel<\/code><\/pre><p><strong>Custom Commands:<\/strong><\/p><p>Create reusable commands with <code>\/command<\/code> for repetitive tasks.<\/p><p><strong>Context Files:<\/strong><\/p><p>Add a <code>GEMINI.md<\/code> file to your project for persistent context.<\/p><p><strong>Output Formats:<\/strong><\/p><p>Use <code>--output-format json<\/code> for structured output in scripts:<\/p><pre class=\"wp-block-code\"><code>gemini -p \"Analyze this codebase\" --output-format json<\/code><\/pre><h2 class=\"wp-block-heading\" id=\"h-getting-started\">Getting Started<\/h2><p>The &ldquo;Ubuntu 24.04 with Gemini CLI&rdquo; template gives you everything needed to begin working with Gemini from the command line. With the CLI already installed and ready, you can immediately start creating prompts, building automations, or integrating Gemini into your development environment. For advanced features and documentation, visit the official <a href=\"https:\/\/docs.cloud.google.com\/gemini\/docs\/codeassist\/gemini-cli\" target=\"_blank\" rel=\"noopener\">Gemini CLI documentation<\/a> or the <a href=\"https:\/\/github.com\/google-gemini\/gemini-cli\" target=\"_blank\" rel=\"noopener\">GitHub repository<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Gemini CLI is an open-source command-line interface that allows you to interact with Google&rsquo;s Gemini language model directly from your terminal. With it, you&#8230;<\/p>\n","protected":false},"author":568,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[206],"tags":[],"class_list":["post-6724","post","type-post","status-publish","format-standard","hentry","category-vps-os-and-templates"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/how-to-use-the-gemini-cli-vps-template","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/6724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/568"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=6724"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/6724\/revisions"}],"predecessor-version":[{"id":6726,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/6724\/revisions\/6726"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=6724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=6724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=6724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}