<?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>Forem: Adrian Darian</title>
    <description>The latest articles on Forem by Adrian Darian (@adriandarian).</description>
    <link>https://forem.com/adriandarian</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%2F236587%2F7cb478f3-11ee-4eeb-b2f5-b8569dfa20b7.jpeg</url>
      <title>Forem: Adrian Darian</title>
      <link>https://forem.com/adriandarian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/adriandarian"/>
    <language>en</language>
    <item>
      <title>Export Your Confluence Documentation Like a Pro: Introducing Confluence Export CLI</title>
      <dc:creator>Adrian Darian</dc:creator>
      <pubDate>Thu, 25 Dec 2025 10:16:18 +0000</pubDate>
      <link>https://forem.com/adriandarian/export-your-confluence-documentation-like-a-pro-introducing-confluence-export-cli-3ihj</link>
      <guid>https://forem.com/adriandarian/export-your-confluence-documentation-like-a-pro-introducing-confluence-export-cli-3ihj</guid>
      <description>&lt;p&gt;Have you ever needed to backup your Confluence pages? Or migrate documentation to another system? Or simply want your Confluence content in Markdown format for version control?&lt;/p&gt;

&lt;p&gt;I've built &lt;strong&gt;Confluence Export CLI&lt;/strong&gt; - a powerful command-line tool that exports Confluence pages to multiple formats (Markdown, HTML, Text, PDF) with support for bulk exports, parallel fetching, and recursive child page export.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;Working with Confluence documentation, I often needed to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export entire documentation spaces for backup&lt;/li&gt;
&lt;li&gt;Convert Confluence pages to Markdown for Git-based workflows&lt;/li&gt;
&lt;li&gt;Migrate documentation between systems&lt;/li&gt;
&lt;li&gt;Create offline backups of critical documentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The existing solutions were either too complex, required manual work, or didn't support bulk exports. So I built a tool that does exactly what I needed - and made it open source for others to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🚀 Multiple Export Formats
&lt;/h3&gt;

&lt;p&gt;Export to the format that works best for your workflow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Markdown&lt;/strong&gt; - Perfect for Git-based documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTML&lt;/strong&gt; - Standalone HTML files with embedded CSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain Text&lt;/strong&gt; - Great for search and archival&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF&lt;/strong&gt; - Native Confluence PDF export
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Export to multiple formats at once&lt;/span&gt;
confluence-export &lt;span class="nt"&gt;--pages&lt;/span&gt; 123456 &lt;span class="nt"&gt;--format&lt;/span&gt; markdown html pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📦 Bulk Export with Parallel Processing
&lt;/h3&gt;

&lt;p&gt;Export hundreds of pages efficiently with configurable parallel workers:&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;# Export entire space with 8 parallel workers&lt;/span&gt;
confluence-export &lt;span class="nt"&gt;--space&lt;/span&gt; DOCS &lt;span class="nt"&gt;--format&lt;/span&gt; markdown &lt;span class="nt"&gt;--workers&lt;/span&gt; 8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🌳 Recursive Child Page Export
&lt;/h3&gt;

&lt;p&gt;Automatically export parent pages and all their children:&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;# Export a page and all its sub-pages&lt;/span&gt;
confluence-export &lt;span class="nt"&gt;--pages&lt;/span&gt; 123456 &lt;span class="nt"&gt;--include-children&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; markdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🎯 Flexible Input Options
&lt;/h3&gt;

&lt;p&gt;Support for multiple input methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full URLs&lt;/strong&gt;: &lt;code&gt;https://yoursite.atlassian.net/wiki/spaces/DOCS/pages/123/Page+Title&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Page IDs&lt;/strong&gt;: &lt;code&gt;123456&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;From file&lt;/strong&gt;: &lt;code&gt;--pages-file pages.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entire spaces&lt;/strong&gt;: &lt;code&gt;--space DOCS&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📊 Progress Display &amp;amp; Export Manifest
&lt;/h3&gt;

