Skip to content

default-cybe/CodeShare

Repository files navigation


CodeShare

Description

A VS Code extension for moving code straight from one editor to another. When you share, your active file gets pushed to a Firebase Realtime Database under a short, randomly generated team code. Whoever types that code into their VS Code gets the file dropped into their editor. No accounts, no links, nothing to paste into a chat app.

Features

  • Send the current editor's contents right from VS Code
  • No logging in, and no jumping over to WhatsApp or Gmail to send a link
  • One short team code covers both sending and receiving
  • Good for those quick, one-off "here, take this file" moments

How it works

There are two commands:

  • Share Code grabs the text in your current editor, writes it to Firebase under a random 8-character team code, shows you the code, and copies it to your clipboard.
  • Receive Code asks for a team code, pulls the matching code out of Firebase, and drops it in at your cursor.

Both commands are available from the Command Palette and the editor's right-click context menu.

Requirements

Setup

  1. Install dependencies:

    npm install
  2. Add your Firebase credentials. Copy the example config and fill in your project's values:

    cp firebase-config.example.js firebase-config.js

    firebase-config.js is git-ignored so your credentials stay out of version control.

Running the extension

  • Open this folder in VS Code and press F5 to launch an Extension Development Host with CodeShare loaded.
  • In the new window, open a file and run Share Code (codeshare) or Receive Code (codeshare) from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) or the editor context menu.

Installing as a package

To build a .vsix you can install locally or publish:

npm install -g @vscode/vsce
vsce package

Then in VS Code run Extensions: Install from VSIX... and select the generated file.

Share Code:


Receive Code:


License

Released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors