<?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: Lei Zhang</title>
    <description>The latest articles on DEV Community by Lei Zhang (@zhang_lei_d5d577e6d0b5421).</description>
    <link>https://dev.to/zhang_lei_d5d577e6d0b5421</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%2F2564721%2Fd38ce08a-5b70-409a-96bd-07a7708c3400.jpg</url>
      <title>DEV Community: Lei Zhang</title>
      <link>https://dev.to/zhang_lei_d5d577e6d0b5421</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zhang_lei_d5d577e6d0b5421"/>
    <language>en</language>
    <item>
      <title>Cinematic ANSI Banners for Rust</title>
      <dc:creator>Lei Zhang</dc:creator>
      <pubDate>Sat, 20 Dec 2025 06:42:57 +0000</pubDate>
      <link>https://dev.to/zhang_lei_d5d577e6d0b5421/cinematic-ansi-banners-for-rust-1ceo</link>
      <guid>https://dev.to/zhang_lei_d5d577e6d0b5421/cinematic-ansi-banners-for-rust-1ceo</guid>
      <description>&lt;h2&gt;
  
  
  tui-banner: Instantly Turn Your Rust CLI into a Cinematic Masterpiece!
&lt;/h2&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%2F52cnerzpw7ws7e7cw8bx.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%2F52cnerzpw7ws7e7cw8bx.png" alt=" " width="800" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you ever, while coding away in your terminal, fantasized about your program launching with a jaw-dropping ASCII/ANSI spectacle? Warped fonts, glowing gradients, cyberpunk aesthetics, a Matrix-style digital rain... a level of ceremony that's off the charts!&lt;/p&gt;

&lt;p&gt;That dream is now a reality—because &lt;strong&gt;tui-banner&lt;/strong&gt; has arrived! This is a zero-dependency, pure Rust library for generating terminal banners, a "visual nuke" crafted specifically for CLI/TUI applications. In just a few lines of code, you can transform your terminal's launch screen into a Hollywood-grade work of art.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Makes tui-banner So Hardcore?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Zero Dependencies&lt;/strong&gt;: Relies on no external crates. No need to install fonts or download Figlet files. Your binary stays lean and mean.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Truecolor Support&lt;/strong&gt;: Flawless support for Truecolor (24-bit) and ANSI256 colors, delivering silky-smooth transitions that far surpass traditional ANSI art.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Figlet Font Rendering&lt;/strong&gt;: Comes with a built-in classic Figlet font engine, supporting all standard Figlet fonts.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Preset Styles&lt;/strong&gt;: Includes 14 hand-picked, cinematic color schemes ready to use with a single line of code:

&lt;ul&gt;
&lt;li&gt;  Matrix (The classic green-and-black cyber digital rain)&lt;/li&gt;
&lt;li&gt;  Neon Cyber (Vibrant neon cyberpunk)&lt;/li&gt;
&lt;li&gt;  Aurora Flux (An ethereal, aurora-like shimmer)&lt;/li&gt;
&lt;li&gt;  Deep Space (A vast, deep-space nebula)&lt;/li&gt;
&lt;li&gt;  Ocean Flow (The fluid motion of the ocean)&lt;/li&gt;
&lt;li&gt;  Sunset Neon (A blazing neon sunset)&lt;/li&gt;
&lt;li&gt;  Fire Warning (An intense fire alert)&lt;/li&gt;
&lt;li&gt;  Warm Luxury (Elegant and warm gold tones)&lt;/li&gt;
&lt;li&gt;  Forest Sky (The serene mood of a forest canopy)&lt;/li&gt;
&lt;li&gt;  Earth Tone (Natural, earthy colors)&lt;/li&gt;
&lt;li&gt;  Chrome (Sleek metallic chrome)&lt;/li&gt;
&lt;li&gt;  Royal Purple (Rich and royal purple)&lt;/li&gt;
&lt;li&gt;  CRT Amber (Classic CRT amber-on-black)&lt;/li&gt;
&lt;li&gt;  Arctic Tech (A cool, high-tech arctic blue)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Highly Customizable&lt;/strong&gt;: Gradients, palettes, fill characters, borders... you have total control to tweak it however you want.&lt;/li&gt;

&lt;li&gt;  &lt;strong&gt;Blazing Fast&lt;/strong&gt;: Renders so fast it's practically instantaneous. Your launch screen appears in a flash.&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  How Simple Is the Code?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;tui_banner&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;Banner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Style&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nn"&gt;tui_banner&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;BannerError&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;banner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Banner&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"RUST CLI"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
        &lt;span class="nf"&gt;.style&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Style&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Matrix&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;// Select a style with one line&lt;/span&gt;
        &lt;span class="nf"&gt;.render&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nd"&gt;println!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"{banner}"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With just these few lines, your program's launch will feel like a scene from The Matrix!&lt;/p&gt;

&lt;p&gt;Want to get even fancier? Try customizing the gradient and font:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;banner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Banner&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"WELCOME"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;.font&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Big"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                        &lt;span class="c1"&gt;// Switch to a larger font&lt;/span&gt;
    &lt;span class="nf"&gt;.gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                     &lt;span class="c1"&gt;// Enable the gradient&lt;/span&gt;
    &lt;span class="nf"&gt;.palette&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"cyberpunk"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;               &lt;span class="c1"&gt;// Use a custom palette&lt;/span&gt;
    &lt;span class="nf"&gt;.fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"•"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                          &lt;span class="c1"&gt;// Set a custom fill character&lt;/span&gt;
    &lt;span class="nf"&gt;.render&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Who Is This For?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Rust Developers&lt;/strong&gt;: Give your command-line tools a high-end, professional launch screen.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;TUI Project Authors&lt;/strong&gt;: Add a touch of ceremony to your &lt;code&gt;ratatui&lt;/code&gt; or &lt;code&gt;cursive&lt;/code&gt; projects.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Open Source Enthusiasts&lt;/strong&gt;: Make your tool's screenshots instantly eye-catching on GitHub.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Terminal Aesthetes&lt;/strong&gt;: For those who believe that even daily coding should be a beautiful experience!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Official Website
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://tui-banner-website.pages.dev/" rel="noopener noreferrer"&gt;tui-banner Official Website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the link for a visual feast: see all 14 styles rendered, with detailed usage, API documentation, and of course, it's all free and open source.&lt;/p&gt;

&lt;h3&gt;
  
  
  One Last Thing...
&lt;/h3&gt;

&lt;p&gt;If you're still launching your programs with &lt;code&gt;println!("Hello, world!")&lt;/code&gt;, you're seriously missing out.&lt;br&gt;
It's time for your CLI to be the main character of the terminal.&lt;/p&gt;

&lt;p&gt;The Rust community has delivered another "make-you-scream-with-joy" tool. Go star it and light up your terminal! 🚀&lt;/p&gt;

</description>
      <category>rust</category>
      <category>tui</category>
      <category>banner</category>
      <category>cli</category>
    </item>
    <item>
      <title>CAMEL DatabaseAgent: An Open-Source Solution for Converting Complex Data Queries into Natural Conversations</title>
      <dc:creator>Lei Zhang</dc:creator>
      <pubDate>Thu, 03 Apr 2025 14:11:46 +0000</pubDate>
      <link>https://dev.to/zhang_lei_d5d577e6d0b5421/camel-databaseagent-an-open-source-solution-for-converting-complex-data-queries-into-natural-1968</link>
      <guid>https://dev.to/zhang_lei_d5d577e6d0b5421/camel-databaseagent-an-open-source-solution-for-converting-complex-data-queries-into-natural-1968</guid>
      <description>&lt;h2&gt;
  
  
  Pain Points in Data Analysis and Solutions
&lt;/h2&gt;

&lt;p&gt;In today's data-driven business environment, a common scenario is: business analysts urgently need certain data analysis but must wait for technical team members who know SQL to provide support. According to a McKinsey study, analysts spend an average of 30-40% of their time just on data preparation and query construction. This dependency not only delays the decision-making process but also increases the workload of the technical team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is why I developed CAMEL DatabaseAgent&lt;/strong&gt; — a revolutionary open-source tool that allows anyone to converse with databases using natural language, as simply as talking to a colleague. Without writing a single line of SQL code, analysts can directly obtain the data insights they need.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Advantages of CAMEL DatabaseAgent
&lt;/h2&gt;

&lt;p&gt;Compared to other text-to-SQL tools on the market, CAMEL DatabaseAgent has the following significant advantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fully open-source&lt;/strong&gt;: Transparent code and community-driven development ensure continuous improvement and customization flexibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-language support&lt;/strong&gt;: Ability to understand and respond to queries in multiple languages including Chinese, English, and Korean&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic database understanding&lt;/strong&gt;: Analyzes database structure and generates appropriate few-shot learning examples&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read-only mode&lt;/strong&gt;: Default safe operation that protects databases from accidental modifications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple integration&lt;/strong&gt;: Easy to integrate with existing systems and workflows&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Technical Architecture: How It Works
&lt;/h2&gt;

