
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
tocs
Advanced tools
tocs is a simple CLI application written in Python that generates the table of contents (TOC) section for markdown files.
As a person who loves to write personal technical notes in markdown files, I needed something simple to use.
Prerequisites: Python 3.11.9+
pip install tocs
pip install --upgrade tocs
tocs input_file.md - Generate TOC for the filetocs --depth 2 input_file.md - Limit the TOC generation to headers up to a specified depthtocs --dry-run input_file.md - Preview TOC without modifying the filetocs --help - Show usage instructionstocs --version - Display version informationGiven the following markdown file input_file.md:
<!-- init-tocs -->
<!-- end-tocs -->
# header 1
Lorem ipsum dolor sit amet...
## header 2
Lorem ipsum dolor sit amet...
### header 3
Lorem ipsum dolor sit amet...
Run tocs input_file.md and here's the output:
<!-- init-tocs -->
- [header 1](#header-1)
- [header 2](#header-2)
- [header 3](#header-3)
<!-- end-tocs -->
# header 1
Lorem ipsum dolor sit amet...
## header 2
Lorem ipsum dolor sit amet...
### header 3
Lorem ipsum dolor sit amet...
python -m venv .venvsource .venv/bin/activatepip install -e .[dev]deactivateFAQs
Generate TOC for markdown files
We found that tocs 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
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.