Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Git2TweetNew to Visual Studio Code? Get it now.
Git2Tweet

Git2Tweet

Aaronshahh

| (0) | Free
Push code directly to Twitter (x.com) and GitHub in one click
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

XGrind - Push to GitHub & Tweet in One Click

A VS Code extension that lets you push your code to GitHub and tweet about it with a single command. Perfect for developers who want to share their work quickly and efficiently.

Features

  • One-Click Push: Push your code to GitHub and tweet about it with a single command
  • Automatic Repository Creation: Automatically creates a GitHub repository if one doesn't exist
  • Customizable Tweets: Add your own tweet text with automatic GitHub link inclusion
  • Progress Tracking: See real-time progress of your push and tweet

Prerequisites

Before you begin, ensure you have the following:

  1. Node.js installed
  2. Git installed and configured
  3. A GitHub account
  4. A Twitter Developer account

Installation

  1. Install the extension from the VS Code Marketplace (coming soon)
  2. Configure your API credentials (see Configuration section below)

Configuration

GitHub Setup

  1. Create a Personal Access Token on GitHub:
    • Go to GitHub Settings > Developer Settings > Personal Access Tokens
    • Generate a new token with repo scope

Twitter Setup

  1. Create a Twitter Developer account and create a new app at Twitter Developer Portal
  2. Generate API keys and access tokens with write permissions

Extension Settings

Add these settings to your VS Code settings (File > Preferences > Settings):

{
    "xgrind.githubUsername": "your-github-username",
    "xgrind.githubToken": "your-github-personal-access-token",
    "xgrind.twitterApiKey": "your-twitter-api-key",
    "xgrind.twitterApiSecret": "your-twitter-api-secret",
    "xgrind.accessToken": "your-twitter-access-token",
    "xgrind.accessTokenSecret": "your-twitter-access-token-secret"
}

Security Note: Never commit your API keys or tokens to version control. The .vscode/settings.json file is typically not committed to Git.

Usage

  1. Open your project folder in VS Code
  2. Press F1 or Ctrl+Shift+P to open the command palette
  3. Type "Push to GitHub & Tweet" and press Enter
  4. Enter your tweet text when prompted
  5. Watch as your code is pushed to GitHub and your tweet is posted!

How It Works

  1. The extension checks if the current folder is a Git repository
  2. If not, it initializes a new Git repository
  3. Creates a new GitHub repository (if it doesn't exist)
  4. Pushes your code to the GitHub repository
  5. Composes and posts a tweet with your message and the GitHub repository link

Troubleshooting

  • Authentication Errors: Double-check your API keys and tokens
  • Git Errors: Ensure Git is properly configured with your name and email
  • Network Issues: Check your internet connection and proxy settings

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux)
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux)
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft