# human-machine-swapper
> A web component that adds a Human / Machine pill to any website. Machine shows the site's
> llms.txt, the plain-text reading written for language models, rendered in place without
> leaving the page. One file, about 6 KB gzipped, no dependencies and no build step.
Docs: https://advancelabs.dev/human-machine-swapper
Source: https://github.com/Advance-Labs/human-machine-swapper
Package: https://www.npmjs.com/package/human-machine-swapper
Licence: Apache-2.0
## Install
One command, from the project root:
npx human-machine-swapper init
It detects the framework (Next app or pages router, Astro, SvelteKit, Nuxt, WordPress theme,
plain HTML), writes a starter llms.txt if the site has none, declares it, loads the component
pinned to a version with an integrity hash, mounts the element, and adds the :not(:defined)
guard. It is idempotent and never overwrites an existing llms.txt. Add --dry-run to preview.
Exit codes: 0 installed, 1 could not identify the project, 2 installed but something needs a
human. It reports anything it could not work out rather than guessing.
If that command cannot identify the project, install by hand. Three steps, all required.
1. Load the script:
Or: npm install human-machine-swapper, then: import "human-machine-swapper";
2. Mount the element anywhere in