
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
Generates a single Markdown file by concatenating all text files recursively from the current directory. Ideal for LLM context from local projects.
lingest (Local Ingest) is a command-line tool that generates a single Markdown file named lingest_output.md. It recursively finds all text files in the current directory and its subdirectories and concatenates their content. Each file's content is preceded by a header indicating its relative path.
This is particularly useful for creating a single context file for Large Language Models (LLMs) from your local projects, enabling them to understand the structure and content of your codebase or documentation.
Directory Tree Visualization: Automatically generates a visual directory tree structure at the beginning of the output, showing the project layout with standard tree characters.
Recursive Scanning: Traverses directories deep to find all relevant files.
Content Concatenation: Combines the content of all found text files into one output.
Clear File Headers: Each file's content is demarcated with FILE: path/to/file.ext for easy identification.
Customizable Output: Specify the name of the generated Markdown file.
Flexible Filtering:
Overwrite Protection: Prevents accidental overwriting of existing output files unless explicitly forced.
Quiet Mode: Suppresses informational logs, ideal for scripting or CI/CD pipelines.
Dry Run Mode: Preview which files would be included and where the output would be saved, without writing anything.
Standard CLI Interface: Includes --help and --version flags.
The easiest way to use lingest is with npx:
npx lingest [options]
Alternatively, install it globally using npm, Yarn, or pnpm:
npm install -g lingest
# or
yarn global add lingest
# or
pnpm add -g lingest
Once installed globally, run it directly:
lingest [options]
Navigate to the root directory of the project you want to process, then run:
lingest [options]
| Option | Alias | Description | Default |
|---|---|---|---|
--output | -o | Output file name for the generated Markdown. | lingest_output.md |
--ignore | -i | Comma-separated list of glob patterns to ignore (files or directories). These are added to default ignores. | "" |
--include | -n | Comma-separated list of glob patterns to include. If specified, only files matching these patterns will be processed (still respects ignore patterns). | "" (include all) |
--force | -f | Force overwrite of the output file if it already exists. | false |
--quiet | -q | Suppress informational messages; only errors will be shown. | false |
--dry-run | List files that would be processed and the final output path, but don't actually write the file. | false | |
--no-tree | Skip generating the directory tree structure at the beginning of the output. | false | |
--help | -h | Show this help message and exit. | |
--version | -v | Show the program's version number and exit. |
By default, lingest ignores common files and directories that are typically not needed in code analysis:
Directories:
node_modules, .git, __pycache__, .pytest_cache, .tox, .nox, .mypy_cache, .ruff_cache, .hypothesisbower_components, .npm, .yarn, .pnpm-store, .gradle, build, .settings, .build, .bundlevendor/bundle, target, pkg, obj, packages, bin, .svn, .hgvenv, .venv, env, .env, virtualenv, .idea, .vscode, .vs.cache, .sass-cache, dist, out, site-packages, .docusaurus, .next, .nuxt.terraform, vendor, xcuserdataFiles:
*.pyc, *.pyo, *.pyd, .coverage, poetry.lock, Pipfile.lockpackage-lock.json, yarn.lock, bun.lock, bun.lockb*.class, *.jar, *.war, *.ear, *.nar, .classpath, *.gradle, .project*.o, *.obj, *.dll, *.dylib, *.exe, *.lib, *.out, *.a, *.pdb*.xcodeproj, *.xcworkspace, *.xcuserstate, .swiftpm*.gem, Gemfile.lock, .ruby-version, .rvmrcCargo.lock, **/*.rs.bk*.suo, *.user, *.nupkg.gitignore, .gitattributes, .gitmodules*.svg, *.png, *.jpg, *.jpeg, *.gif, *.ico, *.pdf, *.mov, *.mp4, *.mp3, *.wav*.log, *.bak, *.swp, *.tmp, *.temp, .DS_Store, Thumbs.db*.egg-info, *.egg, *.whl, *.so*.min.js, *.min.css, *.map*.tfstate*lingest_output.md, or whatever is specified by --output)lingest uses micromatch for glob pattern matching. Common examples:
**/*.js: Matches all .js files in any directory.src/**: Matches all files and folders within the src directory.*.log: Matches all .log files in the current directory.!src/important.js: (Negation not supported directly but illustrates how to exclude files conceptually.)Basic usage (generates lingest_output.md in the current directory):
lingest
Or using npx:
npx lingest
Specify a custom output file name:
lingest --output project_snapshot.md
Or:
lingest -o project_snapshot.md
Add custom ignore patterns (e.g., all dist folders and .log files):
lingest --ignore "**/dist/**,**/*.log"
Only include JavaScript and TypeScript files:
lingest --include "**/*.js,**/*.ts"
Include only .md files from the docs folder, excluding drafts:
lingest --include "docs/**/*.md" --ignore "docs/drafts/**"
Force overwrite an existing output file:
lingest --force
Or:
lingest -f
Dry run for Python files:
lingest --dry-run --include "**/*.py"
Quiet mode for scripting:
lingest -q -o context.md
Generate output without directory tree:
lingest --no-tree
Each file’s content in the generated Markdown file will be structured like this:
# FILE: path/to/your/file.ext
(Content of file.ext)
================================================
# FILE: another/path/file.js
================================================
(Content of file.js)
If lingest encounters a non-UTF-8 or unreadable file, it will:
[Content not included: Could not be read as UTF-8 text...].This preserves file structure and alerts you about skipped files.
Contributions are welcome!
Issues and suggestions? Open one on GitHub (replace with actual link).
MIT License. See LICENSE file for details.
FAQs
Generates a single Markdown file by concatenating all text files recursively from the current directory. Ideal for LLM context from local projects.
The npm package lingest receives a total of 2 weekly downloads. As such, lingest popularity was classified as not popular.
We found that lingest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.