<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Terminal Root</title>
    <description>A little much about C++, Game Development, Programming and Web
</description>
    <link>https://terminalroot.com/</link>
    <atom:link href="https://terminalroot.com/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 06 May 2026 12:42:21 +0000</pubDate>
    <lastBuildDate>Wed, 06 May 2026 12:42:21 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Quickshell: Build Your Own Desktop on Linux</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/qt/img-quick-shell-800.jpg&quot; alt=&quot;Quickshell: Build Your Own Desktop on Linux&quot; title=&quot;🔳 Instead of relying on ready-made solutions (Waybar, Polybar, ...), you create your own.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Quickshell&lt;/strong&gt; is a modern toolkit built with &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt; for creating desktop interface components — bars, widgets, lock screens, launchers, and even complete environments — using &lt;a href=&quot;https://terminalroot.com/tags#qt&quot;&gt;QtQuick + QML&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It is not a “bar program”.&lt;/li&gt;
  &lt;li&gt;It is also not a complete, ready-made desktop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is a &lt;strong&gt;foundation for building a custom desktop&lt;/strong&gt;, running alongside a compositor like Hyprland, Sway, or i3.&lt;/p&gt;

&lt;p&gt;In practice, it replaces several pieces:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;status bar&lt;/li&gt;
  &lt;li&gt;notifications&lt;/li&gt;
  &lt;li&gt;widgets&lt;/li&gt;
  &lt;li&gt;lockscreen&lt;/li&gt;
  &lt;li&gt;display manager&lt;/li&gt;
  &lt;li&gt;system controls&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;

&lt;p&gt;Quickshell uses:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;QtQuick (UI)&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;QML (configuration/programming)&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;Hot reload (save → instant update) ([Quickshell][2])&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simple example (bar):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-qml&quot; data-lang=&quot;qml&quot;&gt;&lt;span class=&quot;kt&quot;&gt;PanelWindow&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;kt&quot;&gt;anchors&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;nl&quot;&gt;implicitHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;

  &lt;span class=&quot;kt&quot;&gt;Text&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;anchors.centerIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parent&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;hello world&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;native-integrations&quot;&gt;Native integrations:&lt;/h3&gt;

&lt;p&gt;One of its strengths is that it comes already integrated with the system:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Wayland + X11 (windowing)&lt;/li&gt;
  &lt;li&gt;Hyprland, i3, Sway (workspaces)&lt;/li&gt;
  &lt;li&gt;PipeWire (audio)&lt;/li&gt;
  &lt;li&gt;BlueZ (Bluetooth)&lt;/li&gt;
  &lt;li&gt;UPower (battery)&lt;/li&gt;
  &lt;li&gt;MPRIS (media players)&lt;/li&gt;
  &lt;li&gt;standard system tray&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This eliminates a lot of boilerplate.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Arch Linux / EndeavourOS / Manjaro&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;yay &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; quickshell
&lt;span class=&quot;c&quot;&gt;### Or&lt;/span&gt;
paru &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; quickshell&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Or build from scratch on any system:&lt;/p&gt;

&lt;p&gt;Dependencies:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;cmake ninja-build qt6-base-dev qt6-declarative-dev &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
qt6-wayland wayland-protocols libpipewire-0.3-dev &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
libdbus-1-dev libxkbcommon-dev&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Clone:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git clone https://github.com/quickshell-mirror/quickshell.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;quickshell&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Build:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;cmake &lt;span class=&quot;nt&quot;&gt;-B&lt;/span&gt; build &lt;span class=&quot;nt&quot;&gt;-G&lt;/span&gt; Ninja
cmake &lt;span class=&quot;nt&quot;&gt;--build&lt;/span&gt; build&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Install:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;cmake &lt;span class=&quot;nt&quot;&gt;--install&lt;/span&gt; build&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Run:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;quickshell&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Configuration:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;~/.config/quickshell/main.qml&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Minimal example:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-qml&quot; data-lang=&quot;qml&quot;&gt;&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;QtQuick&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Quickshell&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;PanelWindow&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;anchors.top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;anchors.left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;anchors.right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;implicitHeight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;

    &lt;span class=&quot;kt&quot;&gt;Text&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nl&quot;&gt;anchors.centerIn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;parent&lt;/span&gt;
        &lt;span class=&quot;nl&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Quickshell is working&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;Works best on &lt;strong&gt;Wayland&lt;/strong&gt; (Hyprland, Sway, etc.)&lt;/li&gt;
  &lt;li&gt;May be limited on X11&lt;/li&gt;
  &lt;li&gt;Still in development → bugs are normal&lt;/li&gt;
  &lt;li&gt;No config = blank screen&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://github.com/quickshell-mirror/quickshell&quot;&gt;repository&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;learn-qt&quot;&gt;&lt;a href=&quot;https://terminalroot.com.br/qt&quot;&gt;Learn Qt&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;httpsterminalrootcombrqt&quot;&gt;&lt;a href=&quot;https://terminalroot.com.br/qt&quot;&gt;https://terminalroot.com.br/qt&lt;/a&gt;&lt;/h3&gt;
&lt;h2 id=&quot;complete-c-course&quot;&gt;&lt;a href=&quot;https://terminalroot.com.br/promo&quot;&gt;Complete C++ Course&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id=&quot;httpsterminalrootcombrpromo&quot;&gt;&lt;a href=&quot;https://terminalroot.com.br/promo&quot;&gt;https://terminalroot.com.br/promo&lt;/a&gt;&lt;/h3&gt;
</description>
        <pubDate>Wed, 06 May 2026 09:37:06 +0000</pubDate>
        <link>https://terminalroot.com/quickshell-build-your-own-desktop-on-linux/</link>
        <guid isPermaLink="true">https://terminalroot.com/quickshell-build-your-own-desktop-on-linux/</guid>
        
        <category>cpp</category>
        
        <category>qt</category>
        
        <category>gnulinux</category>
        
        
      </item>
    
      <item>
        <title>Meet this modern docking framework for JavaFX</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/java/the-snapfx.png&quot; alt=&quot;Meet this modern docking framework for JavaFX&quot; title=&quot;☕ Build IDE-style layouts in JavaFX without limitations or workarounds.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;SnapFX&lt;/strong&gt; is a &lt;strong&gt;docking framework for JavaFX&lt;/strong&gt;, focused on creating flexible interfaces in the style of:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;IntelliJ / VS Code&lt;/li&gt;
  &lt;li&gt;IDEs in general&lt;/li&gt;
  &lt;li&gt;tools with multiple panels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lightweight and modern, designed for dynamic and organized layouts, without you having to reinvent drag &amp;amp; drop for windows.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;
&lt;p&gt;Via &lt;a href=&quot;https://terminalroot.com.br/2023/05/como-utilizar-o-gradle.html&quot;&gt;Gradle&lt;/a&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;implementation&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;org.snapfx:snapfx-core:&amp;lt;version&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Build:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git clone https://github.com/Beowolve/SnapFX.git
./gradlew publishToMavenLocal&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Simple Example:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-java&quot; data-lang=&quot;java&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.snapfx.SnapFX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javafx.application.Application&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javafx.scene.Scene&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javafx.scene.control.TextArea&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;javafx.stage.Stage&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SimpleDemo&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Application&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nd&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Stage&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;SnapFX&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;snapFX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SnapFX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Dock nodes&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;snapFX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dock&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TextArea&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Editor 1&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Editor&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;snapFX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;dock&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;TextArea&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Console&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Console&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;c1&quot;&gt;// Build layout&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;Scene&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scene&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Scene&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;snapFX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;buildLayout&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;800&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;600&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;setScene&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scene&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;snapFX&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// Optional: switch theme at runtime via named catalog entry&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// snapFX.setThemeStylesheet(SnapFX.getAvailableThemeStylesheets().get(&quot;Dark&quot;));&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://github.com/Beowolve/SnapFX&quot;&gt;repository&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 06 May 2026 09:03:00 +0000</pubDate>
        <link>https://terminalroot.com/meet-this-modern-docking-framework-for-javafx/</link>
        <guid isPermaLink="true">https://terminalroot.com/meet-this-modern-docking-framework-for-javafx/</guid>
        
        <category>java</category>
        
        
      </item>
    
      <item>
        <title>Route application traffic via command line</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/tori-cli.jpg&quot; alt=&quot;Route application traffic via command line&quot; title=&quot;A tool designed for use with the Tor network.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;toricli.sh&lt;/strong&gt; is a tool written in &lt;a href=&quot;https://terminalroot.com/tags#go&quot;&gt;Go&lt;/a&gt;, focused on making it easy to route application traffic via the command line. The goal is to simplify the use of anonymization on Linux without relying on complex configurations.&lt;/p&gt;

