@croutons.ai/croutons-cli
v0.1.2
Published
Drop-in CLI for the Croutons SEO agent: crawl/inventory audit, Dev UI, wired to the main croutons-seo-agents package.
Maintainers
Readme
@croutons.ai/croutons-cli
NPM entry point for the Croutons SEO agents (croutons-seo-agents/): same Python codebase the monorepo uses, vendored into vendor/croutons-seo-agents when you publish this package (prepack runs scripts/sync-croutons-vendor.mjs from the repo root).
The published package contains no customer or site-specific secrets — only code, vendored agent sources, and generic placeholders (e.g. IANA example.com in croutons init templates).
How it connects to “main croutons”
| Piece | Role |
|--------|------|
| Source of truth | croutons-seo-agents/ at the repo root (Python: Dev UI, PSE curator, page audit, apply pipeline). |
| This package | Ships a snapshot of that folder under vendor/ so npx @croutons.ai/croutons-cli works outside the monorepo. |
| npm run prepack | Refreshes vendor/ from root croutons-seo-agents/ — run before npm publish. |
To update the published CLI, change Python in croutons-seo-agents/, then from packages/croutons-cli:
npm version patch
npm publish --access public(Use your npm org scope; rename "name" in package.json if @croutons is not yours.)
Commands
croutons init— writescroutons.config.jsonin the current repo (editpublicSiteUrl).croutons init --unpack— copies the vendored agent into./croutons-seo-agents(consumer repos without the monorepo).croutons audit— deterministic URL inventory + SEO issues →.croutons/last-audit.json(callsaudit_cli.py).croutons devui—python3 app.pyfrom the agent root (OpenAI.envetc. unchanged). Logs a one-line summary of@croutons-ai/*expertise packages when present undernode_modules.croutons packages— lists discovered expertise packages (croutons packages --jsonfor machine-readable output).
Override agent location: CROUTONS_AGENT_ROOT=/path/to/croutons-seo-agents.
Expertise packages (@croutons-ai/*)
Install optional domain/memory packages in the same project as the CLI; they are auto-discovered from node_modules/@croutons-ai/* via each package’s package.json → croutons.expertise field (no manual registration).
Spec (monorepo): croutons-seo-agents/docs/EXPERTISE_PACKAGE_CONTRACT.md.
Monorepo dev
From the website repo root, install workspaces and run the local bin against this tree (no vendor needed):
npm install
npx croutons agent-path
# prints absolute path to croutons-seo-agents (e.g. …/my-site/croutons-seo-agents)Python setup
The agent is still Python 3 + requirements.txt. After --unpack:
cd croutons-seo-agents
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envThen croutons devui from the site repo (CLI finds croutons-seo-agents by walking up from cwd).
