Skip to content

Instantly share code, notes, and snippets.

View mfranceschit's full-sized avatar

Marco Franceschi mfranceschit

View GitHub Profile
@mfranceschit
mfranceschit / managing-multiple-claude-code-subscriptions.md
Last active September 5, 2026 20:56
Managing Multiple Claude Code Subscriptions per Project

Managing Multiple Claude Code Subscriptions per Project

This tutorial shows how to use direnv and the CLAUDE_CONFIG_DIR environment variable to maintain fully isolated Claude Code sessions per project, each pointing to a different subscription. Zero friction when switching contexts.

How it works

Claude Code stores its configuration and OAuth tokens under a config directory. By default this is a single shared path, which means one session for all your work.

The CLAUDE_CONFIG_DIR environment variable lets you override that path. Point it to a different directory per project and Claude Code will treat each one as a completely independent environment — separate login, separate session, separate subscription.

@mfranceschit
mfranceschit / link-existing-project-to-github.md
Created February 5, 2026 17:07
How to link an existing local project to a GitHub repository and push your code
@mfranceschit
mfranceschit / github-with-pat.md
Last active September 29, 2025 20:37
Authenticate with Personal Access Token (PAT) on GitHub
  1. First, follow these steps to create a fine-grained personal access token.

  2. Add the generated token github_pat_***** to your environment using a export GITHUB_TOKEN=**** variable.

  3. Replace your username on GitHub in the following command git config --global credential.helper '!f() { sleep 1; echo "username=[username]"; echo "password=${GITHUB_TOKEN}"; }; f'

  4. Verify everything is configured using git config --global credential.helper.

  5. That's it. Happy coding!