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:
- Node.js installed
- Git installed and configured
- A GitHub account
- A Twitter Developer account
Installation
- Install the extension from the VS Code Marketplace (coming soon)
- Configure your API credentials (see Configuration section below)
Configuration
GitHub Setup
- Create a Personal Access Token on GitHub:
- Create a Twitter Developer account and create a new app at Twitter Developer Portal
- 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
- Open your project folder in VS Code
- Press
F1
or Ctrl+Shift+P
to open the command palette
- Type "Push to GitHub & Tweet" and press Enter
- Enter your tweet text when prompted
- Watch as your code is pushed to GitHub and your tweet is posted!
How It Works
- The extension checks if the current folder is a Git repository
- If not, it initializes a new Git repository
- Creates a new GitHub repository (if it doesn't exist)
- Pushes your code to the GitHub repository
- 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
Enjoy!