Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
code2gist is a Python package that makes sharing your code easier than ever. Send code to ChatGPT-4's browser without going over the character limit.
code2gist
is a Python package that makes sharing your code projects easier than ever. With a simple command, it lets you upload your code files to GitHub's Gist. code2gist
is available on PyPI.
The package works hand-in-hand with OpenAI's ChatGPT-4's 'Browse with Bing' feature. Send codebases without going over the character limit using a secret URL. 🗜️
Another key feature of code2gist
is its ability to handle a wide range of text-based file types, not just Python files. 📄
In addition, code2gist
comes with a prune
feature that provides a clean way to remove all the gists created by this tool from your GitHub account. 🌳
The recommended way to install code2gist
is via pipx
:
pipx install code2gist
pipx
ensures the package and its dependencies are isolated from your global Python environment. Moreover, pipx
automatically adds the installed package to your PATH, so you can run code2gist
from any directory in the command line. 🧠
If you haven't installed pipx
yet, you can do it by running python3 -m pip install --user pipx
and then python3 -m pipx ensurepath
.
You can still install the package via pip, but you will have to add the package directory to your PATH manually 😒:
pip install code2gist
Here are step-by-step instructions to add the code2gist directory to your PATH environment variable on Windows:
C:\...\Python311\Scripts
After following these steps, your system should recognize code2gist commands from any directory in the command line. 👍
code2gist
requires a GitHub token to function. You need to create a new token with the gist
scope (which allows it to create gists). Follow this guide to create a new token.
Once you have your token, you should store it in the "GITHUB_TOKEN" environment variable. Here are the steps to set this variable in Windows:
Please ensure that you have this variable set before using the package. ✅
To use code2gist
, simply use the following command:
code2gist .
This command will upload all Python files in the current directory to a private Gist on your GitHub account. The Gist will be titled with the name of the current directory, followed by "[code2gist]".
If you want to include files with different extensions, you can specify them using the --ext
option:
code2gist . --ext .txt .md .py
This command will include all text, Markdown, and Python files in the upload.
The prune
feature allows you to delete all gists created by code2gist
:
code2gist --prune
Running this command will delete all your gists with "[code2gist]" in the description.
code2gist
respects .gitignore
and .code2gistignore
rules. Files that match a rule in either file will be skipped. 🦘
The gists created by code2gist
are private by default, providing a safe way for you to share your code without making it publicly available.
Please remember that code2gist
is a tool for sharing code and should not be used to share sensitive information. Always ensure that your files do not contain any confidential data before uploading them.
code2gist
is licensed under the GNU General Public License v3.0.
We hope code2gist
serves as a valuable tool in your development toolkit. Happy coding! 💻👨💻
FAQs
code2gist is a Python package that makes sharing your code easier than ever. Send code to ChatGPT-4's browser without going over the character limit.
We found that code2gist demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.