&lt;p&gt;CAMEL DatabaseAgent is built on the &lt;a href="https://github.com/camel-ai/camel" rel="noopener noreferrer"&gt;CAMEL-AI&lt;/a&gt; and consists of three core components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DataQueryInferencePipeline&lt;/strong&gt;: This intelligent component analyzes your database structure and automatically generates training examples, including questions and corresponding SQL queries. It uses advanced inference techniques to understand relationships between tables and the semantics of the data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DatabaseKnowledge&lt;/strong&gt;: A specially designed vector database for efficiently storing and retrieving database schemas, sample data, and query patterns. This component enables the system to quickly "recall" relevant database knowledge to answer user questions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DatabaseAgent&lt;/strong&gt;: An intelligent agent based on large language models (LLMs) that receives natural language questions, uses DatabaseKnowledge to generate precise SQL queries, executes queries, and returns results in a user-friendly format.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Supported database systems include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SQLite&lt;/li&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All operations are performed in read-only mode by default, ensuring data security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-world Application Cases: From Simple to Complex
&lt;/h2&gt;

&lt;p&gt;I tested this tool on a real database from a music distribution platform, and the results were impressive. Here are several application scenarios in increasing order of complexity:&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Queries
&lt;/h3&gt;

&lt;p&gt;When I asked "Find the names of playlists containing more than 10 tracks," the system immediately generated the correct SQL:&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%2Fp59967pz7aa1s5zfwy5l.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%2Fp59967pz7aa1s5zfwy5l.png" alt="Basic Queries" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system can understand simple filtering and counting requirements&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Medium Complexity Queries
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Scenario 1&lt;/strong&gt;: Statistics on sales data within a specific time period&lt;br&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%2Feuwl7x1vsguxb261q6jp.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%2Feuwl7x1vsguxb261q6jp.png" alt="Statistics on sales data within a specific time period" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system successfully handled multi-table joins and time range filtering&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 2&lt;/strong&gt;: Financial analysis grouped by category&lt;br&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%2Fxqszsb3f3iz8sz2x0y9l.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%2Fxqszsb3f3iz8sz2x0y9l.png" alt="Financial analysis grouped by category" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system can understand grouping, aggregation, and complex table relationships&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Advanced Analysis Queries
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Scenario 3&lt;/strong&gt;: Performance ranking analysis&lt;br&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%2Frqnoz17bfj4i8hlmd9h5.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%2Frqnoz17bfj4i8hlmd9h5.png" alt="Performance ranking analysis" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system handled multi-table joins, sorting, and limit conditions&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 4&lt;/strong&gt;: Conditional filtering and counting&lt;br&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%2F9njyfdoqbo6vqptwlfwh.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%2F9njyfdoqbo6vqptwlfwh.png" alt="Conditional filtering and counting" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system can use subqueries and complex conditions&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 5&lt;/strong&gt;: Percentage calculation&lt;br&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%2F2sixx8svti4cna9fiame.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%2F2sixx8svti4cna9fiame.png" alt="Percentage calculation" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system can perform mathematical calculations and conditional counting&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 6&lt;/strong&gt;: Complex relational analysis&lt;br&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%2Fhbt974z5gjkc7ytt33xi.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%2Fhbt974z5gjkc7ytt33xi.png" alt="Complex relational analysis" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system can handle left joins and null value situations&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Breaking Language Barriers: Multi-language Support
&lt;/h2&gt;

&lt;p&gt;In globalized team environments, language barriers are often bottlenecks for data collaboration. CAMEL DatabaseAgent supports multi-language interaction, allowing team members from different language backgrounds to train knowledge and perform data queries in their native languages.&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%2Fud9hu1y88lxhaom0njuq.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%2Fud9hu1y88lxhaom0njuq.png" alt="Chinese" width="800" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Training knowledge and asking questions in Chinese&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foy86w2j11aby26duxfts.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%2Foy86w2j11aby26duxfts.png" alt="Korean" width="800" height="544"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The system also supports other languages like Korean, and all you need to do is specify the language when connecting to the database&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting Started Guide: Up and Running in 5 Minutes
&lt;/h2&gt;

&lt;p&gt;Want to try CAMEL DatabaseAgent? Just a few simple steps:&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;# 1. Clone the repository&lt;/span&gt;
git clone git@github.com:coolbeevip/camel-database-agent.git
&lt;span class="nb"&gt;cd &lt;/span&gt;camel-database-agent

&lt;span class="c"&gt;# 2. Set up the environment&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;uv ruff mypy
uv venv .venv &lt;span class="nt"&gt;--python&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3.10
&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
uv &lt;span class="nb"&gt;sync&lt;/span&gt; &lt;span class="nt"&gt;--all-extras&lt;/span&gt;

&lt;span class="c"&gt;# 3. Configure API keys&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk-xxx
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENAI_API_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://api.openai.com/v1/
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;MODEL_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gpt-4o-mini

&lt;span class="c"&gt;# 4. Connect to the sample database and start using&lt;/span&gt;
python camel_database_agent/cli.py &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--database-url&lt;/span&gt; sqlite:///database/sqlite/music.sqlite
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On first connection, the system will spend a few minutes analyzing the database and generating a knowledge base. Subsequent use will be very smooth, with response times typically within 1-3 seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integration API for Developers
&lt;/h2&gt;

&lt;p&gt;For developers who wish to integrate this functionality into their own applications or systems, we provide a concise Python API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Install the dependency library
&lt;/span&gt;&lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;camel&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;database&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize the database agent
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;camel_database_agent&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DatabaseAgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;DatabaseManager&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TrainLevel&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;camel_database_agent.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ModelFactory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OpenAIEmbedding&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;

&lt;span class="n"&gt;database_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DatabaseAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;interactive_mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;database_manager&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;DatabaseManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;database_url&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ModelFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;provider&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;embedding_model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;OpenAIEmbedding&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Train the agent on database schema knowledge
&lt;/span&gt;&lt;span class="n"&gt;database_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;train_knowledge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;TrainLevel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MEDIUM&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Execute queries using natural language
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;database_agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;session_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uuid4&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
    &lt;span class="n"&gt;question&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;List all playlists containing more than 5 tracks&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Process the returned results
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# Natural language answer
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;     &lt;span class="c1"&gt;# Generated SQL query
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;# Structured query results
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;CAMEL DatabaseAgent represents the future of database interaction—making data queries as natural as everyday conversation. It not only improves the efficiency of data analysts but also empowers non-technical personnel to directly obtain data insights, thereby accelerating the decision-making process across the entire organization.&lt;/p&gt;

&lt;p&gt;In the era of data democratization, tools should not be barriers to gaining insights. Through CAMEL DatabaseAgent, I hope to contribute to breaking down these barriers, allowing everyone to easily converse with data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/coolbeevip/camel-database-agent" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you find this project valuable, don't forget to give it a star ⭐! Your support is the driving force behind the development of open-source projects!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A JetBrains Plugin for Git Log Analysis</title>
      <dc:creator>Lei Zhang</dc:creator>
      <pubDate>Fri, 13 Dec 2024 05:47:11 +0000</pubDate>
      <link>https://dev.to/zhang_lei_d5d577e6d0b5421/an-intellij-plugin-for-git-log-analysis-2i88</link>
      <guid>https://dev.to/zhang_lei_d5d577e6d0b5421/an-intellij-plugin-for-git-log-analysis-2i88</guid>
      <description>&lt;p&gt;The Git Assistant plugin for IntelliJ IDEA is a robust tool designed to provide extensive visual insights derived from Git logs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;With its Hour/Weekday/Month feature, you can analyze when your team is most active, helping to optimize work schedules and task assignments.&lt;/li&gt;
&lt;li&gt;The Timezone feature allows you to visualize the distribution of code contributions across different time zones, enhancing the visibility of global collaboration.&lt;/li&gt;
&lt;li&gt;Additionally, the Project Top(N) feature highlights the latest areas of change and identifies key contributors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to Install the Git Assistant Plugin
&lt;/h3&gt;

&lt;p&gt;To get started, install the Git Assistant plugin in IntelliJ IDEA by searching for &lt;code&gt;Git Assistant&lt;/code&gt; in the plugin marketplace. Once installed, you'll find visual statistics displayed in the Git Assistant Insights panel on the right.&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%2Fpncjheuolk0lbtbssla0.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%2Fpncjheuolk0lbtbssla0.png" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Visual Insights on Submissions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Contributor Ranking:&lt;/strong&gt; Discover who leads the way in your repository. It’s not just informative, it’s also a fun and competitive experience!&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%2Fira9djo4ejc7qygaoapo.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%2Fira9djo4ejc7qygaoapo.png" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Activity Time Analysis:&lt;/strong&gt; Identify when your team is most productive—whether by hour, week, month, or year. Are you a night owl, or do you prefer early mornings?&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%2F9vkapu4pwnxt5vewpz90.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%2F9vkapu4pwnxt5vewpz90.png" alt="Image description" width="800" height="519"&gt;&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%2F4qrnne6hn7cigcwuhmlc.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%2F4qrnne6hn7cigcwuhmlc.png" alt="Image description" width="800" height="519"&gt;&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%2Fx669bk3ziioyt3u0ki30.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%2Fx669bk3ziioyt3u0ki30.png" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timezone Insights:&lt;/strong&gt; See where your contributions are coming from globally, making team collaboration easier to understand. A logarithmic scale can enhance the visual representation.&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%2Fs6jrayfi0oxcqni4qpm0.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%2Fs6jrayfi0oxcqni4qpm0.png" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Changing Hotspots:&lt;/strong&gt; Check out which modules have seen the most updates recently, along with insights into your top contributors.&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%2Fprzjwxr7m10njdaeoxzr.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%2Fprzjwxr7m10njdaeoxzr.png" alt="Image description" width="800" height="519"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;For more details about the Git Assistant plugin and to share your feedback, visit the &lt;a href="https://plugins.jetbrains.com/plugin/24154-git-assistant" rel="noopener noreferrer"&gt;JetBrains Marketplace&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