&lt;p&gt;It falls into the same category as tools like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;torsocks&lt;/code&gt;, but with a more direct and automated approach.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;
&lt;blockquote&gt;
  &lt;p&gt;For &lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt;, use &lt;a href=&quot;https://learn.microsoft.com/en-us/windows/wsl/install&quot;&gt;WSL&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;# systemd&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/thobiasn/tori-cli/main/deploy/install.sh | &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;sh

&lt;span class=&quot;c&quot;&gt;# Arch&lt;/span&gt;
yay &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; tori-cli-bin

&lt;span class=&quot;c&quot;&gt;# macOS&lt;/span&gt;
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/thobiasn/tori-cli/main/deploy/install.sh | sh &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--client&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Docker:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;docker run &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; tori &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;--restart&lt;/span&gt; unless-stopped &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;--pid&lt;/span&gt; host &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /var/run/docker.sock:/var/run/docker.sock:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /proc:/host/proc:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /sys:/host/sys:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; /run/tori:/run/tori &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; tori-data:/var/lib/tori &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; ./config.toml:/etc/tori/config.toml:ro &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  ghcr.io/thobiasn/tori-cli:latest&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;usage-example&quot;&gt;Usage example&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;toricli curl example.com&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And the traffic is anonymized.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit: &lt;a href=&quot;https://toricli.sh/&quot;&gt;https://toricli.sh/&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Wed, 15 Apr 2026 22:03:23 +0000</pubDate>
        <link>https://terminalroot.com/route-application-traffic-via-command-line/</link>
        <guid isPermaLink="true">https://terminalroot.com/route-application-traffic-via-command-line/</guid>
        
        <category>network</category>
        
        <category>go</category>
        
        <category>terminal</category>
        
        
      </item>
    
      <item>
        <title>Pyrite64, a Modern Engine for Nintendo 64</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/gamedev/pyrite64.jpg&quot; alt=&quot;Pyrite64, a Modern Engine for Nintendo 64&quot; title=&quot;Despite having &apos;Py&apos; in its name, this engine uses C++ or C for development (scripting).&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Pyrite64&lt;/strong&gt; is an open-source engine + visual editor for creating &lt;strong&gt;native 3D Nintendo 64 games&lt;/strong&gt; — not “N64-style”, but games that actually run on original hardware or accurate emulators. For development (scripting) with &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt; or &lt;a href=&quot;https://terminalroot.com/tags#clanguage&quot;&gt;C&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s the idea?&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Replace the old workflow (confusing SDKs + broken toolchains)&lt;/li&gt;
  &lt;li&gt;Bring something closer to Unity/Godot, but focused on the N64&lt;/li&gt;
  &lt;li&gt;Generate real ROMs compatible with the console&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Features:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Visual editor with scene management&lt;/li&gt;
  &lt;li&gt;Model import (GLTF / Blender + Fast64)&lt;/li&gt;
  &lt;li&gt;Node graph (basic visual scripting)&lt;/li&gt;
  &lt;li&gt;Runtime engine (rendering, collision, audio, etc.)&lt;/li&gt;
  &lt;li&gt;HDR + bloom adapted for N64&lt;/li&gt;
  &lt;li&gt;Asset manager with automatic cleanup ([AlternativeTo][2])&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;h3 id=&quot;windows&quot;&gt;&lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The project itself automates almost everything.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Download the release (or clone the repo)&lt;/li&gt;
  &lt;li&gt;Run the editor&lt;/li&gt;
  &lt;li&gt;It automatically installs everything:&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;gnulinux&quot;&gt;&lt;a href=&quot;https://terminalroot.com/tags#gnulinux&quot;&gt;GNU/Linux&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Dependencies:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://terminalroot.com/tags#gcc&quot;&gt;GCC&lt;/a&gt;/&lt;a href=&quot;https://terminalroot.com/tags#llvm&quot;&gt;Clang&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://terminalroot.com/tags#cmake&quot;&gt;CMake&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Basic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build&lt;/code&gt; libs&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;libdragon&lt;/code&gt; toolchain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then just clone, compile, and install&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone https://github.com/HailToDodongo/pyrite64
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;pyrite64
&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;build &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;build
cmake ..
make
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;make &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Create a project&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Inside the editor:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;New Project&lt;/li&gt;
  &lt;li&gt;Set name + folder&lt;/li&gt;
  &lt;li&gt;It creates the structure with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;project.p64proj&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;ol&gt;
  &lt;li&gt;Configure toolchain + emulator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;File:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;err&quot;&gt;project.p&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;64&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;proj&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Important fields:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nl&quot;&gt;&quot;pathEmu&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;ares&quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;pathN64Inst&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/path/to/toolchain&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pathEmu&lt;/code&gt; → emulator command&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pathN64Inst&lt;/code&gt; → toolchain root ([Instagit][3])&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;ol&gt;
  &lt;li&gt;Import assets&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Typical workflow:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Model in Blender&lt;/li&gt;
  &lt;li&gt;Export GLTF&lt;/li&gt;
  &lt;li&gt;Import into the editor&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
  &lt;li&gt;Build the scene&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;Add objects&lt;/li&gt;
  &lt;li&gt;Adjust transforms&lt;/li&gt;
  &lt;li&gt;Define materials&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;ol&gt;
  &lt;li&gt;Game logic&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two options:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Node graph (visual)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt; (more control)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
  &lt;li&gt;Build and run&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;li&gt;“Run” button&lt;/li&gt;
  &lt;li&gt;Generates ROM&lt;/li&gt;
  &lt;li&gt;Opens automatically in the emulator&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://hailtododongo.github.io/pyrite64/docs/faq.html#do-i-need-to-know-programming&quot;&gt;official website with FAQ&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Sun, 12 Apr 2026 22:11:56 +0000</pubDate>
        <link>https://terminalroot.com/pyrite64-a-modern-engine-for-nintendo-64/</link>
        <guid isPermaLink="true">https://terminalroot.com/pyrite64-a-modern-engine-for-nintendo-64/</guid>
        
        <category>gamedev</category>
        
        <category>cpp</category>
        
        <category>clanguage</category>
        
        
      </item>
    
      <item>
        <title>Install This Modern Network Scanner with TUI Mode</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/nibble.jpg&quot; alt=&quot;Install This Modern Network Scanner with TUI Mode&quot; title=&quot;Built in Go, incredibly fast, and hassle-free.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you’ve used tools like &lt;a href=&quot;https://terminalroot.com.br/2018/07/escaneado-redes-com-nmap.html&quot;&gt;nmap&lt;/a&gt; and found them heavy, verbose, or too slow for simple tasks, &lt;strong&gt;Nibble&lt;/strong&gt; solves exactly that problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nibble&lt;/strong&gt; is an open-source network scanner focused on simplicity, speed, and usability. It allows you to discover devices and services on your local network without needing to memorize complex commands or configure anything manually. It works on &lt;a href=&quot;https://terminalroot.com/tags#gnulinux&quot;&gt;GNU/Linux&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/tags#macos&quot;&gt;macOS&lt;/a&gt;, and &lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt; (x86 and ARM).&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew install backendsystems/tap/nibble&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pipx install nibble-cli&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;npm install -g @backendsystems/nibble&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go install github.com/backendsystems/nibble@latest&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Or run it directly with:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;npx @backendsystems/nibble&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/backendsystems/nibble&quot;&gt;Nibble repository&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Wed, 25 Mar 2026 10:43:42 +0000</pubDate>
        <link>https://terminalroot.com/install-this-modern-network-scanner-with-tui-mode/</link>
        <guid isPermaLink="true">https://terminalroot.com/install-this-modern-network-scanner-with-tui-mode/</guid>
        
        <category>go</category>
        
        <category>tui</category>
        
        <category>terminal</category>
        
        <category>network</category>
        
        
      </item>
    
      <item>
        <title>Manage APT packages with a modern terminal interface</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/aptui.jpg&quot; alt=&quot;Manage APT packages with a modern terminal interface&quot; title=&quot;Built with Go, works as a frontend for APT.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;APTUI is a &lt;a href=&quot;https://terminalroot.com/tags#tui&quot;&gt;TUI (Terminal User Interface)&lt;/a&gt; written in &lt;a href=&quot;https://terminalroot.com/tags#go&quot;&gt;Go&lt;/a&gt; that acts as a frontend for APT.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The concept is simple: &lt;strong&gt;do everything you already do with APT, but without leaving the screen and without typing repetitive commands&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Main features&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Real-time filtering as you type&lt;/li&gt;
  &lt;li&gt;Fuzzy search (no need for exact name)&lt;/li&gt;
  &lt;li&gt;Fallback to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apt-cache search&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;h3 id=&quot;via-go&quot;&gt;Via Go&lt;/h3&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;go &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;github.com/mexirica/aptui@latest&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;or-via-apt-debianubuntu&quot;&gt;Or via APT (Debian/Ubuntu)&lt;/h3&gt;
