agentimization 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +39 -155
  2. package/dist/index.js +531 -171
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,193 +1,77 @@
1
- <p align="center">
2
- <img src="https://img.shields.io/npm/v/agentimization?style=flat-square&color=blue" alt="npm version" />
3
- <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="license" />
4
- <img src="https://img.shields.io/badge/checks-35-purple?style=flat-square" alt="checks" />
5
- </p>
1
+ # agentimization
6
2
 
7
- <h1 align="center">agentimization</h1>
3
+ [![npm version](https://img.shields.io/npm/v/agentimization?style=flat-square&color=blue)](https://www.npmjs.com/package/agentimization)
8
4
 
9
- <p align="center">
10
- GEO audit for agent-ready websites.<br/>
11
- One command to check if AI agents can discover, parse, and cite your content.
12
- </p>
13
-
14
- ---
15
-
16
- ## Why
5
+ ```text
6
+ ╭───────────────────────────────────────────────╮
7
+ ▓░▒▓░░▒░▓▒░▓▓░▒░▓░░▒▓▒░▓░░▓▒░▓░▒░▓░░▒▓░░ │
8
+ │ ░▓▒░▓░░▒▓▒░▓░░▒▓▓░▒░▓▒░░▓▒░▓░▒░░▓▒░░▓░▒ │
9
+ │ ▓░▒▓░░▒▓▒░░▓░▒▓▒░░▓░░▓▒░▓░▒░░▓▒░▓░░▒▓░ │
10
+ │ ░▒▓░▒░▓▒░░▓░▒▓░░▒▓▒░░▓░▒▓░░▒▓░ agentimization │
11
+ ╰───────────────────────────────────────────────╯
12
+ ```
17
13
 
18
- AI agents (Claude, ChatGPT, Perplexity, Gemini) are becoming a major source of traffic and citations. But most websites are invisible to them — no `llms.txt`, no markdown endpoints, no structured data, client-rendered content that crawlers can't read.
14
+ geo audit for agent-ready websites and projects.
19
15
 
20
- **Agentimization** runs checks across 8 categories and gives you a GEO score from 0–100, with specific fixes you can hand off to an AI coding agent.
16
+ geomaxx your site so ai agents can actually find, parse, and cite it.
21
17
 
22
- ## Install
18
+ ## install
23
19
 
24
20
  ```bash
25
21
  npx agentimization https://your-site.com
26
22
  ```
27
23
 
28
- Or install globally:
29
-
30
- ```bash
31
- npm install -g agentimization
32
- ```
33
-
34
- ## Usage
24
+ ## usage
35
25
 
36
- ### Audit a live site
26
+ audit a live site:
37
27
 
38
28
  ```bash
39
- agentimization https://docs.anthropic.com
29
+ agentimization https://docs.your-site.com
40
30
  ```
41
31
 
42
- ```text
43
- ╭───────────────────────────────────────────────╮
44
- │ ▓░▒▓░░▒░▓▒░▓▓░▒░▓░░▒▓▒░▓░░▓▒░▓░▒░▓░░▒▓░░ │
45
- │ ░▓▒░▓░░▒▓▒░▓░░▒▓▓░▒░▓▒░░▓▒░▓░▒░░▓▒░░▓░▒ │
46
- │ ▓░▒▓░░▒▓▒░░▓░▒▓▒░░▓░░▓▒░▓░▒░░▓▒░▓░░▒▓░ │
47
- │ ░▒▓░▒░▓▒░░▓░▒▓░░▒▓▒░░▓░▒▓░░▒▓░ agentimization │
48
- │ │
49
- │ https://docs.anthropic.com │
50
- │ │
51
- │ Crawling the site, one sec… │
52
- ╰───────────────────────────────────────────────╯
53
- ```
54
-
55
- ### Audit a local directory (great for CI)
32
+ audit a local directory:
56
33
 
57
34
  ```bash
58
35
  agentimization .
59
- agentimization ./docs
60
36
  ```
61
37
 
62
- ### Output formats
38
+ pipe results to a tool or file:
63
39
 
64
40
  ```bash
65
- # JSON for CI pipelines
66
- agentimization https://example.com --json
67
-
68
- # Markdown report — paste into Claude, ChatGPT, etc.
69
- agentimization https://example.com --md
70
-
71
- # Filter by category
72
- agentimization https://example.com --category content-discoverability
41
+ agentimization https://your-site.com --json > report.json
42
+ agentimization https://your-site.com --md | pbcopy
73
43
  ```
74
44
 
75
- ### After the audit
76
-
77
- Agentimization shows an interactive menu when the audit finishes:
78
-
79
- - **Copy fix prompt to clipboard** — structured markdown an AI coding agent can use to fix your GEO issues
80
- - **Save JSON report** — full audit data written to `agentimization-report.json`
81
- - **Run another URL or path** — keep the session open and audit the next site
82
- - **Exit**
83
-
84
- ## Checks
85
-
86
- Agentimization runs **36 checks** across **8 categories**:
45
+ ## what it checks
87
46
 
88
- | Category | What it checks |
89
- |---|---|
90
- | **Content Discoverability** | `llms.txt` existence, structure, size, coverage, link resolution. Sitemap presence. `robots.txt` AI agent rules. |
91
- | **Markdown Availability** | `.md` URL support, `Accept: text/markdown` content negotiation, HTML↔markdown parity. |
92
- | **Content Structure** | Code fence validity, heading hierarchy, tabbed content serialization. |
93
- | **Page Size & Rendering** | SSR vs CSR detection, HTML/markdown page size, content start position (boilerplate ratio). |
94
- | **URL Stability** | HTTP status codes, redirect behavior, cache header hygiene. |
95
- | **Authentication & Access** | Auth gate detection, alternative access paths for gated content. |
96
- | **GEO Signals** | Structured data (JSON-LD), citation worthiness, topical authority, content freshness, E-E-A-T signals, FAQ schema, canonical URLs. |
97
- | **Agent Protocols** | AGENTS.md, MCP server card, API catalog (RFC 9727), content signals (AI usage declarations), Link headers (RFC 8288), agent skills index. |
47
+ 36 checks across 8 categories. each one is a thing ai agents need to discover, parse, or cite your content.
98
48
 
99
- ## Scoring
49
+ - content discoverability: `llms.txt`, sitemap, robots
50
+ - markdown availability: `.md` urls, content negotiation
51
+ - content structure: headings, code fences, hidden tabs
52
+ - page size and rendering: ssr vs csr, boilerplate ratio
53
+ - url stability: status codes, redirects, canonicals
54
+ - authentication and access: gates, alternative paths
55
+ - geo signals: json-ld, citations, freshness, e-e-a-t
56
+ - agent protocols: mcp card, api catalog, agents.md, link headers
100
57
 
101
- Each check returns **pass**, **warn**, **fail**, **skip**, or **info**. Checks are weighted by importance, and scores roll up into category scores and an overall grade:
58
+ ## how it works
102
59
 
103
- | Grade | Score |
104
- |---|---|
105
- | A+ | 95–100 |
106
- | A | 85–94 |
107
- | B | 70–84 |
108
- | C | 55–69 |
109
- | D | 40–54 |
110
- | F | 0–39 |
60
+ it samples up to 10 pages of your site, runs 36 checks against the html, headers, and well-known files, then weights them into a 0 to 100 score. failed checks come with a suggestion you can paste into your ai coding agent.
111
61
 
112
- ## Example scores
62
+ ## requirements
113
63
 
114
- How popular sites score on Agentimization (approximate, scores change as sites update):
64
+ node 18 or newer.
115
65
 
116
- | Site | Grade | Score | Notes |
117
- |---|---|---|---|
118
- | `docs.anthropic.com` | **A** | 88 | Strong `llms.txt`, good markdown, structured data |
119
- | `docs.stripe.com` | **A** | 91 | Excellent discoverability, markdown endpoints, great structure |
120
- | `nextjs.org/docs` | **B** | 76 | Good SSR, missing `llms.txt`, decent GEO signals |
121
- | `react.dev` | **B** | 72 | Good structure, no `llms.txt`, client-heavy rendering |
122
- | `en.wikipedia.org` | **A** | 86 | Great content structure, strong citations, no `llms.txt` |
123
- | `medium.com` | **D** | 45 | Auth gates, weak markdown, no `llms.txt` |
124
- | `substack.com` | **C** | 58 | Mixed access, some content gated |
125
-
126
- > These are illustrative examples. Run `agentimization <url>` to get real-time scores.
127
-
128
- ## Local mode
129
-
130
- When you pass a directory path instead of a URL, Agentimization runs in **local mode**:
131
-
132
- - Scans your files on disk (HTML, markdown, `llms.txt`, `robots.txt`, `sitemap.xml`)
133
- - Skips network-only checks (content negotiation, auth detection, cache headers, etc.)
134
- - Perfect as a **CI pre-deploy step** — catch GEO regressions before they ship
135
-
136
- ```bash
137
- # In CI
138
- agentimization . --json
139
- # Exit code 1 if score < 50
140
- ```
141
-
142
- ## Programmatic API
66
+ ## programmatic use
143
67
 
144
68
  ```typescript
145
- import { audit, auditLocal } from "@agentimization/core"
69
+ import { audit } from "@agentimization/core"
146
70
 
147
- // Remote audit
148
- const result = await audit("https://docs.anthropic.com")
71
+ const result = await audit("https://your-site.com")
149
72
  console.log(result.grade, result.overall_score)
150
-
151
- // Local audit
152
- const local = await auditLocal("./docs")
153
- console.log(local.grade, local.overall_score)
154
-
155
- // With options
156
- const result = await audit("https://example.com", {
157
- sampleSize: 20,
158
- categories: ["content-discoverability", "geo-signals"],
159
- onEvent: (event) => console.log(event),
160
- })
161
- ```
162
-
163
- ## What is GEO?
164
-
165
- **Generative Engine Optimization** is like SEO, but for AI. Instead of optimizing for Google's crawlers and ranking algorithm, GEO optimizes for AI agents that need to:
166
-
167
- 1. **Discover** your content (via `llms.txt`, sitemaps, `robots.txt`)
168
- 2. **Parse** it efficiently (markdown availability, clean HTML, SSR)
169
- 3. **Cite** it accurately (structured data, canonical URLs, E-E-A-T signals)
170
-
171
- Sites that score well on Agentimization are more likely to be surfaced and cited by Claude, ChatGPT, Perplexity, and other generative engines.
172
-
173
- ## Contributing
174
-
175
- ```bash
176
- git clone https://github.com/antlio/agentimization
177
- cd agentimization
178
- bun install
179
- bun run build
180
- bun run typecheck
181
- ```
182
-
183
- The monorepo structure:
184
-
185
- ```
186
- packages/shared — Types, schemas, constants
187
- packages/core — Audit engine + all 36 checks
188
- apps/cli — CLI (Commander.js + Ink)
189
73
  ```
190
74
 
191
- ## License
75
+ ## license
192
76
 
193
- MIT
77
+ mit