
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
yank - grab and format codeyank is a fast and friendly CLI to collect, format, and copy source code from your projects.
Install yank globally using npm:
npm install -g yank-cli
yankQuickly grab code from files or directories and either print it to your terminal or copy your clipboard.
# Copy a directory's code to your clipboard
yank src --clip # or -c
# View files in a pager (like less)
yank config *.json | less
# Pick files interactively
yank --preview # or -p
# Yank a package and its direct workspace dependencies in a monorepo
yank -w packages/my-app
# Yank a package and all recursive workspace dependencies
yank -w packages/my-app --workspace-recursive # or -wr
Run yank without specifying path to all files in your project, skipping anything listed in .gitignore.
# Grab the entire project
yank
yank displays summary statistics (file count, lines, size, and token count) after processing.
Customize how yank works with these options:
| Option | Shortcut | What it Does | Default |
|---|---|---|---|
--clip | -c | Copies output to your clipboard instead of printing it. | Off |
--include | -i | Specify file patterns to include (e.g., src/*.ts). Ignored if you list paths directly. | All files (**/*) |
--exclude | -x | Skip specific file patterns (adds to defaults like node_modules). | None |
--name-template | -H | Customize the header for each file. | --- {filePath} --- |
--code-template | -B | Set the format for code blocks. | |
| --config | -C | Use a custom config file. | Auto-detected |
| --lang-map | | Override file language detection (e.g., '{"LICENSE":"text"}'). | None |
| --max-size | | Skip files larger than this size (in bytes). | No limit (0) |
| --debug | | Show detailed logs for troubleshooting. | Off |
| --preview | -p | Interactively select files before processing. | Off |
| --workspace | -w | Path to package in monorepo to yank with direct workspace dependencies. | |
| --workspace-recursive | -r | Path to package in monorepo to yank with recursive workspace dependencies. | |
| --help | -h | Display help info. | |
| --version | -v | Show the version number. | |
Customize yank by adding a config file to your project. It automatically finds files like yank.toml, yank.yaml, yank.json, yank.config.js, or a yank section in package.json. You can add any number of custom configs to more easily select different parts of your codebase using the --config|-c flag.
yank.toml# Always copy to clipboard
clip = true
# Only include these files
include = ["src/**/*.ts", "README.md", "package.json"]
# Skip test files
exclude = ["**/*.spec.ts", "**/*.test.ts"]
# Custom formatting
fileTemplate = "## {filePath}"
codeTemplate = """
```
{content}
```
"""
# Treat LICENSE as plain text
languageOverrides = { LICENSE = "text" }
Your config file can include these settings:
| Field | Type | What it Does | Example |
|---|---|---|---|
clip | Boolean | Copy output to clipboard instead of printing. | true |
include | Array of strings | File patterns to include. | ["src/**/*.ts", "README.md"] |
exclude | Array of strings | File patterns to skip. | ["**/*.test.ts"] |
fileTemplate | String | File header format (must include {filePath}). | "## {filePath}" |
codeTemplate | String | Code block format (must include {content}). | " |
| debug | Boolean | Enable detailed logs. | false |
| languageOverrides | Object | Override language detection for files. | {"LICENSE": "text"} |
| maxSize | Number | Skip files larger than this (in bytes, 0 = no limit). | 1048576 (1MB) |
yank Detects Languagesyank automatically figures out the programming language for syntax highlighting based on:
.js, .py, .ts, etc.Dockerfile or Makefile.#!/bin/bash..js, .ts, .html, .css, .json, .md, .yaml, etc..py, .go, .java, .php, .cs, .cpp, etc..sh, .bash, .dockerfile, .tf, etc..sql, .graphql.r, .dart, .hs, .clj, etc.If yank gets the language wrong, you can override it:
# On the command line
yank --lang-map '{"LICENSE":"text","Makefile":"makefile"}'
# In yank.toml
languageOverrides = { LICENSE = "text", Makefile = "makefile" }
yank always includes an approximate token count (within 10-20% accuracy) in the summary stats. This helps you estimate AI model costs or ensure your code fits within token limits.
yank automatically skips binary files (like .jpg, .zip, .pdf) to keep your output clean and fast. You can override this with specific include patterns, but they’ll be treated as text if readable.
.gitignoreyank respects .gitignore files in your project, including nested ones. For example:
# Root .gitignore
*.log
# src/.gitignore
!*.log # Re-include logs in src/
root.log is skipped.src/server.log is included because of the negation (!)..gitignore rules. Use --debug for details..gitignore files or use --debug to trace exclusions.--debug logs.[] or {}.yank --help.FAQs
A fast, simple CLI to grab, format, and copy source code.
The npm package yank-cli receives a total of 0 weekly downloads. As such, yank-cli popularity was classified as not popular.
We found that yank-cli 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.