&lt;blockquote&gt;
  &lt;p&gt;(custom repository available in the project)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then just run:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;aptui&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://github.com/mexirica/aptui&quot;&gt;repository&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Mon, 23 Mar 2026 11:13:08 +0000</pubDate>
        <link>https://terminalroot.com/manage-apt-packages-with-a-modern-terminal-interface/</link>
        <guid isPermaLink="true">https://terminalroot.com/manage-apt-packages-with-a-modern-terminal-interface/</guid>
        
        <category>go</category>
        
        <category>terminal</category>
        
        <category>tui</category>
        
        <category>gnulinux</category>
        
        
      </item>
    
      <item>
        <title>Manage Your SQL Databases via Terminal with This App</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/go/pam.jpg&quot; alt=&quot;Manage Your SQL Databases via Terminal with This App&quot; title=&quot;For developers, DBAs, and analysts who need a lightweight, fast, and powerful tool for working with multiple databases in the terminal.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Pam is a minimalist command-line interface (CLI) tool written in &lt;a href=&quot;https://terminalroot.com/tags#go&quot;&gt;Go&lt;/a&gt;, designed to simplify managing and executing &lt;a href=&quot;https://terminalroot.com/tags#sql&quot;&gt;SQL&lt;/a&gt; queries across multiple databases. Inspired by “The Office,” Pam pays homage to the character who organizes everything efficiently.&lt;/p&gt;

&lt;h3 id=&quot;key-features&quot;&gt;Key Features&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Query Library:&lt;/strong&gt; Save and organize your most-used SQL queries for easy access and reuse.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Multi-database Support:&lt;/strong&gt; Compatible with PostgreSQL, MySQL, SQLite, Oracle, SQL Server, ClickHouse, and Firebird.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://terminalroot.com/tags#tui&quot;&gt;TUI (Terminal User Interface)&lt;/a&gt;:&lt;/strong&gt; Keyboard-focused navigation with Vim-inspired shortcuts for efficient manipulation of query results.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Direct Editing:&lt;/strong&gt; Update cells, delete rows, and edit SQL directly in the results table.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Data Export:&lt;/strong&gt; Export results in formats such as &lt;a href=&quot;https://terminalroot.com/how-to-parse-csv-with-modern-cpp/&quot;&gt;CSV&lt;/a&gt;, &lt;a href=&quot;https://terminalroot.com/how-to-consume-apis-with-curl-and-cpp-in-the-terminal/&quot;&gt;JSON&lt;/a&gt;, SQL, &lt;a href=&quot;https://terminalroot.com/tags#markdown&quot;&gt;Markdown&lt;/a&gt;, or &lt;a href=&quot;https://terminalroot.com/tags#html&quot;&gt;HTML&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Parameterized Queries:&lt;/strong&gt; Support for parameterized queries, enabling dynamic searches without rewriting SQL.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;You can install Pam via Go, by downloading the binary directly from the releases repository, or using &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;Nix/NixOS&lt;/a&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;go &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;github.com/eduardofuncao/pam/cmd/pam@latest&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;basic-usage&quot;&gt;Basic Usage&lt;/h2&gt;

&lt;p&gt;After installation, initialize a connection to your desired database:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pam init mydb postgres &lt;span class=&quot;s2&quot;&gt;&quot;postgresql://user:pass@localhost:5432/mydb&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Add queries to your library:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pam add list_users &lt;span class=&quot;s2&quot;&gt;&quot;SELECT * FROM users&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And run them interactively:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;pam run list_users&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The TUI interface supports Vim-like shortcuts (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;h&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;l&lt;/code&gt;), copy cell (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;), export data (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;), edit cell (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;u&lt;/code&gt;), delete row (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;D&lt;/code&gt;), and more quick commands.&lt;/p&gt;

&lt;p&gt;Pam stores its configuration in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/pam/config.yaml&lt;/code&gt;, allowing you to adjust row limits, column widths, and color schemes for the interface.&lt;/p&gt;

&lt;p&gt;The app provides example commands for easily connecting to various database types, including PostgreSQL, &lt;a href=&quot;https://terminalroot.com/tags#mysql&quot;&gt;MySQL&lt;/a&gt;, SQL Server, Oracle, SQLite, ClickHouse, and Firebird.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit the &lt;a href=&quot;https://github.com/eduardofuncao/pam&quot;&gt;repository&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 04 Mar 2026 08:49:08 +0000</pubDate>
        <link>https://terminalroot.com/manage-your-sql-databases-via-terminal-with-this-app/</link>
        <guid isPermaLink="true">https://terminalroot.com/manage-your-sql-databases-via-terminal-with-this-app/</guid>
        
        <category>go</category>
        
        <category>sql</category>
        
        <category>cli</category>
        
        
      </item>
    
      <item>
        <title>How to optimize the cd command to go back multiple folders at once</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/bash/cd-menos.jpg&quot; alt=&quot;How to optimize the cd command to go back multiple folders at once&quot; title=&quot;Spend less time counting how many folders you need to go back with this hack. 😃&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Everyone in the &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;UNIX/GNU world&lt;/a&gt; constantly uses the &lt;a href=&quot;https://terminalroot.com/50-gnu-commands-x-50-powershell-commands/&quot;&gt;cd command&lt;/a&gt; to navigate into folders through the terminal.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; command, also known as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chdir&lt;/code&gt;, is a command implemented in command-line interfaces of various operating systems (&lt;a href=&quot;https://terminalroot.com/tags#unix&quot;&gt;Unix&lt;/a&gt; or any &lt;a href=&quot;https://terminalroot.com/tags#bsd&quot;&gt;Unix-like&lt;/a&gt; system, DOS, &lt;a href=&quot;https://terminalroot.com/tags#windows&quot;&gt;Windows&lt;/a&gt;, OS/2 and AmigaOS).&lt;/p&gt;

&lt;p&gt;On &lt;a href=&quot;https://terminalroot.com/tags#gnu&quot;&gt;GNU&lt;/a&gt; systems (used by most Linux distros) it is a &lt;em&gt;shell builtin&lt;/em&gt;, meaning it’s a bit more complicated to create a &lt;a href=&quot;https://terminalroot.com/how-to-create-apply-and-use-the-patch-command/&quot;&gt;patch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; command is very useful, however, one of the most &lt;em&gt;annoying&lt;/em&gt; things is when you navigate into many folders and want to go back an exact number of steps, requiring commands like:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ../../../../../../
&lt;span class=&quot;c&quot;&gt;# Or&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..
&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ..&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In both cases above, you need to go back &lt;em&gt;6 times&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;But we can create a &lt;a href=&quot;https://terminalroot.com/tags#bash&quot;&gt;Bash function&lt;/a&gt; that reduces the amount of typing, making it faster and &lt;em&gt;like a boss&lt;/em&gt; to go back to the 6th folder without much difficulty, like this: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -6&lt;/code&gt;. Just add this function below to the end of your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~ ^-[0-9]+&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;then
        &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;#-&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;0&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; i&amp;lt;n&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; i++&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do
            &lt;/span&gt;path+&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;../&quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;done
        &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;builtin cd&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$path&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else
        &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;builtin cd&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$@&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Then reload your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt; with the command: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exec $SHELL&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source ~/.bashrc&lt;/code&gt; and then just test it:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-6&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;In other words, use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-&lt;/code&gt;(dash/minus) followed by the number of folders you want to go back, examples: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -8&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -7&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -11&lt;/code&gt;,…&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Remember that to go to your home folder, simply run: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt;(without arguments) and to return to where you were, use: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd -&lt;/code&gt; without specifying any number!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Simple and practical, isn’t it?!&lt;/p&gt;
