<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Terminal on MangoDriod</title><link>https://md.eknath.dev/categories/terminal/</link><description>Recent content in Terminal on MangoDriod</description><generator>Hugo -- 0.141.0</generator><language>en-us</language><lastBuildDate>Mon, 23 Jun 2025 10:00:00 +0530</lastBuildDate><atom:link href="https://md.eknath.dev/categories/terminal/index.xml" rel="self" type="application/rss+xml"/><item><title>Making Your Terminal Fancy on Linux and macOS</title><link>https://md.eknath.dev/posts/shell/fancy-terminal-ui/</link><pubDate>Mon, 23 Jun 2025 10:00:00 +0530</pubDate><guid>https://md.eknath.dev/posts/shell/fancy-terminal-ui/</guid><description>&lt;blockquote>
&lt;p>&amp;ldquo;My terminal looks really bad, while some people have a really cool CLI starting page with their name etc. What should I do so mine looks cool too?&amp;rdquo;&lt;/p>
&lt;/blockquote>
&lt;p>If you&amp;rsquo;re spending a lot of time in your terminal, why not make it a pleasant and productive environment? A well-customized terminal can not only look cool but also boost your productivity. This guide will walk you through various ways to transform your bland terminal into a powerful and visually appealing workspace on Linux and macOS.&lt;/p></description><content:encoded><![CDATA[<blockquote>
<p>&ldquo;My terminal looks really bad, while some people have a really cool CLI starting page with their name etc. What should I do so mine looks cool too?&rdquo;</p>
</blockquote>
<p>If you&rsquo;re spending a lot of time in your terminal, why not make it a pleasant and productive environment? A well-customized terminal can not only look cool but also boost your productivity. This guide will walk you through various ways to transform your bland terminal into a powerful and visually appealing workspace on Linux and macOS.</p>
<h2 id="1-the-shell-prompt-ps1">1. The Shell Prompt (PS1)</h2>
<p>The shell prompt is the first thing you see. Customizing it can provide useful information at a glance.</p>
<h3 id="basic-customization">Basic Customization</h3>
<p>You can customize your prompt by modifying the <code>PS1</code> environment variable in your shell&rsquo;s configuration file (<code>~/.bashrc</code> for Bash, <code>~/.zshrc</code> for Zsh).</p>
<p>For example, to show your username, hostname, and current working directory, you can add this to your config file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>export PS1<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;\u@\h:\w\$ &#34;</span>
</span></span></code></pre></div><h3 id="advanced-prompt-customization-with-starship">Advanced Prompt Customization with Starship</h3>
<p>For a more powerful and visually rich prompt, you can use tools like <a href="https://starship.rs/">Starship</a>. Starship is a cross-shell prompt that is fast, customizable, and works on Linux, macOS, and Windows.</p>
<p><strong>Installation:</strong></p>
<ul>
<li><strong>Linux (and macOS with Homebrew):</strong>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>brew install starship
</span></span></code></pre></div></li>
<li><strong>Other Linux:</strong>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -sS https://starship.rs/install.sh | sh
</span></span></code></pre></div></li>
</ul>
<p><strong>Configuration:</strong></p>
<p>Add the following to the end of your <code>~/.bashrc</code> or <code>~/.zshrc</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>eval <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>starship init bash<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span> <span style="color:#75715e"># for Bash</span>
</span></span><span style="display:flex;"><span>eval <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>starship init zsh<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>  <span style="color:#75715e"># for Zsh</span>
</span></span></code></pre></div><p>Starship is highly configurable. You can find more information in the <a href="https://starship.rs/config/">official documentation</a>.</p>
<h2 id="2-terminal-emulators">2. Terminal Emulators</h2>
<p>The terminal emulator is the application you use to interact with the shell. While the default terminal emulators on Linux and macOS are functional, there are better alternatives with more features and customization options.</p>
<ul>
<li><strong>iTerm2 (macOS):</strong> A powerful replacement for the default Terminal app on macOS. It offers features like split panes, search, and extensive customization.</li>
<li><strong>Alacritty:</strong> A fast, cross-platform, OpenGL terminal emulator.</li>
<li><strong>Kitty:</strong> A feature-rich and hackable GPU-based terminal emulator.</li>
</ul>
<h2 id="3-color-schemes">3. Color Schemes</h2>
<p>A good color scheme can reduce eye strain and make your terminal more readable.</p>
<ul>
<li><strong>Dracula:</strong> A popular dark theme for many applications, including terminals.</li>
<li><strong>Solarized:</strong> A theme with both light and dark variants, designed for readability.</li>
<li><strong>Nord:</strong> A clean and elegant theme with a focus on clarity.</li>
</ul>
<p>Most terminal emulators have built-in support for changing color schemes. You can also find collections of themes online, like <a href="https://iterm2colorschemes.com/">iTerm2 Color Schemes</a>.</p>
<h2 id="4-fonts-with-ligatures">4. Fonts with Ligatures</h2>
<p>Using a font designed for programming can improve readability. Fonts with ligatures combine multiple characters into a single symbol, which can make your code look cleaner.</p>
<ul>
<li><strong>Fira Code:</strong> A popular free monospaced font with programming ligatures.</li>
<li><strong>JetBrains Mono:</strong> A free and open-source font for developers.</li>
<li><strong>Cascadia Code:</strong> A fun, new monospaced font from Microsoft that includes programming ligatures.</li>
</ul>
<p>After installing a font, you&rsquo;ll need to configure your terminal emulator to use it.</p>
<h2 id="5-cool-cli-tools">5. Cool CLI Tools</h2>
<p>Here are some tools that can make your terminal more informative and user-friendly:</p>
<ul>
<li>
<p><strong>Neofetch:</strong> A command-line system information tool that displays a logo of your OS along with system information.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># macOS</span>
</span></span><span style="display:flex;"><span>brew install neofetch
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Linux (Debian/Ubuntu)</span>
</span></span><span style="display:flex;"><span>sudo apt-get install neofetch
</span></span></code></pre></div><p>Add <code>neofetch</code> to the end of your <code>~/.bashrc</code> or <code>~/.zshrc</code> to see it every time you open a new terminal.</p>
</li>
<li>
<p><strong>lsd or exa:</strong> Modern replacements for the <code>ls</code> command with more features and better defaults.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># lsd (macOS)</span>
</span></span><span style="display:flex;"><span>brew install lsd
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># exa (macOS)</span>
</span></span><span style="display:flex;"><span>brew install exa
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># lsd (Linux)</span>
</span></span><span style="display:flex;"><span>sudo apt-get install lsd
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># exa (Linux)</span>
</span></span><span style="display:flex;"><span>sudo apt-get install exa
</span></span></code></pre></div><p>You can alias <code>ls</code> to <code>lsd</code> or <code>exa</code> in your shell&rsquo;s configuration file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>alias ls<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;lsd&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># or</span>
</span></span><span style="display:flex;"><span>alias ls<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;exa&#39;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>bat:</strong> A <code>cat</code> clone with syntax highlighting and Git integration.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># macOS</span>
</span></span><span style="display:flex;"><span>brew install bat
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Linux</span>
</span></span><span style="display:flex;"><span>sudo apt-get install bat
</span></span></code></pre></div><p>You can alias <code>cat</code> to <code>bat</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>alias cat<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;bat&#39;</span>
</span></span></code></pre></div></li>
<li>
<p><strong>zoxide:</strong> A smarter <code>cd</code> command that learns your habits.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># macOS</span>
</span></span><span style="display:flex;"><span>brew install zoxide
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Linux</span>
</span></span><span style="display:flex;"><span>curl -sS https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | bash
</span></span></code></pre></div><p>Add the following to your <code>~/.bashrc</code> or <code>~/.zshrc</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>eval <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>zoxide init bash<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span> <span style="color:#75715e"># for Bash</span>
</span></span><span style="display:flex;"><span>eval <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>zoxide init zsh<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>  <span style="color:#75715e"># for Zsh</span>
</span></span></code></pre></div></li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>By combining these tools and techniques, you can create a terminal environment that is not only beautiful but also tailored to your workflow. Experiment with different tools and configurations to find what works best for you. A personalized terminal can make your command-line experience much more enjoyable and productive.</p>
]]></content:encoded></item><item><title>Recommended Command Line Tools</title><link>https://md.eknath.dev/posts/shell/command-line-tools/</link><pubDate>Tue, 17 Jun 2025 22:46:54 +0530</pubDate><guid>https://md.eknath.dev/posts/shell/command-line-tools/</guid><description>&lt;p>The terminal is already a powerful tool, but the right command-line utilities can make it even better. Here are a few essential tools I use daily that you might find helpful too.&lt;/p>
&lt;h2 id="homebrew">HomeBrew&lt;/h2>
&lt;p>Homebrew is a package manager for macOS (and Linux) that lets you easily install, update, and manage software and developer tools from the command line.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Installation command&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/bin/bash -c &lt;span style="color:#e6db74">&amp;#34;&lt;/span>&lt;span style="color:#66d9ef">$(&lt;/span>curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh&lt;span style="color:#66d9ef">)&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After running the command, restart your terminal, and you&amp;rsquo;re good to go. Before we start installing, let&amp;rsquo;s understand the difference between a &amp;ldquo;formula&amp;rdquo; and a &amp;ldquo;cask&amp;rdquo; in Homebrew.&lt;/p></description><content:encoded><![CDATA[<p>The terminal is already a powerful tool, but the right command-line utilities can make it even better. Here are a few essential tools I use daily that you might find helpful too.</p>
<h2 id="homebrew">HomeBrew</h2>
<p>Homebrew is a package manager for macOS (and Linux) that lets you easily install, update, and manage software and developer tools from the command line.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># Installation command</span>
</span></span><span style="display:flex;"><span>/bin/bash -c <span style="color:#e6db74">&#34;</span><span style="color:#66d9ef">$(</span>curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh<span style="color:#66d9ef">)</span><span style="color:#e6db74">&#34;</span>
</span></span></code></pre></div><p>After running the command, restart your terminal, and you&rsquo;re good to go. Before we start installing, let&rsquo;s understand the difference between a &ldquo;formula&rdquo; and a &ldquo;cask&rdquo; in Homebrew.</p>
<p><strong>Formula:</strong> Command-line tools, libraries, and languages (e.g., Kotlin, Go). No special flags are needed when using <code>brew</code> commands with formulas. <a href="https://formulae.brew.sh/formula/">All Formulas</a></p>
<p><strong>Cask:</strong> GUI applications like Chrome, VSCode, etc. These require a <code>--cask</code> flag for <code>brew</code> operations. <a href="https://formulae.brew.sh/cask/">Cask Directory</a></p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>brew install git             <span style="color:#75715e"># Installing a formula</span>
</span></span><span style="display:flex;"><span>brew install --cask firefox  <span style="color:#75715e"># Installing a cask</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>brew uninstall foo           <span style="color:#75715e"># Remove a package</span>
</span></span><span style="display:flex;"><span>brew upgrade foo             <span style="color:#75715e"># Upgrade a specific package</span>
</span></span><span style="display:flex;"><span>brew list                    <span style="color:#75715e"># See all installed packages</span>
</span></span><span style="display:flex;"><span>brew search foo              <span style="color:#75715e"># Find available packages</span>
</span></span><span style="display:flex;"><span>brew info foo                <span style="color:#75715e"># Get details about a package</span>
</span></span><span style="display:flex;"><span>brew update                  <span style="color:#75715e"># Update Homebrew&#39;s package list</span>
</span></span><span style="display:flex;"><span>brew upgrade                 <span style="color:#75715e"># Upgrade all outdated packages</span>
</span></span></code></pre></div><p>🔗 <a href="https://brew.sh/">HomeBrew-Official</a></p>
<h2 id="ollama---local-and-opensource-llms">Ollama - Local and OpenSource LLMs</h2>
<p>This is an incredibly useful tool that I find myself using constantly. Local models are fantastic for answering general or timeless questions where you need accuracy without requiring up-to-the-minute data. They’re fast, private, work offline, and have another big advantage: 🌱 a reduced environmental impact.</p>
<p><strong>Instructions:</strong></p>
<ol>
<li>Install Ollama by running the official script in your terminal. If you prefer, you can also download it manually from the <a href="https://ollama.com/download">official site</a>.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>curl -fsSL https://ollama.com/install.sh | sh
</span></span></code></pre></div></li>
<li>Browse the <a href="https://ollama.com/search">Model Library</a> to find a model. Keep an eye on the size, as some models can be several gigabytes.</li>
<li>Once you&rsquo;ve picked a model, pull it using the <code>pull</code> command. For example, to get the Llama 3 model:
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ollama pull llama3
</span></span></code></pre></div></li>
<li>After the download is complete, you can run the model to start a chat session. To exit, just type <code>/bye</code>.
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ollama run llama3
</span></span></code></pre></div></li>
</ol>
<p>That&rsquo;s it! Now, anytime you have a question, you can just run <code>ollama run &lt;model_name&gt;</code> to interact with your local LLM.</p>
<table>
  <thead>
      <tr>
          <th>Command</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>ollama serve</code></td>
          <td>Starts the Ollama server (for API access).</td>
      </tr>
      <tr>
          <td><code>ollama create &lt;model&gt;</code></td>
          <td>Creates a new model from a Modelfile.</td>
      </tr>
      <tr>
          <td><code>ollama show &lt;model&gt;</code></td>
          <td>Displays details about a model.</td>
      </tr>
      <tr>
          <td><code>ollama run &lt;model&gt;</code></td>
          <td>Runs a model for interactive chat.</td>
      </tr>
      <tr>
          <td><code>ollama pull &lt;model&gt;</code></td>
          <td>Downloads a model from the library.</td>
      </tr>
      <tr>
          <td><code>ollama list</code></td>
          <td>Lists all downloaded models.</td>
      </tr>
      <tr>
          <td><code>ollama ps</code></td>
          <td>Shows currently running models.</td>
      </tr>
      <tr>
          <td><code>ollama stop &lt;model&gt;</code></td>
          <td>Stops a running model.</td>
      </tr>
      <tr>
          <td><code>ollama rm &lt;model&gt;</code></td>
          <td>Removes a model from your system.</td>
      </tr>
  </tbody>
</table>
<p>Here is an example of how you can download and run another model in one line:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ollama pull mistral <span style="color:#f92672">&amp;&amp;</span> ollama run mistral
</span></span></code></pre></div><p>🔗 <a href="https://ollama.com/">Ollama</a></p>
<h2 id="gemini-cli">Gemini-cli</h2>
<p>Gemini CLI is an open-source tool that brings the power of Google&rsquo;s Gemini models directly into your terminal. It provides lightweight, direct access to the API, making it a versatile utility for a wide range of tasks, from coding and content generation to problem-solving and research.</p>
<h3 id="installation">Installation</h3>
<ol>
<li>Ensure you have Node.js (version 18+). You can check with <code>node -v</code>. If you don&rsquo;t have it, install it with Homebrew:
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>brew install node
</span></span></code></pre></div></li>
<li>Install the Gemini CLI globally using npm:
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>npm install -g @google/gemini-cli
</span></span></code></pre></div></li>
<li>Run the setup and authentication command:
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>gemini
</span></span></code></pre></div>Follow the prompts to choose a theme and log in with your Google account.</li>
</ol>
<p><strong>Troubleshooting Tip:</strong> On some systems, the authentication flow in the terminal might not complete. If this happens, run <code>gemini</code> again, and then check your default web browser for the Google authentication page to complete the login.</p>
<p>⚠️ Unlike Ollama, only the <em>tool</em> is open-source, not the model. Your prompts and data will be processed by Google&rsquo;s servers.</p>
<p>⚠️ The free tier has a rate limit (e.g., 60 requests per minute). You can upgrade to a paid plan to overcome this.</p>
<h3 id="common-commands">Common Commands</h3>
<ul>
<li><code>/chat save &lt;name&gt;</code>: Saves your current chat with a memorable name.</li>
<li><code>/chat list</code>: Lists all your saved chats.</li>
<li><code>/chat resume &lt;name&gt;</code>: Resumes a saved chat session.</li>
<li><code>/compress</code>: Replaces the current chat context with a summary to save tokens.</li>
<li><code>/auth</code>: Manages your authentication settings.</li>
<li><code>/quit</code> or <code>/exit</code>: Exits the tool.</li>
</ul>
<h3 id="switching-to-shell-mode">Switching to Shell Mode</h3>
<p>You can input <code>!</code> to toggle shell mode. For example, type <code>!pwd</code> to see your current directory. The theme will change to indicate you&rsquo;re in shell mode. To return to the chat, just input <code>!</code> again.</p>
<h3 id="providing-context">Providing Context</h3>
<p>Use the <code>@</code> symbol to provide file or directory context for your prompts.</p>
<ul>
<li><code>@path/to/your/file.txt Explain this text file.</code></li>
<li><code>@src/my_project/ Summarize the code in this directory.</code></li>
</ul>
<p>You can find more commands in the <a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/commands.md">official documentation</a>.</p>
<p><a href="https://github.com/google-gemini/gemini-cli?tab=readme-ov-file">Gemini CLI-Github repo</a></p>
<h2 id="duckduckgo">DuckDuckGo</h2>
<p>Sometimes you just need to verify things quickly with a search engine. <code>ddgr</code> brings the DuckDuckGo search engine to your CLI, delivering fast results.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># Installation</span>
</span></span><span style="display:flex;"><span>brew install ddgr
</span></span></code></pre></div><h3 id="common-commands-1">Common Commands</h3>
<p>These are the commands you&rsquo;ll likely use most often:</p>
<table>
  <thead>
      <tr>
          <th>Command</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>ddgr &lt;query&gt;</code></td>
          <td>Perform a search.</td>
      </tr>
      <tr>
          <td><code>ddgr -n &lt;num&gt; &lt;query&gt;</code></td>
          <td>Limit the number of search results.</td>
      </tr>
      <tr>
          <td><code>ddgr -j &lt;query&gt;</code></td>
          <td>Open the first result directly in the browser.</td>
      </tr>
      <tr>
          <td><code>ddgr -w &lt;site&gt; &lt;query&gt;</code></td>
          <td>Restrict the search to a specific site.</td>
      </tr>
      <tr>
          <td><code>ddgr -s &lt;region&gt; &lt;query&gt;</code></td>
          <td>Set the search region (e.g., <code>us-en</code>).</td>
      </tr>
      <tr>
          <td><code>ddgr -x &lt;query&gt;</code></td>
          <td>Display URLs only, without opening a browser.</td>
      </tr>
      <tr>
          <td><code>ddgr -C &lt;query&gt;</code></td>
          <td>Colorize the output for easier reading.</td>
      </tr>
      <tr>
          <td><code>ddgr -l</code></td>
          <td>List your search history.</td>
      </tr>
      <tr>
          <td><code>ddgr -c</code></td>
          <td>Clear your search history.</td>
      </tr>
      <tr>
          <td><code>ddgr --disable-safe</code></td>
          <td>Disable safe search filtering.</td>
      </tr>
      <tr>
          <td><code>ddgr -h</code></td>
          <td>Show the help menu.</td>
      </tr>
  </tbody>
</table>
<h3 id="navigation-commands">navigation Commands</h3>
<p>When results are displayed, you can use these keys to navigate:</p>
<table>
  <thead>
      <tr>
          <th>Shortcut / Action</th>
          <th>What it does</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>[number]</code></td>
          <td>Open the result with that number in your browser.</td>
      </tr>
      <tr>
          <td><code>n</code> or <code>N</code></td>
          <td>Show the next page of results.</td>
      </tr>
      <tr>
          <td><code>p</code> or <code>P</code></td>
          <td>Show the previous page of results.</td>
      </tr>
      <tr>
          <td><code>o [numbers]</code></td>
          <td>Open multiple results (e.g., <code>o 1 3 5</code>).</td>
      </tr>
      <tr>
          <td><code>q</code></td>
          <td>Quit ddgr.</td>
      </tr>
  </tbody>
</table>
<p>Here’s an example I use extensively:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># Shows 5 results from GitHub for &#34;awesome shell scripts&#34;</span>
</span></span><span style="display:flex;"><span>ddgr -n <span style="color:#ae81ff">5</span> -w github.com <span style="color:#e6db74">&#34;awesome shell scripts&#34;</span>
</span></span></code></pre></div><h3 id="profile-configuration">Profile Configuration</h3>
<p>You can customize <code>ddgr</code>&rsquo;s default behavior by editing the <code>~/.ddgrrc</code> file (<code>vi ~/.ddgrrc</code>). Here are some of the options you can configure:</p>
<table>
  <thead>
      <tr>
          <th>Option</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>-n &lt;number&gt;</code></td>
          <td>Set the default number of search results per page.</td>
      </tr>
      <tr>
          <td><code>-C</code></td>
          <td>Enable colorized output.</td>
      </tr>
      <tr>
          <td><code>--disable-safe</code></td>
          <td>Disable safe search.</td>
      </tr>
      <tr>
          <td><code>-x</code></td>
          <td>Show URLs only by default.</td>
      </tr>
      <tr>
          <td><code>-r &lt;browser&gt;</code></td>
          <td>Set the browser for opening results (e.g., <code>firefox</code>).</td>
      </tr>
      <tr>
          <td><code>-s &lt;region&gt;</code></td>
          <td>Set the default search region (e.g., <code>us-en</code>).</td>
      </tr>
      <tr>
          <td><code>-w &lt;site&gt;</code></td>
          <td>Restrict searches to a specific site by default.</td>
      </tr>
      <tr>
          <td><code>--json</code></td>
          <td>Output results in JSON format (useful for scripting).</td>
      </tr>
  </tbody>
