This CLI supports you in creating and validating llms.txt Markdown files via the console.
composer require --dev stolt/llms-txt-php-cliThe following list command call shows the currently available commands.
bin/llms-txt-cli list
llms-txt-cli 1.0.0
Available commands:
check-links Check links of a llms.txt file
info Get metadata info of a llms.txt file
init Create an initial llms txt.file
validate Validate the given llms txt.filebin/llms-txt-cli validate tests/fixtures/uv.llms.md
The provided llms.txt file tests/fixtures/uv.llms.md is valid.or
bin/llms-txt-cli validate https://docs.astral.sh/uv/
The delivered llms.txt file from https://docs.astral.sh/uv/ is valid.A llms.txt file is considered valid, when a title, description, details, and at least one section
with at least one link are available.
bin/llms-txt-cli info tests/fixtures/uv.llms.md
{
"sections": 7,
"links": 45,
"last_modification": "26.06.2025 06:38:45",
"file": {
"name": "tests\/fixtures\/uv.llms.md",
"path": "\/home\/stolt\/oss\/llms-txt-php-cli\/tests\/fixtures\/uv.llms.md",
"size": "4.07K"
}
}bin/llms-txt-cli init [<llms-txt-file>]
Created llms.txt file llms.txt.
cat llms.txt
# Init title
> Init description
Init details
## Init section
- [Init URL](http://init.org)If no llms-txt-file name is provided, it defaults to llms.txt.
bin/llms-txt-cli check-links tests/fixtures/uv.llms.md
All links are reachable.This project includes four AI skills focused on managing a llms.txt file:
- validating: check whether a given
llms.txtfile (local path or URL) is valid and guide fixes until it passes (llms-txt-validate.md). - initialising: create an initial
llms.txtfile (defaults tollms.txtin the repo root) and verify it with validation (llms-txt-init.md). - info: summarise metadata (sections, links, last modification, file details) and suggest next steps (
llms-txt-info.md). - checking links: run link checking for URLs in
llms.txtand help fix broken or redirected links (llms-txt-check-links.md).
composer testThis CLI is licensed under the MIT license. Please see LICENSE.md for more details.
Please see CHANGELOG.md for more details.
Please see CONTRIBUTING.md for more details.
