<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shahid</title>
    <description>The latest articles on DEV Community by Shahid (@shahidkhans).</description>
    <link>https://dev.to/shahidkhans</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F390826%2Fd32a69a7-5c57-4c4d-99a5-4403af1e50fa.jpeg</url>
      <title>DEV Community: Shahid</title>
      <link>https://dev.to/shahidkhans</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shahidkhans"/>
    <language>en</language>
    <item>
      <title>npm vs pnpm: The Ultimate Command Comparison Cheat Sheet</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Fri, 22 Aug 2025 13:49:58 +0000</pubDate>
      <link>https://dev.to/shahidkhans/npm-vs-pnpm-the-ultimate-command-comparison-cheat-sheet-pp0</link>
      <guid>https://dev.to/shahidkhans/npm-vs-pnpm-the-ultimate-command-comparison-cheat-sheet-pp0</guid>
      <description>&lt;p&gt;pnpm and npm are both package managers for JavaScript, but they handle dependency installation and management differently. &lt;strong&gt;Direct command translation between npm and pnpm is nearly 1:1&lt;/strong&gt;—most operations you run in npm can be run in pnpm with the same arguments, but under the hood, pnpm is typically faster and far more disk-efficient due to its unique content-addressable storage approach and symlinking strategy.&lt;/p&gt;

&lt;p&gt;Below is a direct, &lt;strong&gt;command-by-command comparison&lt;/strong&gt; between npm and pnpm for common package management tasks. The table uses &lt;code&gt;npm&lt;/code&gt; as the reference, with the equivalent &lt;code&gt;pnpm&lt;/code&gt; command, and notes any important behavioral differences.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;npm Command&lt;/th&gt;
&lt;th&gt;pnpm Command&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Initialize project&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both create &lt;code&gt;package.json&lt;/code&gt;; behavior identical.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Install all dependencies&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pnpm uses a global store and symlinks for speed/space; npm duplicates packages.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Add dependency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm add &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm add &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both save to &lt;code&gt;package.json&lt;/code&gt; by default; options like &lt;code&gt;--save-dev&lt;/code&gt; work the same.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Add dev dependency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm add -D &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm add -D &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both add to &lt;code&gt;devDependencies&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Add optional dependency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm add -O &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm add -O &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both add to &lt;code&gt;optionalDependencies&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Add global package&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm add -g &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm add -g &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pnpm's global store is more efficient.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Remove package&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm remove &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm remove &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both remove from &lt;code&gt;package.json&lt;/code&gt; and &lt;code&gt;node_modules&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Update package&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm update &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm update &amp;lt;package&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pnpm updates from its global store, often faster.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Check outdated packages&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm outdated&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm outdated&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both show outdated packages.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Run script&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm run &amp;lt;script&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm &amp;lt;script&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pnpm does not require &lt;code&gt;run&lt;/code&gt; keyword if script exists in &lt;code&gt;package.json&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Run command&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npx &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm dlx &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pnpm uses &lt;code&gt;dlx&lt;/code&gt; to download and run commands like &lt;code&gt;npx&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prune node_modules&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm prune&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm prune&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;pnpm &lt;strong&gt;always&lt;/strong&gt; removes extraneous/orphaned packages, no package args allowed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;List installed packages&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both list dependency trees.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Audit for vulnerabilities&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm audit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pnpm audit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Both check for security issues.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Install pnpm globally&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm install -g pnpm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;–&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pnpm&lt;/code&gt; can be installed via npm or other methods.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Key Differences Under the Hood&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Installation Speed &amp;amp; Disk Space&lt;/strong&gt;: pnpm is typically much faster and uses far less disk space than npm, especially in large projects, because it stores each package version once globally and symlinks into project &lt;code&gt;node_modules&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency Resolution&lt;/strong&gt;: pnpm enforces &lt;strong&gt;strict&lt;/strong&gt; dependency resolution, which can help avoid "phantom" dependencies (packages not listed in &lt;code&gt;package.json&lt;/code&gt; but still accessible). npm’s flattened &lt;code&gt;node_modules&lt;/code&gt; can sometimes allow this.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monorepo/Workspaces&lt;/strong&gt;: pnpm has built-in, optimized support for monorepos and workspaces; npm requires extra configuration for similar features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem&lt;/strong&gt;: npm has the largest ecosystem and widest compatibility; pnpm’s is growing but smaller.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Global Store&lt;/strong&gt;: pnpm’s global store is a major architectural difference—reducing duplication across all projects on your system.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;When to Use Which&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use npm&lt;/strong&gt; if you want maximum ecosystem compatibility, are working on small projects, or need the broadest community support.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use pnpm&lt;/strong&gt; if you value disk space, installation speed, strict dependency isolation, or are managing large projects/monorepos.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Summary&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;For most day-to-day commands, just replace &lt;code&gt;npm&lt;/code&gt; with &lt;code&gt;pnpm&lt;/code&gt;.&lt;/strong&gt; The key differences are internal (speed, disk usage, dependency resolution), not in the command syntax. However, pnpm’s architecture means your projects will install faster, use less disk space, and be more strictly isolated—benefits that grow with project size and complexity.&lt;/p&gt;

&lt;p&gt;If you need a &lt;strong&gt;specific npm command translated to pnpm&lt;/strong&gt; that isn’t listed above, just ask—the mapping is nearly always straightforward!&lt;/p&gt;

</description>
      <category>npm</category>
      <category>pnpm</category>
      <category>node</category>
      <category>programming</category>
    </item>
    <item>
      <title>From Zero to AI-Powered Developer: Your Complete Claude Code CLI Setup Guide</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Wed, 06 Aug 2025 06:43:45 +0000</pubDate>
      <link>https://dev.to/shahidkhans/from-zero-to-ai-powered-developer-your-complete-claude-code-cli-setup-guide-4l9i</link>
      <guid>https://dev.to/shahidkhans/from-zero-to-ai-powered-developer-your-complete-claude-code-cli-setup-guide-4l9i</guid>
      <description>&lt;p&gt;&lt;em&gt;Setting up your development environment with AI assistance used to be a pipe dream. Today, it's a 10-minute process that could transform how you write code forever. Here's everything you need to know to get Claude Code running on your system—from installation to your first AI-powered commit.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The landscape of software development is shifting rapidly, and at the center of this transformation is &lt;strong&gt;Claude Code&lt;/strong&gt;—Anthropic's command-line AI assistant that brings enterprise-level coding capabilities directly to your terminal. Whether you're a seasoned developer or just starting your coding journey, this comprehensive guide will get you up and running with one of 2025's most powerful development tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Claude Code Setup Matters More Than Ever&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before diving into the technical details, it's worth understanding what makes Claude Code different from other AI coding tools. Unlike browser-based chatbots or IDE plugins that work in isolation, Claude Code operates as a &lt;strong&gt;full-fledged development partner&lt;/strong&gt; that can read your entire codebase, understand your project architecture, and make coordinated changes across multiple files simultaneously.&lt;/p&gt;

&lt;p&gt;The setup process might seem straightforward, but getting it right from the beginning can mean the difference between a seamless development experience and hours of troubleshooting down the line.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Pre-Flight Check: System Requirements That Actually Matter&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Baseline Requirements&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Before you begin, ensure your system meets these essential requirements:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Operating Systems&lt;/strong&gt;: macOS 10.15+, Ubuntu 20.04+/Debian 10+, or Windows 10+ (with WSL 1, WSL 2, or Git for Windows)&lt;br&gt;
&lt;strong&gt;Hardware&lt;/strong&gt;: 4GB+ RAM minimum&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Software&lt;/strong&gt;: Node.js 18+ (LTS version strongly recommended)&lt;br&gt;
&lt;strong&gt;Network&lt;/strong&gt;: Stable internet connection for authentication and AI processing&lt;br&gt;
&lt;strong&gt;Shell Environment&lt;/strong&gt;: Works optimally with Bash, Zsh, or Fish&lt;br&gt;
&lt;strong&gt;Geographic Location&lt;/strong&gt;: Must be in an Anthropic-supported country&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;The Often-Overlooked Details&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;What the documentation doesn't emphasize enough is that &lt;strong&gt;your shell choice can significantly impact your experience&lt;/strong&gt;. While Claude Code works across different shells, Bash and Zsh users report the most stable experience, particularly when integrating with IDE workflows and managing complex project structures.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Installation Methods: Choosing Your Path to Success&lt;/strong&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Method 1: NPM Installation (The Reliable Standard)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For most developers, the NPM route provides the most predictable setup experience:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @anthropic-ai/claude-code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Critical Warning&lt;/strong&gt;: Never use &lt;code&gt;sudo&lt;/code&gt; with this command. The &lt;code&gt;sudo npm install -g&lt;/code&gt; approach can create permission issues and security vulnerabilities that will plague your entire setup. If you encounter permission errors, configure your npm permissions properly or consider the local installation method instead.&lt;/p&gt;

&lt;p&gt;This approach works best when you have a properly configured Node.js environment and npm permissions set up correctly on your system.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Method 2: Native Binary Installation (The Cutting-Edge Choice)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;For developers who want access to the latest features or need to avoid npm permission complexities entirely, the native binary installation offers a compelling alternative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For macOS, Linux, and WSL:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install stable version (recommended for most users)&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://claude.ai/install.sh | bash

&lt;span class="c"&gt;# Install latest version (for early adopters)&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://claude.ai/install.sh | bash &lt;span class="nt"&gt;-s&lt;/span&gt; latest