</table>
<p>🔗 <a href="https://github.com/jarun/ddgr">ddgr-Repo</a></p>
<h2 id="git-cli">Git CLI</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>brew install git
</span></span></code></pre></div><p>I&rsquo;m sure you&rsquo;re familiar with the basic git commands, but you can create powerful aliases to make your workflow faster. For example, you can run <code>git st</code> instead of <code>git status</code>.</p>
<ol>
<li>Find your global git config file by running <code>git config --list --show-origin</code>.</li>
<li>Open that file (e.g., <code>vi ~/.gitconfig</code>) and add your aliases.</li>
</ol>
<p>Here is an example <code>~/.gitconfig</code> file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#66d9ef">[credential]</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">helper</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">store</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[user]</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">name</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">Eganathan R
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    email = md-email@gmail.com</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[filter &#34;lfs&#34;]</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">smudge</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">git-lfs smudge -- %f
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    process = git-lfs filter-process
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    required = true
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    clean = git-lfs clean -- %f</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[init]</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">defaultBranch</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">master</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[http]</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">proxy</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">http://127.0.0.1:xxxx</span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[alias]</span>
</span></span><span style="display:flex;"><span>    <span style="color:#a6e22e">st</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">status
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    co = checkout
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    br = branch
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    ci = commit
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    lg = log --oneline --graph --decorate # Pretty and compact log view</span>
</span></span></code></pre></div><h2 id="podman-optional">Podman (Optional)</h2>
<p>Podman is a powerful, daemonless(It does not require a background service) container engine for developing, managing, and running containers. It provides a command-line interface that is compatible with Docker, making it an excellent alternative for container management without requiring a central daemon, i most use podman only for experimentation.</p>
<h3 id="installation-1">Installation</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>brew install podman
</span></span></code></pre></div><p>After installation, you may need to initialize a Podman machine, which is a lightweight virtual machine for running containers on macOS.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>podman machine init
</span></span><span style="display:flex;"><span>podman machine start
</span></span></code></pre></div><h3 id="common-commands-2">Common Commands</h3>
<p>Many Podman commands are identical to their Docker counterparts, so you can often use <code>podman</code> as a drop-in replacement for <code>docker</code>.</p>
<table>
  <thead>
      <tr>
          <th>Command</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>podman pull &lt;image&gt;</code></td>
          <td>Pull an image from a container registry.</td>
      </tr>
      <tr>
          <td><code>podman push &lt;image&gt;</code></td>
          <td>Push an image to a container registry.</td>
      </tr>
      <tr>
          <td><code>podman build -t &lt;tag&gt; .</code></td>
          <td>Build an image from a Dockerfile.</td>
      </tr>
      <tr>
          <td><code>podman images</code></td>
          <td>List all local images.</td>
      </tr>
      <tr>
          <td><code>podman run &lt;image&gt;</code></td>
          <td>Run a command in a new container.</td>
      </tr>
      <tr>
          <td><code>podman ps</code></td>
          <td>List all running containers.</td>
      </tr>
      <tr>
          <td><code>podman ps -a</code></td>
          <td>List all containers (running and stopped).</td>
      </tr>
      <tr>
          <td><code>podman stop &lt;container&gt;</code></td>
          <td>Stop one or more running containers.</td>
      </tr>
      <tr>
          <td><code>podman rm &lt;container&gt;</code></td>
          <td>Remove one or more containers.</td>
      </tr>
      <tr>
          <td><code>podman rmi &lt;image&gt;</code></td>
          <td>Remove one or more images.</td>
      </tr>
      <tr>
          <td><code>podman machine list</code></td>
          <td>List available Podman virtual machines.</td>
      </tr>
      <tr>
          <td><code>podman machine stop</code></td>
          <td>Stop the Podman virtual machine.</td>
      </tr>
  </tbody>
</table>
<p>🔗 <a href="https://podman.io/">Podman-Official</a></p>
<p>I&rsquo;m certain this will help you. There are many other interesting command-line tools out there (like <code>starship</code>, <code>tmux</code>), but I consider them more for customization.</p>
<p>Thanks for reading, and have a great day ☺️</p>
]]></content:encoded></item></channel></rss>