&lt;p&gt;Beautiful progress bars using Rich library, plus optional manifest generation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;confluence-export &lt;span class="nt"&gt;--pages&lt;/span&gt; 123456 &lt;span class="nt"&gt;--include-children&lt;/span&gt; &lt;span class="nt"&gt;--manifest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creates &lt;code&gt;INDEX.md&lt;/code&gt; and &lt;code&gt;manifest.json&lt;/code&gt; listing all exported pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;confluence-export
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup Authentication
&lt;/h3&gt;

&lt;p&gt;Get your API token from &lt;a href="https://id.atlassian.com/manage-profile/security/api-tokens" rel="noopener noreferrer"&gt;Atlassian API Tokens&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CONFLUENCE_BASE_URL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://yoursite.atlassian.net
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CONFLUENCE_EMAIL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your.email@example.com
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CONFLUENCE_API_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-api-token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Export Your First Page
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Using a full URL&lt;/span&gt;
confluence-export &lt;span class="nt"&gt;--pages&lt;/span&gt; &lt;span class="s2"&gt;"https://yoursite.atlassian.net/wiki/spaces/DOCS/pages/123456/My+Page"&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; markdown

&lt;span class="c"&gt;# Or using a page ID&lt;/span&gt;
confluence-export &lt;span class="nt"&gt;--pages&lt;/span&gt; 123456 &lt;span class="nt"&gt;--format&lt;/span&gt; markdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real-World Examples
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backup an Entire Documentation Space
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;confluence-export &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--space&lt;/span&gt; DOCS &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt; markdown html pdf &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--include-children&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--manifest&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; &lt;span class="s2"&gt;"./backup-&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +%Y%m%d&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--workers&lt;/span&gt; 8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Export Documentation Section with Sub-pages
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;confluence-export &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--pages&lt;/span&gt; &lt;span class="s2"&gt;"https://mysite.atlassian.net/wiki/spaces/DOCS/pages/123/Getting+Started"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--include-children&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt; markdown &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--manifest&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; ./docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Export from a File of URLs
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;pages.txt&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://mysite.atlassian.net/wiki/spaces/DOCS/pages/123/Page+One
https://mysite.atlassian.net/wiki/spaces/DOCS/pages/456/Page+Two
789012
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;confluence-export &lt;span class="nt"&gt;--pages-file&lt;/span&gt; pages.txt &lt;span class="nt"&gt;--format&lt;/span&gt; markdown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Technical Highlights
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;

&lt;p&gt;The tool is built with Python 3.8+ and follows clean architecture principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Modular Design&lt;/strong&gt;: Separate exporters for each format, easy to extend&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel Processing&lt;/strong&gt;: Uses &lt;code&gt;ThreadPoolExecutor&lt;/code&gt; for concurrent API calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error Handling&lt;/strong&gt;: Graceful error handling with &lt;code&gt;--skip-errors&lt;/code&gt; option&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configuration Layers&lt;/strong&gt;: CLI args &amp;gt; Config file &amp;gt; Environment variables &amp;gt; Defaults&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Distribution Options
&lt;/h3&gt;

&lt;p&gt;I've made it easy to distribute and use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Wheel Package&lt;/strong&gt;: Install via &lt;code&gt;pip install confluence-export&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standalone Executables&lt;/strong&gt;: No Python required - download and run

&lt;ul&gt;
&lt;li&gt;Linux, Windows, and macOS executables&lt;/li&gt;
&lt;li&gt;Built with PyInstaller&lt;/li&gt;
&lt;li&gt;Available in GitHub releases&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  GitHub Actions Workflow
&lt;/h3&gt;

&lt;p&gt;Automated builds and releases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Builds wheel packages and executables for all platforms&lt;/li&gt;
&lt;li&gt;Creates GitHub releases automatically&lt;/li&gt;
&lt;li&gt;Publishes to PyPI on tag push&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Configuration File Support
&lt;/h2&gt;

&lt;p&gt;Save your settings to avoid repeating them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;confluence-export &lt;span class="nt"&gt;--base-url&lt;/span&gt; https://mysite.atlassian.net &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--email&lt;/span&gt; user@example.com &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; ./exports &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--format&lt;/span&gt; markdown html &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--save-config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Creates &lt;code&gt;.confluence-export.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[auth]&lt;/span&gt;
&lt;span class="py"&gt;base_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://mysite.atlassian.net"&lt;/span&gt;
&lt;span class="py"&gt;email&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"user@example.com"&lt;/span&gt;

&lt;span class="nn"&gt;[export]&lt;/span&gt;
&lt;span class="py"&gt;output&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"./exports"&lt;/span&gt;
&lt;span class="py"&gt;formats&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"markdown"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"html"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="py"&gt;include_children&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;confluence-export &lt;span class="nt"&gt;--pages&lt;/span&gt; 123456
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Output Structure
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Hierarchical (Default)
&lt;/h3&gt;

&lt;p&gt;Preserves page hierarchy in folder structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exports/
├── Parent-Page-123.md
└── Parent-Page/
    ├── Child-Page-456.md
    └── Child-Page/
        └── Grandchild-789.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Flat Structure
&lt;/h3&gt;

&lt;p&gt;Use &lt;code&gt;--flat&lt;/code&gt; for a single directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exports/
├── Parent-Page-123.md
├── Child-Page-456.md
└── Grandchild-789.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Documentation Migration&lt;/strong&gt;: Export Confluence docs before migrating to another platform&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version Control&lt;/strong&gt;: Convert Confluence pages to Markdown for Git-based documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backup&lt;/strong&gt;: Create regular backups of critical documentation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Access&lt;/strong&gt;: Export documentation for offline viewing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Analysis&lt;/strong&gt;: Export to text format for analysis or search indexing&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;The project is open source and welcomes contributions! Areas where help is appreciated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additional export formats (DOCX, LaTeX, etc.)&lt;/li&gt;
&lt;li&gt;Performance improvements&lt;/li&gt;
&lt;li&gt;Documentation improvements&lt;/li&gt;
&lt;li&gt;Bug fixes and feature requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/adriandarian/confluence-export" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; to get started.&lt;/p&gt;

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

&lt;p&gt;Confluence Export CLI solves a real problem for teams working with Confluence documentation. Whether you need to backup your docs, migrate to another system, or simply want your content in a different format, this tool makes it easy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it out:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;confluence-export
confluence-export &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Star the repo:&lt;/strong&gt; &lt;a href="https://github.com/adriandarian/confluence-export" rel="noopener noreferrer"&gt;github.com/adriandarian/confluence-export&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have questions or feedback? Open an issue on GitHub or reach out!&lt;/p&gt;

</description>
      <category>automation</category>
      <category>opensource</category>
      <category>documentation</category>
      <category>cli</category>
    </item>
    <item>
      <title>How I Stopped Mixing Personal and Work GitHub Accounts</title>
      <dc:creator>Adrian Darian</dc:creator>
      <pubDate>Sun, 21 Dec 2025 08:13:46 +0000</pubDate>
      <link>https://forem.com/adriandarian/how-i-stopped-mixing-personal-and-work-github-accounts-4c2j</link>
      <guid>https://forem.com/adriandarian/how-i-stopped-mixing-personal-and-work-github-accounts-4c2j</guid>
      <description>&lt;p&gt;If you use more than one GitHub account, this probably sounds familiar.&lt;/p&gt;

&lt;p&gt;You’re in the zone, commit, push… then notice the commit is tied to the &lt;em&gt;wrong&lt;/em&gt; GitHub account. Wrong email. Wrong avatar. Wrong org.&lt;/p&gt;

&lt;p&gt;I hit this problem often enough that I stopped trying to “be careful” and built a fix.&lt;/p&gt;




&lt;h2&gt;
  
  
  The real issue
&lt;/h2&gt;

&lt;p&gt;Git makes this easy to mess up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Global config applies everywhere&lt;/li&gt;
&lt;li&gt;Local config is easy to forget&lt;/li&gt;
&lt;li&gt;SSH config controls access, not identity&lt;/li&gt;
&lt;li&gt;Hooks are per-repo and brittle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this relies on memory. Memory fails.&lt;/p&gt;

&lt;p&gt;What I wanted was &lt;strong&gt;automatic guardrails&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The idea: identity follows location
&lt;/h2&gt;

&lt;p&gt;The core idea behind &lt;strong&gt;gh-account-guard&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your GitHub identity should be based on &lt;em&gt;where&lt;/em&gt; you work, not what you remember to switch.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Example layout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/work/*        → work GitHub account
~/personal/*    → personal GitHub account
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once defined, identity switching should be automatic.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gh-account-guard&lt;/code&gt; is a GitHub CLI extension.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh extension &lt;span class="nb"&gt;install &lt;/span&gt;adriandarian/gh-account-guard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify it’s installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh account-guard &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Initial setup
&lt;/h2&gt;

&lt;p&gt;Initialize your configuration:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;You’ll map directory paths to GitHub accounts, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/work        → company-account
~/personal    → adriandarian
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This only needs to be done once.&lt;/p&gt;




&lt;h2&gt;
  
  
  What happens during normal work
&lt;/h2&gt;

&lt;p&gt;From here on, the workflow is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/work/some-repo
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Fix bug"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before the operation completes, &lt;strong&gt;gh-account-guard&lt;/strong&gt; checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current directory&lt;/li&gt;
&lt;li&gt;Expected GitHub account&lt;/li&gt;
&lt;li&gt;Active Git identity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything matches → nothing happens.&lt;br&gt;
If something doesn’t → it blocks the operation or switches accounts automatically.&lt;/p&gt;

&lt;p&gt;No prompts. No guessing.&lt;/p&gt;


&lt;h2&gt;
  
  
  Checking status
&lt;/h2&gt;

&lt;p&gt;You can always see what account is active:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh account-guard status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes behavior explicit and easy to debug.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why a GitHub CLI extension?
&lt;/h2&gt;

&lt;p&gt;I wanted something that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Works across all repositories&lt;/li&gt;
&lt;li&gt;Doesn’t require repo-specific hooks&lt;/li&gt;
&lt;li&gt;Is visible and inspectable&lt;/li&gt;
&lt;li&gt;Fits into existing workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The GitHub CLI was a natural home for this.&lt;/p&gt;




&lt;h2&gt;
  
  
  What daily usage feels like
&lt;/h2&gt;

&lt;p&gt;I’ve been using &lt;strong&gt;gh-account-guard&lt;/strong&gt; daily for a few weeks across work and personal projects.&lt;/p&gt;

&lt;p&gt;After setup, it fades into the background — which is exactly the goal.&lt;br&gt;
No wrong commits. No cleanup. No mental overhead.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who this is for
&lt;/h2&gt;

&lt;p&gt;This is useful if you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use multiple GitHub accounts&lt;/li&gt;
&lt;li&gt;Switch between personal and work repos&lt;/li&gt;
&lt;li&gt;Contribute to OSS and private code&lt;/li&gt;
&lt;li&gt;Want safety without friction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you only use one account, you probably don’t need it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Open source
&lt;/h2&gt;

&lt;p&gt;The project is open source:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/adriandarian/gh-account-guard" rel="noopener noreferrer"&gt;https://github.com/adriandarian/gh-account-guard&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If it saves you from one bad commit, it did its job.&lt;/p&gt;

</description>
      <category>github</category>
      <category>automation</category>
      <category>security</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