&lt;span class="c"&gt;# Install specific version (for compatibility requirements)&lt;/span&gt;
curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://claude.ai/install.sh | bash &lt;span class="nt"&gt;-s&lt;/span&gt; 1.0.58
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For Windows PowerShell:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install stable version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;irm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://claude.ai/install.ps1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;iex&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="c"&gt;# Install latest version&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;scriptblock&lt;/span&gt;&lt;span class="p"&gt;]::&lt;/span&gt;&lt;span class="n"&gt;Create&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;irm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https://claude.ai/install.ps1&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The native binary installation often provides better performance and eliminates dependency conflicts, making it particularly attractive for developers working in complex environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Method 3: Local Installation Migration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you already have a global npm installation and are experiencing autoupdater permission issues, Claude Code provides a seamless migration path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude migrate-installer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command transitions your installation to a local setup that avoids common permission pitfalls. Some users may be automatically migrated to this method during updates.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Platform-Specific Considerations That Make or Break Your Setup&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Windows: Navigating the Complexity&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Windows users have two primary paths, each with distinct advantages:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 1: WSL Integration (Strongly Recommended)&lt;/strong&gt;&lt;br&gt;
Both WSL 1 and WSL 2 are fully supported, but the experience is significantly smoother within a Linux subsystem. Install Ubuntu 20.04+ or Debian 10+ through WSL, then follow the standard Linux installation process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 2: Native Windows with Git Bash&lt;/strong&gt;&lt;br&gt;
This approach requires Git for Windows and additional configuration. For portable Git installations, you'll need to specify the bash path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$env&lt;/span&gt;:CLAUDE_CODE_GIT_BASH_PATH&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\P&lt;/span&gt;&lt;span class="s2"&gt;rogram Files&lt;/span&gt;&lt;span class="se"&gt;\G&lt;/span&gt;&lt;span class="s2"&gt;it&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="s2"&gt;in&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="s2"&gt;ash.exe"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Linux and macOS: The Straightforward Path&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Installation on Unix-based systems is typically seamless using either the npm or native binary methods. The primary consideration is ensuring your Node.js version meets the LTS requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Post-Installation Verification: Ensuring Everything Works&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;After installation, verification is crucial to avoid discovering setup issues during critical development moments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check installation health and configuration&lt;/span&gt;
claude doctor

&lt;span class="c"&gt;# Verify global availability and version&lt;/span&gt;
claude &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you used the native binary installation method, you might need to add Claude to your system PATH:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="$HOME/.local/bin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember to restart your terminal or source your profile for PATH changes to take effect.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Authentication: Your Gateway to AI-Powered Development&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Claude Code offers three distinct authentication approaches, each suited to different use cases:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Option 1: Anthropic Console (Default Path)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Requires an active billing account at console.anthropic.com&lt;/li&gt;
&lt;li&gt;Uses OAuth for secure authentication&lt;/li&gt;
&lt;li&gt;Navigate to your project directory and run &lt;code&gt;claude&lt;/code&gt; to begin the authentication flow&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Option 2: Claude App Integration (Pro/Max Plans)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Perfect for developers with existing Claude Pro or Max subscriptions&lt;/li&gt;
&lt;li&gt;Provides unified billing and account management&lt;/li&gt;
&lt;li&gt;Log in with your Claude.ai credentials during the initial launch&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Option 3: Enterprise Platforms&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Designed for organizations using Amazon Bedrock or Google Vertex AI&lt;/li&gt;
&lt;li&gt;Requires additional configuration for cloud infrastructure integration&lt;/li&gt;
&lt;li&gt;Ideal for enterprise environments with existing AI platform investments&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;First Session: Making Contact with Your AI Development Partner&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Your first Claude Code session sets the foundation for all future interactions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to your project directory:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /path/to/your/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Launch Claude Code:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complete the authentication flow following the prompts&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You'll be greeted with the welcome interface:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✻ Welcome to Claude Code!
...
&amp;gt; Try "create a util logging.py that..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This welcome prompt isn't just ceremonial—it's your first indication that Claude Code has successfully connected to Anthropic's servers and is ready to assist with your development workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Essential Configuration for Maximum Effectiveness&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Environment Variables for Advanced Users&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;While not required for basic operation, setting up environment variables can enhance your Claude Code experience:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# For direct API access (add to ~/.bashrc, ~/.zshrc, or ~/.profile)&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-api-key-here"&lt;/span&gt;

&lt;span class="c"&gt;# For Amazon Bedrock integration&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CLAUDE_CODE_USE_BEDROCK&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1

&lt;span class="c"&gt;# For Google Vertex AI integration&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CLAUDE_CODE_USE_VERTEX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Project-Level Context: The CLAUDE.md Secret Weapon&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of Claude Code's most powerful features is its ability to maintain project context through a &lt;code&gt;CLAUDE.md&lt;/code&gt; file placed in your project root. This file acts as a persistent briefing document that Claude Code references for every interaction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Project: Web Application Backend&lt;/span&gt;

&lt;span class="gu"&gt;## Structure&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`src/`&lt;/span&gt; - Main application code
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`tests/`&lt;/span&gt; - Test suites and fixtures
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`docs/`&lt;/span&gt; - Project documentation
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`config/`&lt;/span&gt; - Configuration files

&lt;span class="gu"&gt;## Conventions&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Use TypeScript for all new files
&lt;span class="p"&gt;-&lt;/span&gt; Follow REST API naming conventions
&lt;span class="p"&gt;-&lt;/span&gt; Implement comprehensive error handling
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This context file dramatically improves Claude Code's understanding of your project, resulting in more accurate suggestions and fewer misaligned implementations.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Command Reference: Your Daily Development Arsenal&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Understanding Claude Code's command structure is essential for effective usage:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Use Case&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Start interactive mode&lt;/td&gt;
&lt;td&gt;Beginning a development session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude "task"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Execute one-time task&lt;/td&gt;
&lt;td&gt;Quick fixes or implementations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude -p "query"&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Run query and exit&lt;/td&gt;
&lt;td&gt;Getting explanations or guidance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude -c&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Continue recent conversation&lt;/td&gt;
&lt;td&gt;Resuming interrupted work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude -r&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Resume previous conversation&lt;/td&gt;
&lt;td&gt;Returning to earlier discussions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;claude commit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create Git commit&lt;/td&gt;
&lt;td&gt;Automated commit message generation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/clear&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clear conversation history&lt;/td&gt;
&lt;td&gt;Starting fresh within a session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/help&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show available commands&lt;/td&gt;
&lt;td&gt;Discovering new capabilities&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/config&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Configure settings&lt;/td&gt;
&lt;td&gt;Customizing your experience&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;IDE Integration: Bringing AI Into Your Editor&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;VS Code Integration Made Simple&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Claude Code's VS Code integration transforms your editor into an AI-powered development environment:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start Claude Code from your VS Code terminal:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enable IDE integration:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /ide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install the extension when prompted&lt;/strong&gt;
Claude Code will automatically detect VS Code and guide you through extension installation. Alternatively, you can manually install the &lt;code&gt;claude-code.vsix&lt;/code&gt; file from your installation directory.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Support for Alternative IDEs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Claude Code also integrates with Cursor and other modern editors using a similar process—start Claude Code from the editor's terminal and use the &lt;code&gt;/ide&lt;/code&gt; command to enable integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Troubleshooting: Solving Common Setup Challenges&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Permission Errors&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use the local installation method: &lt;code&gt;claude migrate-installer&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Never use &lt;code&gt;sudo&lt;/code&gt; with npm installation&lt;/li&gt;
&lt;li&gt;Configure npm permissions properly for your user account&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Windows Compatibility Issues&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Prioritize WSL for the best experience&lt;/li&gt;
&lt;li&gt;Ensure Git for Windows is properly installed for native usage&lt;/li&gt;
&lt;li&gt;Configure the correct Git Bash path for portable installations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Authentication Problems&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;claude doctor&lt;/code&gt; to diagnose authentication status&lt;/li&gt;
&lt;li&gt;Re-authenticate using &lt;code&gt;claude /login&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Verify you're accessing Claude Code from a supported geographic region&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;PATH Configuration Issues&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add Claude to your PATH following the post-installation instructions&lt;/li&gt;
&lt;li&gt;Remove outdated aliases or symlinks that might conflict&lt;/li&gt;
&lt;li&gt;Restart your terminal session after PATH modifications&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Beyond Setup: What Comes Next&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;With Claude Code properly installed and configured, you're positioned to leverage one of the most sophisticated AI development tools available today. The setup process we've covered here creates the foundation for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-file debugging and refactoring&lt;/strong&gt; across complex codebases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent code generation&lt;/strong&gt; that understands your project's patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated testing and documentation&lt;/strong&gt; that stays in sync with your code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture-aware suggestions&lt;/strong&gt; that respect your existing design decisions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The Investment in Your Development Future&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Setting up Claude Code properly isn't just about getting a tool running—it's about establishing a development workflow that can adapt and scale with your projects. The time invested in understanding authentication options, configuring environment variables, and creating comprehensive project context pays dividends in every subsequent coding session.&lt;/p&gt;

&lt;p&gt;Whether you're building your next startup, contributing to open source, or tackling enterprise-scale applications, Claude Code's CLI interface provides a consistent, powerful foundation for AI-assisted development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your development environment is ready. Your AI coding partner is waiting. The only question remaining is: what will you build first?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ready to take your development workflow to the next level? With Claude Code properly configured, you're just one &lt;code&gt;claude&lt;/code&gt; command away from experiencing the future of software development.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>claudeai</category>
      <category>claudecode</category>
      <category>codingagent</category>
      <category>aicode</category>
    </item>
    <item>
      <title>Generate Full Stack React Native Expo project in Seconds ⌚🚀</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Thu, 17 Jul 2025 07:46:32 +0000</pubDate>
      <link>https://dev.to/shahidkhans/generate-full-stack-react-native-expo-project-in-seconds-180n</link>
      <guid>https://dev.to/shahidkhans/generate-full-stack-react-native-expo-project-in-seconds-180n</guid>
      <description>&lt;h2&gt;
  
  
  Generate Full Stack React Native project in Seconds.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Run the below command and get relax
