
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Get Context is a directory context generator designed to provide a structured overview of the contents of a directory and its subdirectories. It generates a single text file that lists the directory structure and the contents of text or program files, while excluding non-human-readable files such as binary or multimedia files. This tool is particularly useful for organizing and reviewing large codebases or data directories. It can also be used to easily pass the contents of a directory to a large language AI model for further analysis.
This program is available as the Python package "get_context". If Python is installed on your system, you should be able to run:
pip install get_context
After the package is installed, the program can be run on the command line by typing:
get_context <directory> [file_extensions...]
The program takes the directory as the first argument and can optionally filter files by specified extensions. For example:
get_context . .py .txt
This will generate a text file containing the directory structure and the contents of .py
and .txt
files within the specified directory.
This program is still in development and is currently buggy. Further testing and implementation is required before it can be used as a fully-fledged, reliable product.
This program uses both Python’s built-in libraries and external libraries for various functionalities:
os
and mimetypes
libraries for file and directory manipulation.codecs
and io
libraries to handle different text encodings.pathspec
library to handle file exclusion patterns, specifically for interpreting and applying .gitignore
-style patterns.This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Generates a single text document for a directory
We found that get-context 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.