</description>
        <pubDate>Fri, 20 Feb 2026 13:26:03 +0000</pubDate>
        <link>https://terminalroot.com/how-to-optimize-the-cd-command-to-go-back-multiple-folders-at-once/</link>
        <guid isPermaLink="true">https://terminalroot.com/how-to-optimize-the-cd-command-to-go-back-multiple-folders-at-once/</guid>
        
        <category>gnu</category>
        
        <category>bash</category>
        
        <category>shell</category>
        
        <category>commands</category>
        
        <category>terminal</category>
        
        
      </item>
    
      <item>
        <title>Vix: The &apos;Node.js&apos; of C++, Without a Garbage Collector</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/cpp/vix-cpp.jpg&quot; alt=&quot;Vix: The &apos;Node.js&apos; of C++, Without a Garbage Collector&quot; title=&quot;🌐 A C++20 runtime focused on building modern web servers and APIs, combining asynchronous I/O, modular architecture, and an extreme focus on performance.&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vix&lt;/code&gt; is &lt;strong&gt;a modern runtime/framework in &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++20&lt;/a&gt;&lt;/strong&gt; for building high-performance and distributed backend applications (offline-first, peer-to-peer, etc.) — a native alternative to Node/Deno, featuring async HTTP, routing, ORM, and modules.&lt;/p&gt;

&lt;p&gt;It’s used to create &lt;strong&gt;web servers, APIs, and distributed applications in C++&lt;/strong&gt; with contemporary ergonomics (no garbage collector, no overhead from “old” frameworks). It features:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Async HTTP server (Asio)&lt;/li&gt;
  &lt;li&gt;Routing, middleware, native JSON&lt;/li&gt;
  &lt;li&gt;CLI for scaffold/build/run&lt;/li&gt;
  &lt;li&gt;Optional modules (ORM, WebSockets, utilities)
Everything is designed for performance and offline/P2P applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;Clone the repository and compile with &lt;a href=&quot;https://terminalroot.com/tags#cmake&quot;&gt;CMake&lt;/a&gt;:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;git clone https://github.com/vixcpp/vix.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;vix
cmake &lt;span class=&quot;nt&quot;&gt;-S&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-B&lt;/span&gt; build &lt;span class=&quot;nt&quot;&gt;-DCMAKE_BUILD_TYPE&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;Release
cmake &lt;span class=&quot;nt&quot;&gt;--build&lt;/span&gt; build &lt;span class=&quot;nt&quot;&gt;-j&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;blockquote&gt;
  &lt;p&gt;Optional: install headers/artifacts system-wide (according to the project docs).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To use it as a dependency in your project, include the compiled headers/libs and configure CMake to link with “vix”.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;basic-example-http-hello-world&quot;&gt;Basic Example (HTTP Hello world)&lt;/h2&gt;
&lt;p&gt;Create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main.cpp&lt;/code&gt; file:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cpp&quot; data-lang=&quot;cpp&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;vix.hpp&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;using&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;App&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[](&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Response&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;res&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hello world from Vix!&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;8080&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Compile with your &lt;em&gt;CMakeLists&lt;/em&gt; that links the Vix runtime. When running, access &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;localhost:8080&lt;/code&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;For more information, visit: &lt;a href=&quot;https://github.com/vixcpp/vix&quot;&gt;https://github.com/vixcpp/vix&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Fri, 30 Jan 2026 12:52:19 +0000</pubDate>
        <link>https://terminalroot.com/vix-the-nodejs-of-cpp-without-a-garbage-collector/</link>
        <guid isPermaLink="true">https://terminalroot.com/vix-the-nodejs-of-cpp-without-a-garbage-collector/</guid>
        
        <category>cpp</category>
        
        <category>cppdaily</category>
        
        <category>web</category>
        
        <category>nodejs</category>
        
        
      </item>
    
      <item>
        <title>Copy Files via Command Line with C++</title>
        <description>&lt;p&gt;&lt;img src=&quot;/assets/img/cpp/xclip.jpg&quot; alt=&quot;Copy Files via Command Line with C++&quot; title=&quot;🕸️ Your custom command, simple and fast!&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;How about the convenience of copying files via the command line? You can quickly create your own command with &lt;a href=&quot;https://terminalroot.com/tags#cpp&quot;&gt;C++&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See the step-by-step guide below!&lt;/p&gt;

&lt;!-- SQUARE - GAMES ROOT --&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:inline-block;width:336px;height:280px&quot; data-ad-client=&quot;ca-pub-2838251107855362&quot; data-ad-slot=&quot;5351066970&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;dependencies&quot;&gt;Dependencies&lt;/h2&gt;
&lt;p&gt;Example for distros that use APT as the package manager&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Look for corresponding names for your distro.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;apt &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;build-essential libx11-dev libxcb1-dev libpng-dev&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Also compile and install &lt;a href=&quot;https://github.com/dacap/clip&quot;&gt;clip&lt;/a&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git clone https://github.com/dacap/clip
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;clip
cmake &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-B&lt;/span&gt; build
cmake &lt;span class=&quot;nt&quot;&gt;--build&lt;/span&gt; build
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;cmake &lt;span class=&quot;nt&quot;&gt;--install&lt;/span&gt; build&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;create-the-code&quot;&gt;Create the Code&lt;/h2&gt;
&lt;p&gt;Example: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main.cpp&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cpp&quot; data-lang=&quot;cpp&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;clip.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;fstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;sstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;memory&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;auto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[](){&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Use: xclip++ &amp;lt;file&amp;gt; [file...]&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;public:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ostringstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ifstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ios&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;binary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Error opening: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rdbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;&apos;\n&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;n&quot;&gt;clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;auto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xclip&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;make_unique&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;compile-and-install&quot;&gt;Compile and Install&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;g++ main.cpp &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; xclip++ &lt;span class=&quot;nt&quot;&gt;-lclip&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lxcb&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lX11&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lpng&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-pthread&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; xclip++ /usr/local/bin/&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;use-easily&quot;&gt;Use Easily&lt;/h2&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;xclip++ file.txt
&lt;span class=&quot;c&quot;&gt;# Or multiple files&lt;/span&gt;
xclip++ file1.txt file2.md file3.cpp &lt;span class=&quot;c&quot;&gt;# ...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;update-and-fix&quot;&gt;Update and Fix&lt;/h2&gt;

&lt;p&gt;If you notice, when trying to use the &lt;em&gt;pipe&lt;/em&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;|&lt;/code&gt;) it doesn’t work, for example:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;file.txt | xclip++
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;Lorem Ipsum&apos;&lt;/span&gt; | xclip++
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To fix this, I added:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;unistd.h&amp;gt;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Overloaded the constructor: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Xclip(const std::string&amp;amp; content)&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clip::set_text(content);&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;And finally added &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setvbuf(stdout, NULL, _IONBF, 0);&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code ready to use with pipe:&lt;/p&gt;

&lt;div class=&quot;language-cpp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;clip.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;fstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;sstream&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;memory&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
#include&lt;/span&gt; &lt;span class=&quot;cpf&quot;&gt;&amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;
&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;auto&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[](){&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Use: xclip++ &amp;lt;file&amp;gt; [file...]&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;public:&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ostringstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ifstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ios&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;binary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cerr&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Error opening: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rdbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;&apos;\n&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;n&quot;&gt;clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;

&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;setvbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stdout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;NULL&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_IONBF&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;kt&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;has_pipe&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isatty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;STDIN_FILENO&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;has_pipe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ostringstream&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ss&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rdbuf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Xclip&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xclip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;argc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Compile and install:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;g++ main.cpp &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; xclip++ &lt;span class=&quot;nt&quot;&gt;-lclip&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lxcb&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lX11&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-lpng&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-pthread&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;sudo install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; xclip++ /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you want a shorter command name, also run:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;mv &lt;/span&gt;xclip++ xclip
&lt;span class=&quot;nb&quot;&gt;sudo install&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt; xclip /usr/local/bin/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now just use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xclip&lt;/code&gt; command, examples:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# Single file:&lt;/span&gt;
xclip++ file.txt

&lt;span class=&quot;c&quot;&gt;# Multiple files:&lt;/span&gt;
xclip++ file1.txt file2.md file3.cpp &lt;span class=&quot;c&quot;&gt;# ...&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Via pipe:&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;My test&apos;&lt;/span&gt; | xclip
&lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;file.txt | xclip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;p&gt;See also: &lt;a href=&quot;https://terminalroot.com.br/2020/10/copie-e-cole-via-linha-de-comando-do-linux-com-xclip.html&quot;&gt;Copy and Paste via Linux Command Line with xclip&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Fri, 02 Jan 2026 23:05:48 +0000</pubDate>
        <link>https://terminalroot.com/copy-files-via-command-line-with-cpp/</link>
        <guid isPermaLink="true">https://terminalroot.com/copy-files-via-command-line-with-cpp/</guid>
        
        <category>cpp</category>
        
        <category>cppdaily</category>
        
        <category>cli</category>
        
        <category>commands</category>
        
        <category>terminal</category>
        
        
      </item>
    
  </channel>
</rss>