&lt;code&gt;
npx rn-new@latest rn-nw-rnr2 --react-navigation --nativewind --npm --i18next  --firebase --drawer --tabs --import-alias --no-install
&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>reactnative</category>
      <category>expo</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Ready-made React &amp; Next.js blocks, Framer Motion FX</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Thu, 17 Jul 2025 07:28:15 +0000</pubDate>
      <link>https://dev.to/shahidkhans/ready-made-react-nextjs-blocks-framer-motion-fx-22ig</link>
      <guid>https://dev.to/shahidkhans/ready-made-react-nextjs-blocks-framer-motion-fx-22ig</guid>
      <description>&lt;p&gt;Elevate your next project with a curated suite of minimalist, production-ready UI components crafted in Tailwind CSS, React, and Next.js. Copy-and-paste landing pages, portfolios, and full-stack templates—complete with seamless Supabase integration—let you launch in minutes. Built-in Framer Motion animations, mobile-first responsiveness, and WCAG-focused accessibility ensure every site looks polished and performs flawlessly. Ship professional, scalable web experiences faster than ever.&lt;br&gt;
Visit &lt;a href="https://skiper-ui.com/" rel="noopener noreferrer"&gt;https://skiper-ui.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>nextjs</category>
      <category>react</category>
      <category>shadcn</category>
    </item>
    <item>
      <title>A Practical Guide to Gemini CLI</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Sun, 06 Jul 2025 05:16:08 +0000</pubDate>
      <link>https://dev.to/shahidkhans/a-practical-guide-to-gemini-cli-941</link>
      <guid>https://dev.to/shahidkhans/a-practical-guide-to-gemini-cli-941</guid>
      <description>&lt;h2&gt;
  
  
  Advanced Usage Examples for Gemini CLI
&lt;/h2&gt;

&lt;p&gt;Gemini CLI is a powerful AI assistant for developers, but its true potential shines when you leverage its advanced features and workflow integrations. Here are practical, effective usage examples to help you get more out of Gemini CLI:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Deep Codebase Exploration and Summarization&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Summarize architecture and module roles:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@./ Summarize the architecture and main modules of this project"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Explain a specific function or file:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@src/utils/helpers.js Explain the purpose and logic of this file"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Map data flows or dependencies:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@src/ @lib/ Map the data flow between these directories"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Automated Bug Detection and Fixing&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Analyze and fix a GitHub issue:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@search https://github.com/yourrepo/issues/123 Analyze this issue and suggest a fix plan"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Detect and fix bugs in a directory:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@src/ Scan for common bugs and suggest fixes"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apply suggested code changes:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Gemini will preview diffs and ask for your approval before applying edits[1].&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Test Generation and Coverage Analysis&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate unit tests for a file:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@src/components/Button.jsx Generate unit tests for this component"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Review and improve test coverage:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@src/ @tests/ Analyze and suggest improvements for test coverage"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create integration tests:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@api/ Generate integration tests for all endpoints"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Documentation and Reporting&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generate markdown documentation:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@src/ Generate markdown documentation for all exported functions"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Summarize recent changes as a changelog:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "Summarize all codebase changes today in changelog format"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Save documentation to a file:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "Save this summary as docs/CHANGELOG.md"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. &lt;strong&gt;Workflow Automation and Integration&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Automate code review in CI/CD:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add to your pre-commit hook:
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
gemini review &lt;span class="nt"&gt;--staged-files&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;checklist
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate docs during build:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  gemini docs &lt;span class="nt"&gt;--input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;src/ &lt;span class="nt"&gt;--output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docs/ &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;markdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Integrate with Makefile:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;  &lt;span class="nl"&gt;review&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    gemini review &lt;span class="nt"&gt;--files&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;$(&lt;/span&gt;&lt;span class="s2"&gt;FILES&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--severity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;medium
  &lt;span class="nl"&gt;docs&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    gemini docs &lt;span class="nt"&gt;--auto-update&lt;/span&gt; &lt;span class="nt"&gt;--watch&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. &lt;strong&gt;Shell and System Commands&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run shell commands directly:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  !ls -al
  !npm test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Search for text within files:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "Find all TODO comments in the codebase"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. &lt;strong&gt;Project Customization and Memory&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Define project rules and context in &lt;code&gt;GEMINI.md&lt;/code&gt;:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;  # Project: E-commerce Platform
  ## Context
&lt;span class="p"&gt;  -&lt;/span&gt; React frontend, Node.js backend, MongoDB
  ## Standards
&lt;span class="p"&gt;  -&lt;/span&gt; Use functional components
&lt;span class="p"&gt;  -&lt;/span&gt; Follow REST API conventions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Store preferences for consistent AI responses:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "Remember: always use async/await in this project"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  8. &lt;strong&gt;Real-Time Web Search and Research&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ground prompts with live web data:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@search What are the latest security best practices for Node.js?"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fetch and analyze external data:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "@web-fetch https://api.example.com/data Analyze this API response"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  9. &lt;strong&gt;Multi-Agent and MCP Integration&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extend Gemini CLI with custom tools via MCP:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Configure &lt;code&gt;.gemini/settings.json&lt;/code&gt; to add new abilities (e.g., GitHub integration, image generation)[1][2].&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Interact with external APIs or services:&lt;/strong&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini -p "Use the GitHub MCP tool to list all open pull requests"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  10. &lt;strong&gt;Batch Jobs and Non-Interactive Mode&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automate repetitive tasks:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  gemini --all_files -p "Refactor all functions to use ES6 syntax"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run in CI/CD pipelines for automated analysis and reporting[3]:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  gemini review &lt;span class="nt"&gt;--all_files&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;summary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Table: Gemini CLI Built-in Tools Overview
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Command Example&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ReadFolder&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List files/folders in a directory&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadFile&lt;/td&gt;
&lt;td&gt;&lt;code&gt;read-file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Read content of a single file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ReadManyFiles&lt;/td&gt;
&lt;td&gt;&lt;code&gt;read-many-files&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Read multiple files at once&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FindFiles&lt;/td&gt;
&lt;td&gt;&lt;code&gt;glob&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search files by pattern&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SearchText&lt;/td&gt;
&lt;td&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Search for text within files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edit&lt;/td&gt;
&lt;td&gt;&lt;code&gt;edit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Apply code changes via diffs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WriteFile&lt;/td&gt;
&lt;td&gt;&lt;code&gt;write-file&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create new files with content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shell&lt;/td&gt;
&lt;td&gt;&lt;code&gt;!npm test&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Run shell/system commands&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WebFetch&lt;/td&gt;
&lt;td&gt;&lt;code&gt;web-fetch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fetch and analyze web content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GoogleSearch&lt;/td&gt;
&lt;td&gt;&lt;code&gt;web-search&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Perform Google search for real-time info&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SaveMemory&lt;/td&gt;
&lt;td&gt;&lt;code&gt;memoryTool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Store facts/preferences for session&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Tips for Effective Use
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use the &lt;code&gt;@&lt;/code&gt; syntax to reference files or directories for context-aware prompts.&lt;/li&gt;
&lt;li&gt;Leverage the 1 million token context window for large projects.&lt;/li&gt;
&lt;li&gt;Integrate Gemini CLI into your scripts, CI/CD, and editor workflows for automation and consistency.&lt;/li&gt;
&lt;li&gt;Customize project behavior with &lt;code&gt;GEMINI.md&lt;/code&gt; and settings files for tailored AI responses[1][2][4].&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By combining these advanced examples and integrations, you can unlock the full power of Gemini CLI for code analysis, automation, documentation, and workflow optimization[1][2][4][3].&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://www.datacamp.com/tutorial/gemini-cli" rel="noopener noreferrer"&gt;https://www.datacamp.com/tutorial/gemini-cli&lt;/a&gt;&lt;br&gt;
[2] &lt;a href="https://dev.to/proflead/gemini-cli-full-tutorial-2ab5"&gt;https://dev.to/proflead/gemini-cli-full-tutorial-2ab5&lt;/a&gt;&lt;br&gt;
[3] &lt;a href="https://www.infoq.com/news/2025/07/google-gemini-cli/" rel="noopener noreferrer"&gt;https://www.infoq.com/news/2025/07/google-gemini-cli/&lt;/a&gt;&lt;br&gt;
[4] &lt;a href="https://mpgone.com/how-to-use-gemini-cli-complete-guide-for-developers-and-beginners/" rel="noopener noreferrer"&gt;https://mpgone.com/how-to-use-gemini-cli-complete-guide-for-developers-and-beginners/&lt;/a&gt;&lt;br&gt;
[5] &lt;a href="https://github.com/google-gemini/gemini-cli" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli&lt;/a&gt;&lt;br&gt;
[6] &lt;a href="https://github.com/reugn/gemini-cli" rel="noopener noreferrer"&gt;https://github.com/reugn/gemini-cli&lt;/a&gt;&lt;br&gt;
[7] &lt;a href="https://buymeacoffee.com/rsahan/gemini-your-terminal-a-comprehensive-guide-using-gemini-cli" rel="noopener noreferrer"&gt;https://buymeacoffee.com/rsahan/gemini-your-terminal-a-comprehensive-guide-using-gemini-cli&lt;/a&gt;&lt;br&gt;
[8] &lt;a href="https://astconsulting.in/gemini-cli/gemini-cli-future-ai-command-lines" rel="noopener noreferrer"&gt;https://astconsulting.in/gemini-cli/gemini-cli-future-ai-command-lines&lt;/a&gt;&lt;br&gt;
[9] &lt;a href="https://www.youtube.com/watch?v=T76NbeTdDFA" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=T76NbeTdDFA&lt;/a&gt;&lt;br&gt;
[10] &lt;a href="https://dev.to/therealmrmumba/7-insane-gemini-cli-tips-that-will-make-you-a-superhuman-developer-2d7h"&gt;https://dev.to/therealmrmumba/7-insane-gemini-cli-tips-that-will-make-you-a-superhuman-developer-2d7h&lt;/a&gt;&lt;br&gt;
[11] &lt;a href="https://www.youtube.com/watch?v=VSiHh4KyK6A" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=VSiHh4KyK6A&lt;/a&gt;&lt;br&gt;
[12] &lt;a href="https://learn.netdata.cloud/docs/ai-&amp;amp;-ml/devops-copilot/gemini-cli" rel="noopener noreferrer"&gt;https://learn.netdata.cloud/docs/ai-&amp;amp;-ml/devops-copilot/gemini-cli&lt;/a&gt;&lt;br&gt;
[13] &lt;a href="https://www.youtube.com/watch?v=lEBO36eovns" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=lEBO36eovns&lt;/a&gt;&lt;br&gt;
[14] &lt;a href="https://www.youtube.com/watch?v=bMSq6ghdIYk" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=bMSq6ghdIYk&lt;/a&gt;&lt;br&gt;
[15] &lt;a href="https://cloud.google.com/gemini/docs/codeassist/gemini-cli" rel="noopener noreferrer"&gt;https://cloud.google.com/gemini/docs/codeassist/gemini-cli&lt;/a&gt;&lt;br&gt;
[16] &lt;a href="https://www.youtube.com/watch?v=CqL5kB8pOfo" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=CqL5kB8pOfo&lt;/a&gt;&lt;br&gt;
[17] &lt;a href="https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/" rel="noopener noreferrer"&gt;https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/&lt;/a&gt;&lt;br&gt;
[18] &lt;a href="https://www.reddit.com/r/GeminiAI/comments/1lkojt8/gemini_cli_a_comprehensive_guide_to_understanding/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/GeminiAI/comments/1lkojt8/gemini_cli_a_comprehensive_guide_to_understanding/&lt;/a&gt;&lt;br&gt;
[19] &lt;a href="https://momen.app/blogs/practical-tips-for-using-gemini-cli-in-real-projects/" rel="noopener noreferrer"&gt;https://momen.app/blogs/practical-tips-for-using-gemini-cli-in-real-projects/&lt;/a&gt;&lt;br&gt;
[20] &lt;a href="https://www.youtube.com/watch?v=we2HwLyKYEg" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=we2HwLyKYEg&lt;/a&gt;&lt;br&gt;
[21] &lt;a href="https://github.com/Ramesh-tester/gemini-cli-action" rel="noopener noreferrer"&gt;https://github.com/Ramesh-tester/gemini-cli-action&lt;/a&gt;&lt;br&gt;
[22] &lt;a href="https://www.linkedin.com/pulse/drowning-pull-requests-automate-your-github-workflow-franziska-2rexe" rel="noopener noreferrer"&gt;https://www.linkedin.com/pulse/drowning-pull-requests-automate-your-github-workflow-franziska-2rexe&lt;/a&gt;&lt;br&gt;
[23] &lt;a href="https://cloud.google.com/code/docs/shell/write-code-gemini" rel="noopener noreferrer"&gt;https://cloud.google.com/code/docs/shell/write-code-gemini&lt;/a&gt;&lt;br&gt;
[24] &lt;a href="https://devops.com/gemini-cli-the-open-source-ai-agent-thats-revolutionizing-terminal-workflows/" rel="noopener noreferrer"&gt;https://devops.com/gemini-cli-the-open-source-ai-agent-thats-revolutionizing-terminal-workflows/&lt;/a&gt;&lt;br&gt;
[25] &lt;a href="https://www.marktechpost.com/2025/06/28/getting-started-with-gemini-command-line-interface-cli/" rel="noopener noreferrer"&gt;https://www.marktechpost.com/2025/06/28/getting-started-with-gemini-command-line-interface-cli/&lt;/a&gt;&lt;br&gt;
[26] &lt;a href="https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/actions/workflows/ci.yml&lt;/a&gt;&lt;br&gt;
[27] &lt;a href="https://www.linkedin.com/pulse/gemini-command-line-interface-cli-ultimate-ai-agent-lozano-grijalba-tkl2f" rel="noopener noreferrer"&gt;https://www.linkedin.com/pulse/gemini-command-line-interface-cli-ultimate-ai-agent-lozano-grijalba-tkl2f&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gemini</category>
    </item>
    <item>
      <title>Gemini CLI: The AI-Powered Command Line Revolution for Developers</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Sun, 06 Jul 2025 05:14:29 +0000</pubDate>
      <link>https://dev.to/shahidkhans/gemini-cli-the-ai-powered-command-line-revolution-for-developers-a7e</link>
      <guid>https://dev.to/shahidkhans/gemini-cli-the-ai-powered-command-line-revolution-for-developers-a7e</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;The command line has long been the developer’s home for productivity, automation, and deep code work. With the arrival of &lt;strong&gt;Gemini CLI&lt;/strong&gt;, Google’s open-source AI agent, the terminal is now supercharged with advanced AI capabilities—enabling developers to code, debug, document, and automate tasks using natural language, all from within their favorite shell environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Gemini CLI?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gemini CLI&lt;/strong&gt; is an open-source command-line tool that brings the power of Google’s Gemini 2.5 Pro model directly to your terminal. It’s designed for developers who want AI assistance for coding, content generation, problem-solving, and workflow automation—without leaving the command line[1][2][3][4].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1 million token context window&lt;/strong&gt;: Analyze and understand even the largest codebases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Natural language prompts&lt;/strong&gt;: Interact with your codebase, files, and tools using plain English.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time web search&lt;/strong&gt;: Ground your prompts with up-to-date information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-source extensibility&lt;/strong&gt;: Customize, inspect, and contribute to the tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seamless integration&lt;/strong&gt;: Works with VS Code, GitHub, and CI/CD pipelines[1][2][3][5].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installation and Setup
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js v18 or higher&lt;/li&gt;
&lt;li&gt;(Recommended) Python 3.8+ and git for advanced features[4][6]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick Start:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run instantly (no install):&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  npx https://github.com/google-gemini/gemini-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Global installation:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @google/gemini-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Launch Gemini CLI:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  gemini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Authentication:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authenticate with your Google account or set your API key:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_api_key_here"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;API keys can be generated from Google AI Studio or Google Cloud Console[4][6].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Using Gemini CLI in Your Codebase
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Project Initialization
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to your project directory:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;cd &lt;/span&gt;path/to/your/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;(Optional) Initialize Gemini CLI for project-specific context:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  gemini init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start the CLI:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  gemini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Natural Language Prompts and File Context
&lt;/h3&gt;

&lt;p&gt;Gemini CLI uses the &lt;code&gt;@&lt;/code&gt; syntax to reference files or directories in prompts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single file: &lt;code&gt;@src/main.py&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Directory: &lt;code&gt;@src/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Multiple: &lt;code&gt;@src/ @tests/&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example Commands:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Example Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Summarize architecture&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemini -p "@./ Summarize the architecture of this project"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Explain a file&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemini -p "@src/main.py Explain this file's purpose and structure"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Analyze dependencies&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemini -p "@package.json @src/index.js Analyze the dependencies used"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Review test coverage&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemini -p "@src/ @tests/ Analyze test coverage for the source code"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overview of all files&lt;/td&gt;
&lt;td&gt;&lt;code&gt;gemini --all_files -p "Analyze the project structure and dependencies"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Summarize today’s changes&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt; Give me a summary of all of the changes made to the codebase today.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fix a bug or issue&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt; Analyze this GitHub issue: [@search ] and suggest a fix plan.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Advanced Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Editing and refactoring&lt;/strong&gt;: Request code improvements or refactoring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bug detection and fixing&lt;/strong&gt;: Let Gemini suggest and apply fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test generation&lt;/strong&gt;: Auto-generate test cases for your code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: Generate markdown docs, changelogs, and diagrams.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search grounding&lt;/strong&gt;: Use &lt;code&gt;@search&lt;/code&gt; for real-time information retrieval[2][3][5].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Workflow Integration and Automation
&lt;/h2&gt;

&lt;p&gt;Gemini CLI is designed to fit seamlessly into existing developer workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Editor/IDE Agnostic&lt;/strong&gt;: Use in any terminal, or integrate with VS Code, IntelliJ, Vim, and more[5].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git Hooks&lt;/strong&gt;: Automate code reviews or documentation generation on commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Scripts &amp;amp; Makefiles&lt;/strong&gt;: Add AI-powered steps to your build and deployment pipelines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD Integration&lt;/strong&gt;: Run Gemini CLI in non-interactive mode for automated code analysis and reporting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Extensions&lt;/strong&gt;: Build and share your own plugins for linting, testing, migration, and security[5][7].&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example: Git Pre-commit Hook&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
gemini review &lt;span class="nt"&gt;--staged-files&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;checklist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example: Automated Documentation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gemini docs &lt;span class="nt"&gt;--input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;src/ &lt;span class="nt"&gt;--output&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;docs/ &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;markdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Codebase Exploration&lt;/strong&gt;: Instantly summarize architecture, module roles, and data flows in large projects[2][8].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bug Audits&lt;/strong&gt;: Analyze folders of scripts, detect bugs, and receive step-by-step fix plans[8].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pull Request Management&lt;/strong&gt;: Scan and auto-close spam PRs, or generate review checklists[9].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-step Workflows&lt;/strong&gt;: Chain prompts to generate code, tests, docs, and push to GitHub in one go[9].&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Testing&lt;/strong&gt;: Connect to Postman or Swagger files for automated API validation[10].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Community and Extensibility
&lt;/h2&gt;

&lt;p&gt;Gemini CLI is fully open source (Apache 2.0). Developers can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inspect and modify the code for security and transparency.&lt;/li&gt;
&lt;li&gt;Contribute features, bug fixes, and extensions.&lt;/li&gt;
&lt;li&gt;Share workflow templates and integration patterns with the community[1][11][7].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;gemini init&lt;/code&gt; to set up project-specific configuration (e.g., &lt;code&gt;GEMINI.md&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Reference directories or use &lt;code&gt;--all_files&lt;/code&gt; for large projects.&lt;/li&gt;
&lt;li&gt;Leverage the 1 million token context window for deep code analysis.&lt;/li&gt;
&lt;li&gt;Automate repetitive tasks with scripts and hooks.&lt;/li&gt;
&lt;li&gt;Stay updated with community extensions and best practices[5][11][7].&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎁 Want to use Gemini CLI in more advanced way read the below article
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/shahidkhans/a-practical-guide-to-gemini-cli-941"&gt;Practical Guide to Gemini CLI&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gemini CLI&lt;/strong&gt; is redefining what’s possible in the terminal. By combining the power of Google’s Gemini AI with the flexibility of the command line, developers can now code, debug, document, and automate with unprecedented speed and intelligence. Whether you’re working solo or as part of a team, Gemini CLI is a must-have tool for the modern developer’s workflow[1][2][3][4][5][11].&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For more details, visit the official Gemini CLI documentation and GitHub repository.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;[1] &lt;a href="https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/" rel="noopener noreferrer"&gt;https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/&lt;/a&gt;&lt;br&gt;
[2] &lt;a href="https://www.datacamp.com/tutorial/gemini-cli" rel="noopener noreferrer"&gt;https://www.datacamp.com/tutorial/gemini-cli&lt;/a&gt;&lt;br&gt;
[3] &lt;a href="https://www.infoq.com/news/2025/07/google-gemini-cli/" rel="noopener noreferrer"&gt;https://www.infoq.com/news/2025/07/google-gemini-cli/&lt;/a&gt;&lt;br&gt;
[4] &lt;a href="https://www.f22labs.com/blogs/what-is-google-gemini-cli-how-to-install-and-use-it/" rel="noopener noreferrer"&gt;https://www.f22labs.com/blogs/what-is-google-gemini-cli-how-to-install-and-use-it/&lt;/a&gt;&lt;br&gt;
[5] &lt;a href="https://mpgone.com/how-to-use-gemini-cli-complete-guide-for-developers-and-beginners/" rel="noopener noreferrer"&gt;https://mpgone.com/how-to-use-gemini-cli-complete-guide-for-developers-and-beginners/&lt;/a&gt;&lt;br&gt;
[6] &lt;a href="https://dev.to/auden/google-gemini-cli-tutorial-how-to-install-and-use-it-with-images-4phb"&gt;https://dev.to/auden/google-gemini-cli-tutorial-how-to-install-and-use-it-with-images-4phb&lt;/a&gt;&lt;br&gt;
[7] &lt;a href="https://topmostads.com/google-gemini-cli-free-open-source-guide/" rel="noopener noreferrer"&gt;https://topmostads.com/google-gemini-cli-free-open-source-guide/&lt;/a&gt;&lt;br&gt;
[8] &lt;a href="https://javascript.plainenglish.io/i-tried-googles-gemini-cli-and-it-changed-how-i-code-forever-4794d3c02081" rel="noopener noreferrer"&gt;https://javascript.plainenglish.io/i-tried-googles-gemini-cli-and-it-changed-how-i-code-forever-4794d3c02081&lt;/a&gt;&lt;br&gt;
[9] &lt;a href="https://dev.to/therealmrmumba/7-insane-gemini-cli-tips-that-will-make-you-a-superhuman-developer-2d7h"&gt;https://dev.to/therealmrmumba/7-insane-gemini-cli-tips-that-will-make-you-a-superhuman-developer-2d7h&lt;/a&gt;&lt;br&gt;
[10] &lt;a href="https://momen.app/blogs/practical-tips-for-using-gemini-cli-in-real-projects/" rel="noopener noreferrer"&gt;https://momen.app/blogs/practical-tips-for-using-gemini-cli-in-real-projects/&lt;/a&gt;&lt;br&gt;
[11] &lt;a href="https://devops.com/gemini-cli-the-open-source-ai-agent-thats-revolutionizing-terminal-workflows/" rel="noopener noreferrer"&gt;https://devops.com/gemini-cli-the-open-source-ai-agent-thats-revolutionizing-terminal-workflows/&lt;/a&gt;&lt;br&gt;
[12] &lt;a href="https://www.zdnet.com/article/geminis-command-line-tool-is-a-hidden-productivity-game-changer-and-its-free/" rel="noopener noreferrer"&gt;https://www.zdnet.com/article/geminis-command-line-tool-is-a-hidden-productivity-game-changer-and-its-free/&lt;/a&gt;&lt;br&gt;
[13] &lt;a href="https://github.com/google-gemini/gemini-cli" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli&lt;/a&gt;&lt;br&gt;
[14] &lt;a href="https://cloud.google.com/gemini/docs/codeassist/gemini-cli" rel="noopener noreferrer"&gt;https://cloud.google.com/gemini/docs/codeassist/gemini-cli&lt;/a&gt;&lt;br&gt;
[15] &lt;a href="https://dev.to/proflead/gemini-cli-full-tutorial-2ab5"&gt;https://dev.to/proflead/gemini-cli-full-tutorial-2ab5&lt;/a&gt;&lt;br&gt;
[16] &lt;a href="https://www.youtube.com/watch?v=KUCZe1xBKFM" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=KUCZe1xBKFM&lt;/a&gt;&lt;br&gt;
[17] &lt;a href="https://hackernoon.com/complete-gemini-cli-setup-guide-for-your-terminal" rel="noopener noreferrer"&gt;https://hackernoon.com/complete-gemini-cli-setup-guide-for-your-terminal&lt;/a&gt;&lt;br&gt;
[18] &lt;a href="https://simonwillison.net/2025/Jun/25/gemini-cli/" rel="noopener noreferrer"&gt;https://simonwillison.net/2025/Jun/25/gemini-cli/&lt;/a&gt;&lt;br&gt;
[19] &lt;a href="https://cloud.google.com/gemini/docs/discover/write-prompts" rel="noopener noreferrer"&gt;https://cloud.google.com/gemini/docs/discover/write-prompts&lt;/a&gt;&lt;br&gt;
[20] &lt;a href="https://ikala.ai/blog/ai-trends/google-gemini-cli-in-depth-analysis-the-ai-agent-ecosystem-war-for-the-developer-terminal/" rel="noopener noreferrer"&gt;https://ikala.ai/blog/ai-trends/google-gemini-cli-in-depth-analysis-the-ai-agent-ecosystem-war-for-the-developer-terminal/&lt;/a&gt;&lt;br&gt;
[21] &lt;a href="https://geminicli.tech" rel="noopener noreferrer"&gt;https://geminicli.tech&lt;/a&gt;&lt;br&gt;
[22] &lt;a href="https://www.reddit.com/r/GeminiAI/comments/1lkojt8/gemini_cli_a_comprehensive_guide_to_understanding/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/GeminiAI/comments/1lkojt8/gemini_cli_a_comprehensive_guide_to_understanding/&lt;/a&gt;&lt;br&gt;
[23] &lt;a href="https://www.youtube.com/watch?v=CqL5kB8pOfo" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=CqL5kB8pOfo&lt;/a&gt;&lt;br&gt;
[24] &lt;a href="https://www.youtube.com/watch?v=we2HwLyKYEg" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=we2HwLyKYEg&lt;/a&gt;&lt;br&gt;
[25] &lt;a href="https://github.com/google-gemini/gemini-cli/issues/3088/linked_closing_reference" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/issues/3088/linked_closing_reference&lt;/a&gt;&lt;br&gt;
[26] &lt;a href="https://www.linkedin.com/pulse/evaluating-google-gemini-cli-my-developer-experience-majid-sheikh-og51f" rel="noopener noreferrer"&gt;https://www.linkedin.com/pulse/evaluating-google-gemini-cli-my-developer-experience-majid-sheikh-og51f&lt;/a&gt;&lt;br&gt;
[27] &lt;a href="https://www.reddit.com/r/singularity/comments/1lk5h19/google_introduces_gemini_cli_a_light_opensource/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/singularity/comments/1lk5h19/google_introduces_gemini_cli_a_light_opensource/&lt;/a&gt;&lt;br&gt;
[28] &lt;a href="https://www.linkedin.com/pulse/gemini-cli-future-coding-now-mr-parvez-mosharaf-dfz0c" rel="noopener noreferrer"&gt;https://www.linkedin.com/pulse/gemini-cli-future-coding-now-mr-parvez-mosharaf-dfz0c&lt;/a&gt;&lt;br&gt;
[29] &lt;a href="https://github.com/google-gemini/gemini-cli/issues/2779" rel="noopener noreferrer"&gt;https://github.com/google-gemini/gemini-cli/issues/2779&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gemini</category>
      <category>vibecoding</category>
    </item>
    <item>
      <title>open-source animated components for Tailwind and Shadcn</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Fri, 27 Jun 2025 05:34:22 +0000</pubDate>
      <link>https://dev.to/shahidkhans/open-source-animated-components-for-tailwind-and-shadcn-10of</link>
      <guid>https://dev.to/shahidkhans/open-source-animated-components-for-tailwind-and-shadcn-10of</guid>
      <description>&lt;p&gt;open-source component Animation library built with React, TypeScript, Tailwind CSS, Motion and Shadcn CLI&lt;br&gt;
&lt;a href="https://animate-ui.com/" rel="noopener noreferrer"&gt;https://animate-ui.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28zplydofpeecmlerm7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28zplydofpeecmlerm7b.png" alt="animate-ui " width="800" height="711"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>shadcn</category>
      <category>webanimation</category>
    </item>
    <item>
      <title>Setting Up Row-Level Security in Supabase User and Admin Roles</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Mon, 26 May 2025 17:53:41 +0000</pubDate>
      <link>https://dev.to/shahidkhans/setting-up-row-level-security-in-supabase-user-and-admin-2ac1</link>
      <guid>https://dev.to/shahidkhans/setting-up-row-level-security-in-supabase-user-and-admin-2ac1</guid>
      <description>&lt;p&gt;Row-Level Security (RLS) in Supabase is a powerful feature that allows you to control access to your database tables at the row level, ensuring users can only access or modify data they’re authorized to. In this post, we’ll walk through setting up RLS on a &lt;code&gt;profiles&lt;/code&gt; table in Supabase, where authenticated users can view and edit their own profiles, and admins can view and edit all profiles. Let’s dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Supabase project with authentication enabled.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;profiles&lt;/code&gt; table in the &lt;code&gt;public&lt;/code&gt; schema with the following columns:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt; (UUID, references &lt;code&gt;auth.users(id)&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;is_admin&lt;/code&gt; (boolean, indicates admin status).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Basic familiarity with SQL and Supabase’s dashboard or SQL Editor.&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Enable RLS on the Profiles Table
&lt;/h2&gt;

&lt;p&gt;First, we need to enable RLS on the &lt;code&gt;profiles&lt;/code&gt; table to enforce access control. Without RLS, users could access all rows, which we want to avoid. Run the following SQL command in the Supabase SQL Editor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt; &lt;span class="n"&gt;ENABLE&lt;/span&gt; &lt;span class="k"&gt;ROW&lt;/span&gt; &lt;span class="k"&gt;LEVEL&lt;/span&gt; &lt;span class="k"&gt;SECURITY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that no one can access the table unless we define explicit RLS policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Define RLS Policies
&lt;/h2&gt;

&lt;p&gt;We’ll create four RLS policies to achieve our goal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow authenticated users to view their own profile.&lt;/li&gt;
&lt;li&gt;Allow authenticated users to edit their own profile.&lt;/li&gt;
&lt;li&gt;Allow admins to view all profiles.&lt;/li&gt;
&lt;li&gt;Allow admins to edit all profiles.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Policy 1: Authenticated Users View Their Own Profile
&lt;/h3&gt;

&lt;p&gt;This policy allows logged-in users to view their own profile by matching their &lt;code&gt;auth.uid()&lt;/code&gt; (the user’s ID from Supabase Auth) with the &lt;code&gt;id&lt;/code&gt; column in the &lt;code&gt;profiles&lt;/code&gt; table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Authenticated users can view their own profile"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it does&lt;/strong&gt;: Only allows &lt;code&gt;SELECT&lt;/code&gt; queries for rows where the authenticated user’s ID matches the &lt;code&gt;id&lt;/code&gt; column.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who it applies to&lt;/strong&gt;: Users with the &lt;code&gt;authenticated&lt;/code&gt; role (logged-in users).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Policy 2: Authenticated Users Edit Their Own Profile
&lt;/h3&gt;

&lt;p&gt;This policy allows users to update their own profile, again by matching &lt;code&gt;auth.uid()&lt;/code&gt; with the &lt;code&gt;id&lt;/code&gt; column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Authenticated users can edit their own profile"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;UPDATE&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it does&lt;/strong&gt;: Permits &lt;code&gt;UPDATE&lt;/code&gt; queries only on the user’s own profile row.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who it applies to&lt;/strong&gt;: Authenticated users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Policy 3 &amp;amp; 4: Admins View and Edit All Profiles
&lt;/h3&gt;

&lt;p&gt;Initially, you might write admin policies by checking the &lt;code&gt;is_admin&lt;/code&gt; column directly in the &lt;code&gt;profiles&lt;/code&gt; table, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Admins can view all profiles"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;is_admin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Admins can edit all profiles"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;UPDATE&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;is_admin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, this approach requires Supabase to check the &lt;code&gt;is_admin&lt;/code&gt; column for the user’s own row, which can be inefficient, especially for large tables. Instead, we’ll use a &lt;strong&gt;security definer function&lt;/strong&gt; to optimize the admin check.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Create a Security Definer Function
&lt;/h2&gt;

&lt;p&gt;To improve performance and maintainability, let’s create a function that checks if a user is an admin by querying their &lt;code&gt;is_admin&lt;/code&gt; status. This avoids repetitive table scans in policies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="k"&gt;REPLACE&lt;/span&gt; &lt;span class="k"&gt;FUNCTION&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_admin_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;RETURNS&lt;/span&gt; &lt;span class="nb"&gt;BOOLEAN&lt;/span&gt;
&lt;span class="k"&gt;LANGUAGE&lt;/span&gt; &lt;span class="n"&gt;plpgsql&lt;/span&gt;
&lt;span class="k"&gt;SECURITY&lt;/span&gt; &lt;span class="k"&gt;DEFINER&lt;/span&gt;
&lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="err"&gt;$$&lt;/span&gt;
&lt;span class="k"&gt;DECLARE&lt;/span&gt;
  &lt;span class="n"&gt;is_admin&lt;/span&gt; &lt;span class="nb"&gt;BOOLEAN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;BEGIN&lt;/span&gt;
  &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;profiles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_admin&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;is_admin&lt;/span&gt;
  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;profiles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="n"&gt;is_admin&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why use &lt;code&gt;SECURITY DEFINER&lt;/code&gt;?&lt;/strong&gt; It runs with the privileges of the function’s creator, bypassing RLS for the internal query, making it more efficient.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it does&lt;/strong&gt;: Takes a user ID, checks their &lt;code&gt;is_admin&lt;/code&gt; status in the &lt;code&gt;profiles&lt;/code&gt; table, and returns &lt;code&gt;true&lt;/code&gt; if they’re an admin, &lt;code&gt;false&lt;/code&gt; otherwise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let’s update the admin policies to use this function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Drop existing admin policies if they exist&lt;/span&gt;
&lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="nv"&gt;"Admins can view all profiles"&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="nv"&gt;"Admins can edit all profiles"&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- Create new admin policies using the function&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Admins can view all profiles"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_admin_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Admins can edit all profiles"&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;UPDATE&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;USING&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;is_admin_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These policies allow users identified as admins (via the &lt;code&gt;is_admin_user&lt;/code&gt; function) to view or edit all profiles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Auto-Create Profiles for New Users
&lt;/h2&gt;

&lt;p&gt;To ensure every user has a profile (and avoid issues where &lt;code&gt;is_admin_user&lt;/code&gt; returns &lt;code&gt;NULL&lt;/code&gt;), create a trigger that automatically adds a profile when a new user signs up:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="k"&gt;REPLACE&lt;/span&gt; &lt;span class="k"&gt;FUNCTION&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create_profile_for_new_user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;RETURNS&lt;/span&gt; &lt;span class="k"&gt;TRIGGER&lt;/span&gt;
&lt;span class="k"&gt;LANGUAGE&lt;/span&gt; &lt;span class="n"&gt;plpgsql&lt;/span&gt;
&lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="err"&gt;$$&lt;/span&gt;
&lt;span class="k"&gt;BEGIN&lt;/span&gt;
  &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;is_admin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;NEW&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;FALSE&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="k"&gt;NEW&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TRIGGER&lt;/span&gt; &lt;span class="n"&gt;on_auth_user_created&lt;/span&gt;
&lt;span class="k"&gt;AFTER&lt;/span&gt; &lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;
&lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;EACH&lt;/span&gt; &lt;span class="k"&gt;ROW&lt;/span&gt;
&lt;span class="k"&gt;EXECUTE&lt;/span&gt; &lt;span class="k"&gt;FUNCTION&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;create_profile_for_new_user&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sets &lt;code&gt;is_admin&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; by default for new users, ensuring the &lt;code&gt;profiles&lt;/code&gt; table is populated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Testing the Policies
&lt;/h2&gt;

&lt;p&gt;To verify everything works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test as a Regular User&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in as a non-admin user (&lt;code&gt;is_admin = false&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Run a query like &lt;code&gt;SELECT * FROM profiles&lt;/code&gt; using the Supabase client:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;profiles&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This should return only the user’s own profile.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Try updating another user’s profile (e.g., &lt;code&gt;UPDATE profiles SET ... WHERE id = 'other_user_id'&lt;/code&gt;). It should fail.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test as an Admin&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in as an admin (&lt;code&gt;is_admin = true&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Run the same &lt;code&gt;SELECT&lt;/code&gt; query to confirm access to all profiles.&lt;/li&gt;
&lt;li&gt;Test an &lt;code&gt;UPDATE&lt;/code&gt; on any profile; it should succeed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use the SQL Editor&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simulate a user with &lt;code&gt;call auth.login_as_user('user_email')&lt;/code&gt; and test queries directly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Troubleshooting Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No Data Returned&lt;/strong&gt;: Ensure &lt;code&gt;auth.uid()&lt;/code&gt; matches the &lt;code&gt;id&lt;/code&gt; column and that the user has a profile. Check if RLS is enabled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission Errors&lt;/strong&gt;: If you see “new row violates row-level security policy,” verify the policy conditions and the user’s authentication status.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Issues&lt;/strong&gt;: The &lt;code&gt;is_admin_user&lt;/code&gt; function reduces overhead, but ensure the &lt;code&gt;id&lt;/code&gt; column is indexed (it is by default if it’s the primary key).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing Profiles&lt;/strong&gt;: If a user lacks a profile row, the &lt;code&gt;is_admin_user&lt;/code&gt; function returns &lt;code&gt;NULL&lt;/code&gt;. The trigger above prevents this, but double-check for existing users.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Additional Considerations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;INSERT and DELETE Policies&lt;/strong&gt;: If your app allows profile creation or deletion, add policies for &lt;code&gt;INSERT&lt;/code&gt; and &lt;code&gt;DELETE&lt;/code&gt;. For example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;  &lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="n"&gt;POLICY&lt;/span&gt; &lt;span class="nv"&gt;"Users can create their own profile"&lt;/span&gt;
  &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt;
  &lt;span class="k"&gt;FOR&lt;/span&gt; &lt;span class="k"&gt;INSERT&lt;/span&gt;
  &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
  &lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="k"&gt;CHECK&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Service Role for Admin Tasks&lt;/strong&gt;: Use the &lt;code&gt;service_role&lt;/code&gt; key for server-side operations that need to bypass RLS, but keep it secure and never expose it client-side.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: For large tables, monitor query performance. The &lt;code&gt;is_admin_user&lt;/code&gt; function is optimized, but consider caching admin status if needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With these RLS policies and the &lt;code&gt;is_admin_user&lt;/code&gt; function, you’ve set up a secure and scalable access control system for your &lt;code&gt;profiles&lt;/code&gt; table in Supabase. Authenticated users can manage their own profiles, while admins have full access to all profiles. Always test thoroughly in a development environment before going live, and consult the &lt;a href="https://supabase.com/docs/guides/auth/row-level-security" rel="noopener noreferrer"&gt;Supabase RLS documentation&lt;/a&gt; for more details.&lt;/p&gt;

&lt;p&gt;Happy coding and let me know in the comments if you have questions or run into issues. I am running supabase self-hosted version. Contact for any paid setup &amp;amp; consulting work!&lt;/p&gt;

</description>
      <category>supabase</category>
    </item>
    <item>
      <title>Shadcn/UI Marketing Blocks</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Wed, 05 Mar 2025 09:08:38 +0000</pubDate>
      <link>https://dev.to/shahidkhans/shadcnui-marketing-blocks-1f7l</link>
      <guid>https://dev.to/shahidkhans/shadcnui-marketing-blocks-1f7l</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/shahidkhans" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F390826%2Fd32a69a7-5c57-4c4d-99a5-4403af1e50fa.jpeg" alt="shahidkhans"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/shahidkhans/awesome-open-source-free-to-use-tailwind-css-component-5dmh" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Awesome Open-Source Free to use Tailwind / Shadcn CSS Components&lt;/h2&gt;
      &lt;h3&gt;Shahid ・ Dec 9 '24&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#tailwindcss&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#shadcn&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#nextjs&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>Easiest way to implement Social Login Google and Email-Based Authentication using Better Auth, Next.js, and Tailwind CSS</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Sat, 22 Feb 2025 10:07:49 +0000</pubDate>
      <link>https://dev.to/shahidkhans/easiest-way-to-implement-social-login-google-and-email-based-authentication-using-better-auth-1la3</link>
      <guid>https://dev.to/shahidkhans/easiest-way-to-implement-social-login-google-and-email-based-authentication-using-better-auth-1la3</guid>
      <description>&lt;p&gt;Are you looking for a seamless way to integrate &lt;strong&gt;Google social login&lt;/strong&gt; and &lt;strong&gt;email-based authentication&lt;/strong&gt; into your Next.js application? In this blog post, we’ll dive into how you can use the powerful combination of &lt;strong&gt;Better Auth&lt;/strong&gt;, &lt;strong&gt;Next.js&lt;/strong&gt;, and &lt;strong&gt;Tailwind CSS&lt;/strong&gt; to build an efficient and secure authentication flow. This solution leverages the best of TypeScript, a lightweight auth library, and a reliable SQLite database layer using the &lt;strong&gt;better-sqlite3&lt;/strong&gt; library.&lt;/p&gt;

&lt;p&gt;👨‍💻Repository link: &lt;a href="https://github.com/shahidkhans/better-auth-next-js-tailwind-google-login" rel="noopener noreferrer"&gt;https://github.com/shahidkhans/better-auth-next-js-tailwind-google-login&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
Introduction
&lt;/li&gt;
&lt;li&gt;
Key Technologies

&lt;ul&gt;
&lt;li&gt;
Better_Auth
&lt;/li&gt;
&lt;li&gt;
Next.js
&lt;/li&gt;
&lt;li&gt;
TailwindCSS
&lt;/li&gt;
&lt;li&gt;
better-sqlite3
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Repository &amp;amp; Demo
&lt;/li&gt;
&lt;li&gt;
Why Integrate Google and Email-Based Authentication?
&lt;/li&gt;
&lt;li&gt;
Implementation Overview
&lt;/li&gt;
&lt;li&gt;
Getting Started
&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;User authentication is a core component of modern web applications. Whether you need &lt;strong&gt;social login&lt;/strong&gt; using Google or a traditional &lt;strong&gt;email-and-password&lt;/strong&gt; based system, providing a frictionless onboarding process can significantly enhance user satisfaction. &lt;/p&gt;

&lt;p&gt;In this post, we’ll show you how to build both &lt;strong&gt;Google social login&lt;/strong&gt; and &lt;strong&gt;email-based authentication&lt;/strong&gt; using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Better_Auth&lt;/strong&gt; – a lightweight and extensible authentication library for TypeScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js&lt;/strong&gt; – a React framework for building server-rendered web applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TailwindCSS&lt;/strong&gt; – a popular utility-first CSS framework for rapid UI development&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;better-sqlite3&lt;/strong&gt; – a fast and simple SQLite library for Node.js&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Technologies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Better_Auth
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight &amp;amp; Flexible&lt;/strong&gt;: Provides essential features while remaining easy to customize.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript Support&lt;/strong&gt;: Offers robust typings and encourages structured coding practices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensibility&lt;/strong&gt;: Perfect for adding social logins (e.g., Google) and other custom providers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Next.js
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server-Side Rendering (SSR)&lt;/strong&gt;: Helps deliver better SEO performance and faster initial page loads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Routes&lt;/strong&gt;: Makes it simple to build secure authentication APIs directly within the Next.js framework.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developer Experience&lt;/strong&gt;: Offers hot-reloading and a built-in router for a pleasant development workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TailwindCSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Utility-First&lt;/strong&gt;: Style your components quickly without leaving your HTML or JSX.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt;: Leverage the Tailwind config file to adapt your design to any brand guidelines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive Design&lt;/strong&gt;: Easily build responsive layouts with minimal custom code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  better-sqlite3
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: Known for its speed and simplicity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight&lt;/strong&gt;: Requires fewer resources compared to other SQL databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy Integration&lt;/strong&gt;: Perfect for small to medium-scale applications needing an embedded database.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Repository &amp;amp; Demo
&lt;/h2&gt;

&lt;p&gt;To see the code in action, explore the repository here:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/shahidkhans/better-auth-next-js-tailwind-google-login" rel="noopener noreferrer"&gt;Implemented Code Repository&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You’ll find a working demo showcasing how &lt;strong&gt;Better_Auth&lt;/strong&gt;, &lt;strong&gt;Next.js&lt;/strong&gt;, &lt;strong&gt;TailwindCSS&lt;/strong&gt;, and &lt;strong&gt;better-sqlite3&lt;/strong&gt; come together for an &lt;strong&gt;optimal authentication experience&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Integrate Google and Email-Based Authentication?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced User Experience&lt;/strong&gt;: Social login (Google) makes the registration process smoother, reducing friction and potential user drop-offs.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broader Reach&lt;/strong&gt;: Not all users have a Google account, and some prefer a traditional email-and-password method for sign-up.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better Security&lt;/strong&gt;: Google sign-in offers built-in security features, and email-based auth can incorporate modern security techniques like 2FA.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: With Next.js, you can easily scale your authentication logic to handle traffic spikes.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Implementation Overview
&lt;/h2&gt;

&lt;p&gt;Below is a simplified representation of how these components work together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;|----------------------------|
|     Next.js + React UI     |
|----------------------------|
           |  ^ (UI events)
           v  |
|----------------------------|
| Better_Auth Authentication |
|----------------------------|
           |  ^ (Auth flow)
           v  |
|----------------------------|
|  better-sqlite3 Database   |
|----------------------------|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User Interaction&lt;/strong&gt;: A user clicks &lt;strong&gt;Sign in with Google&lt;/strong&gt; or enters their email/password on the login screen (designed with Tailwind CSS components).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better_Auth&lt;/strong&gt;: Handles the underlying logic, generating or validating tokens and securely storing user info.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next.js API Routes&lt;/strong&gt;: Manage the requests to the server and coordinate with the &lt;strong&gt;better-sqlite3&lt;/strong&gt; database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database Operations&lt;/strong&gt;: The user’s authentication status and credentials are stored and retrieved using the lightning-fast &lt;strong&gt;better-sqlite3&lt;/strong&gt; library.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Follow these steps to integrate Google social login and email-based authentication in your Next.js project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the Repository&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/shahidkhans/better-auth-next-js-tailwind-google-login.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install Dependencies&lt;/strong&gt;
Navigate to the project folder and install all dependencies:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd &lt;/span&gt;better-auth-next-js-tailwind-google-login
   npm &lt;span class="nb"&gt;install
   &lt;/span&gt;npm run seed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will pull in &lt;strong&gt;Better_Auth **, **Next.js&lt;/strong&gt;, &lt;strong&gt;TailwindCSS&lt;/strong&gt;, &lt;strong&gt;better-sqlite3&lt;/strong&gt;, and other required packages.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure Environment Variables&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a &lt;code&gt;.env.local&lt;/code&gt; file in the root of your project.&lt;/li&gt;
&lt;li&gt;Add your &lt;strong&gt;Google Client ID&lt;/strong&gt; and &lt;strong&gt;Google Client Secret&lt;/strong&gt; along with any other required environment variables, for example:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nv"&gt;GOOGLE_CLIENT_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_google_client_id
 &lt;span class="nv"&gt;GOOGLE_CLIENT_SECRET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_google_client_secret
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Run the Development Server&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; to view the application in your browser. You can now test both &lt;strong&gt;Google login&lt;/strong&gt; and &lt;strong&gt;email-based&lt;/strong&gt; authentication flows.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Add Custom Styling &amp;amp; Components&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tailwind CSS is already pre-configured.
&lt;/li&gt;
&lt;li&gt;Modify your components and pages in the &lt;code&gt;pages&lt;/code&gt; directory to create a unique design matching your brand.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deploy Your Application&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once you are satisfied with the functionality, deploy your Next.js application to your favorite hosting platform (Vercel, Netlify, or a custom VPS).
&lt;/li&gt;
&lt;li&gt;Ensure you configure the production environment variables with the correct credentials.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Integrating &lt;strong&gt;Google social login&lt;/strong&gt; and &lt;strong&gt;email-based authentication&lt;/strong&gt; in your Next.js application doesn't have to be complicated. By using &lt;strong&gt;Better_Auth&lt;/strong&gt;, &lt;strong&gt;TailwindCSS&lt;/strong&gt;, and &lt;strong&gt;better-sqlite3&lt;/strong&gt;, you’ll achieve a lightweight, scalable, and secure solution. The steps above should help you get started quickly and empower you to customize further according to your project's requirements.&lt;/p&gt;

&lt;p&gt;Ready to take your &lt;strong&gt;Next.js&lt;/strong&gt; app to the next level? Dive into the repository, explore the demo, and start building a seamless authentication experience today.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Check out the full repository&lt;/strong&gt;: &lt;a href="https://github.com/shahidkhans/better-auth-next-js-tailwind-google-login" rel="noopener noreferrer"&gt;Better Auth, Next.js, Tailwind, Google Login&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you found this guide helpful, don’t forget to &lt;strong&gt;star the repo&lt;/strong&gt;, leave a comment, and share this post with your fellow developers. Feel free to &lt;strong&gt;ask questions or request new features&lt;/strong&gt; – we’d love to hear your feedback!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Happy Coding!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Stay secure, stay productive, and keep building amazing web applications.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app-tianji.msgbyte.com/telemetry/cm7hltf2w9vgqk6juahxncjq0/cm7hluh7e9vr3k6juce0hh4ts.gif?url=https://dev.to/shahidkhans/easiest-way-to-implement-social-login-google-and-email-based-authentication-using-better-auth-1la3"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>betterauth</category>
      <category>nextjs</category>
      <category>react</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>Elevate Your Conversations with Awesome ChatGPT Prompts</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Tue, 07 Jan 2025 16:25:28 +0000</pubDate>
      <link>https://dev.to/shahidkhans/elevate-your-conversations-with-awesome-chatgpt-prompts-hm</link>
      <guid>https://dev.to/shahidkhans/elevate-your-conversations-with-awesome-chatgpt-prompts-hm</guid>
      <description>&lt;p&gt;&lt;em&gt;By Shahid&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1593642532744-d377ab507dc8%3Fixlib%3Drb-4.0.3%26auto%3Dformat%26fit%3Dcrop%26w%3D1171%26q%3D80" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1593642532744-d377ab507dc8%3Fixlib%3Drb-4.0.3%26auto%3Dformat%26fit%3Dcrop%26w%3D1171%26q%3D80" alt="Colorful ChatGPT Prompt Illustration" width="1171" height="782"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Image Source: &lt;a href="https://unsplash.com" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;ChatGPT has taken the world by storm with its ability to converse, brainstorm ideas, and generate content on just about any topic you can imagine. But let’s be real—sometimes all you need is the right &lt;strong&gt;prompt&lt;/strong&gt; to spark true AI magic. Whether you’re a business owner, a creative writer, a student, or just someone who loves to explore new possibilities, writing effective ChatGPT prompts can be a total game-changer.&lt;/p&gt;

&lt;p&gt;In this post, we’ll dive into some awesome ChatGPT prompt ideas and best practices that’ll help you get the most out of your AI-powered interactions. For even more inspiration and ready-made prompt collections, don’t forget to check out the dedicated prompt website &lt;a href="https://prompts.chat/" rel="noopener noreferrer"&gt;Prompts.chat&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Storyteller’s Dream
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
“&lt;em&gt;Write a short story about a detective who communicates only in riddles, set in an abandoned carnival at midnight.&lt;/em&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  Why It Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Focus&lt;/strong&gt;: You’re giving ChatGPT a clear genre (mystery) and setting (abandoned carnival).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uniqueness&lt;/strong&gt;: You’re adding a twist with the detective’s strange communication style.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creativity&lt;/strong&gt;: This prompt can inspire an entertaining and unique narrative.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Experiment with time periods, unique locations, and unusual character quirks to see how ChatGPT weaves them into an engaging story.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Rapid Brainstorming for Content Creators
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
“&lt;em&gt;Suggest 10 catchy blog post titles about sustainable fashion, each with a one-line summary.&lt;/em&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  Why It Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clarity&lt;/strong&gt;: You’re specifying an exact number of suggestions (10) and asking for brief summaries.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Actionable&lt;/strong&gt;: Immediate use for content outlines or editorial calendars.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficiency&lt;/strong&gt;: Cuts down brainstorming time so you can focus on content creation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Vary the number of ideas or the level of detail you request. Sometimes you might want just headlines; other times you might want fully fleshed-out bullet points.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Complex Problem-Solving
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
“&lt;em&gt;Explain the concept of quantum computing to a class of 10th graders, using real-world analogies.&lt;/em&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  Why It Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Contextual Learning&lt;/strong&gt;: By specifying a 10th-grade audience, ChatGPT will (ideally) deliver content at an accessible level.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarity&lt;/strong&gt;: Real-world analogies make complex topics more digestible.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Variety&lt;/strong&gt;: You can request more depth or different analogies for advanced audiences.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; If something is unclear, follow up with a new prompt that asks ChatGPT to clarify or provide additional examples. This iterative process refines the output until you get a perfect explanation.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Character Creation for Role-Playing Games
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
“&lt;em&gt;Create a heroic elf character for a fantasy RPG who is a skilled archer and grapples with a secret fear of water. Include backstory, personality traits, and special abilities.&lt;/em&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  Why It Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Specificity&lt;/strong&gt;: You’re detailing race (elf), skill (archery), and an internal conflict (fear of water).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Depth&lt;/strong&gt;: Asking for backstory, personality, and abilities encourages a rich narrative.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versatility&lt;/strong&gt;: This approach can be adapted for any RPG setting—fantasy, sci-fi, horror, you name it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Tailor the character creation prompt with extra details about the game world or other characters to see how ChatGPT ties the story elements together.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Personal Development and Goal Setting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
“&lt;em&gt;Act as a life coach and outline a 4-week plan for building a daily meditation habit, including steps, motivational tips, and trackable milestones.&lt;/em&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  Why It Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structure&lt;/strong&gt;: A 4-week plan provides a clear timeline.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guidance&lt;/strong&gt;: Includes motivational tips and milestones for accountability.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt;: You can tailor the plan to suit different lifestyles or personal challenges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Use ChatGPT as a brainstorming partner for personal goals—like fitness, mental well-being, or career development. Iterate with follow-up prompts to refine your plan or add more details.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Fun and Educational Quizzes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
“&lt;em&gt;Create a 10-question trivia quiz about world mythology with multiple-choice answers, and include a short explanation for each correct answer.&lt;/em&gt;”&lt;/p&gt;

&lt;h3&gt;
  
  
  Why It Works
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interactive&lt;/strong&gt;: Multiple-choice quizzes are fun for users.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Educational&lt;/strong&gt;: Including brief explanations ensures learning is part of the process.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible&lt;/strong&gt;: You can adapt this for any subject—pop culture, history, science, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; If you’re managing online communities, these quizzes can engage your audience. You can also ask ChatGPT to generate puzzles, riddles, or other interactive activities.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tips for Crafting Awesome ChatGPT Prompts
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Be Specific&lt;/strong&gt;: Provide context, audience details, and desired format.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use Constraints&lt;/strong&gt;: Word counts, time periods, or character limits can guide ChatGPT toward more focused answers.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterate&lt;/strong&gt;: Don’t be afraid to refine your prompt or ask follow-up questions to sharpen the output.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experiment&lt;/strong&gt;: Explore new angles, unique story elements, or unusual topics to spark creativity.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Wrapping Up
&lt;/h3&gt;

&lt;p&gt;From creative storytelling and content brainstorming to education and personal growth, ChatGPT’s versatility hinges on your ability to craft excellent prompts. Think of each prompt as the steering wheel guiding the AI in a specific direction—more detail and clarity lead to more tailored, engaging responses.&lt;/p&gt;

&lt;p&gt;Don’t be afraid to experiment. With each well-designed prompt, you’re one step closer to unlocking ChatGPT’s full potential!&lt;/p&gt;

&lt;p&gt;For additional prompt ideas, resources, and inspiration, be sure to visit &lt;a href="https://prompts.chat/" rel="noopener noreferrer"&gt;Prompts.chat&lt;/a&gt;—a dedicated website to help you level up your AI interactions even more.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have any awesome prompts that blew you away? Share them in the comments below!&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;About the Author&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I am passionate blogger who loves exploring the potential of AI and technology for boosting creativity and productivity. When not experimenting with new ChatGPT prompts, enjoys dabbling in programming, trying out new coffee brews, and reading technical books.&lt;/p&gt;




</description>
      <category>promptengineering</category>
      <category>ai</category>
    </item>
    <item>
      <title>Worried About Email Spamming?</title>
      <dc:creator>Shahid</dc:creator>
      <pubDate>Fri, 03 Jan 2025 16:59:08 +0000</pubDate>
      <link>https://dev.to/shahidkhans/worried-about-email-spamming-2d3e</link>
      <guid>https://dev.to/shahidkhans/worried-about-email-spamming-2d3e</guid>
      <description>&lt;p&gt;Wanted to protect your email from web scrapers and Bots, Share your email to real person. &lt;br&gt;
use this &lt;a href="http://scr.im/" rel="noopener noreferrer"&gt;http://scr.im/&lt;/a&gt; Free service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feucfb3y0r3o9an6g9wvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feucfb3y0r3o9an6g9wvb.png" alt="Image description" width="800" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
