@citeme/cli 0.1.0
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.
- package/README.md +263 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1239 -0
- package/package.json +57 -0
package/README.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# @citeme/cli
|
|
2
|
+
|
|
3
|
+
CiteMe CLI - Audit your GEO score and apply optimizations directly in your codebase.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Global installation (recommended)
|
|
9
|
+
npm install -g @citeme/cli
|
|
10
|
+
|
|
11
|
+
# Or with npx (no installation required)
|
|
12
|
+
npx @citeme/cli
|
|
13
|
+
|
|
14
|
+
# Local development (from the monorepo root)
|
|
15
|
+
cd packages/cli
|
|
16
|
+
npm install
|
|
17
|
+
npm run build
|
|
18
|
+
npm link # Makes 'citeme' available globally
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Login to your CiteMe account
|
|
25
|
+
citeme login
|
|
26
|
+
|
|
27
|
+
# Run a GEO audit on your project
|
|
28
|
+
citeme audit
|
|
29
|
+
|
|
30
|
+
# Generate content suggestions based on the audit
|
|
31
|
+
citeme suggestions generate
|
|
32
|
+
|
|
33
|
+
# List all suggestions
|
|
34
|
+
citeme suggestions list
|
|
35
|
+
|
|
36
|
+
# Apply technical suggestions
|
|
37
|
+
citeme apply
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Commands
|
|
41
|
+
|
|
42
|
+
### `citeme login`
|
|
43
|
+
|
|
44
|
+
Authenticate with your CiteMe account. Your API key is stored securely in `~/.config/citeme/`.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
citeme login
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### `citeme logout`
|
|
51
|
+
|
|
52
|
+
Log out and remove stored credentials.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
citeme logout
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### `citeme whoami`
|
|
59
|
+
|
|
60
|
+
Display current user information and validate your session.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
citeme whoami
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### `citeme audit`
|
|
67
|
+
|
|
68
|
+
Analyze your project for GEO optimization opportunities.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Basic audit
|
|
72
|
+
citeme audit
|
|
73
|
+
|
|
74
|
+
# With project URL for enhanced analysis
|
|
75
|
+
citeme audit --url https://example.com
|
|
76
|
+
|
|
77
|
+
# Verbose output with detailed issues
|
|
78
|
+
citeme audit --verbose
|
|
79
|
+
|
|
80
|
+
# JSON output for CI/CD integration
|
|
81
|
+
citeme audit --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Options:**
|
|
85
|
+
- `-u, --url <url>` - Project URL for enhanced analysis
|
|
86
|
+
- `-v, --verbose` - Show detailed output
|
|
87
|
+
- `--json` - Output results as JSON
|
|
88
|
+
|
|
89
|
+
### `citeme suggestions generate`
|
|
90
|
+
|
|
91
|
+
Generate AI-powered content suggestions based on your latest audit.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Generate suggestions from latest audit
|
|
95
|
+
citeme suggestions generate
|
|
96
|
+
|
|
97
|
+
# Use a specific audit
|
|
98
|
+
citeme suggestions generate --audit-id <id>
|
|
99
|
+
|
|
100
|
+
# Specify suggestion types
|
|
101
|
+
citeme suggestions generate --types LINKEDIN_POST,BLOG_ARTICLE
|
|
102
|
+
|
|
103
|
+
# Limit number of suggestions per type
|
|
104
|
+
citeme suggestions generate --count 5
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Options:**
|
|
108
|
+
- `-a, --audit-id <id>` - Use a specific audit
|
|
109
|
+
- `-t, --types <types>` - Comma-separated list: LINKEDIN_POST, BLOG_ARTICLE, WEBSITE_OPTIMIZATION, TWEET
|
|
110
|
+
- `-c, --count <number>` - Number of suggestions per type (default: 3)
|
|
111
|
+
|
|
112
|
+
### `citeme suggestions list`
|
|
113
|
+
|
|
114
|
+
List all suggestions for your organization.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# List all suggestions
|
|
118
|
+
citeme suggestions list
|
|
119
|
+
|
|
120
|
+
# Filter by status
|
|
121
|
+
citeme suggestions list --status PENDING
|
|
122
|
+
|
|
123
|
+
# Filter by type
|
|
124
|
+
citeme suggestions list --type LINKEDIN_POST
|
|
125
|
+
|
|
126
|
+
# Limit results
|
|
127
|
+
citeme suggestions list --limit 10
|
|
128
|
+
|
|
129
|
+
# JSON output
|
|
130
|
+
citeme suggestions list --json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Options:**
|
|
134
|
+
- `-s, --status <status>` - Filter: PENDING, APPROVED, PUBLISHED, REJECTED
|
|
135
|
+
- `-t, --type <type>` - Filter: LINKEDIN_POST, BLOG_ARTICLE, etc.
|
|
136
|
+
- `-l, --limit <number>` - Maximum results (default: 20)
|
|
137
|
+
- `--json` - Output as JSON
|
|
138
|
+
|
|
139
|
+
### `citeme suggestions view <id>`
|
|
140
|
+
|
|
141
|
+
View the full content of a specific suggestion.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
citeme suggestions view abc12345
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### `citeme apply`
|
|
148
|
+
|
|
149
|
+
Apply approved technical suggestions to your code. Only technical suggestions (meta tags, ARIA attributes, JSON-LD, alt text) are applied - editorial suggestions are ignored.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Interactive mode (default)
|
|
153
|
+
citeme apply
|
|
154
|
+
|
|
155
|
+
# Apply patches from a specific audit
|
|
156
|
+
citeme apply --audit-id <id>
|
|
157
|
+
|
|
158
|
+
# Apply all patches without confirmation
|
|
159
|
+
citeme apply --all
|
|
160
|
+
|
|
161
|
+
# Preview changes without applying them
|
|
162
|
+
citeme apply --dry-run
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Options:**
|
|
166
|
+
- `-a, --audit-id <id>` - Apply patches from a specific audit
|
|
167
|
+
- `--all` - Apply all patches without confirmation
|
|
168
|
+
- `--dry-run` - Preview changes without applying them
|
|
169
|
+
|
|
170
|
+
### `citeme status`
|
|
171
|
+
|
|
172
|
+
Show CLI status and configuration.
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
citeme status
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### `citeme config`
|
|
179
|
+
|
|
180
|
+
Show configuration file path.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
citeme config
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Supported File Types
|
|
187
|
+
|
|
188
|
+
The CLI analyzes the following file types:
|
|
189
|
+
|
|
190
|
+
**Content Files:**
|
|
191
|
+
- `.md` - Markdown
|
|
192
|
+
- `.mdx` - MDX (Markdown with JSX)
|
|
193
|
+
|
|
194
|
+
**Structure Files:**
|
|
195
|
+
- `.tsx` - TypeScript React
|
|
196
|
+
- `.jsx` - JavaScript React
|
|
197
|
+
- `.ts` - TypeScript
|
|
198
|
+
- `.js` - JavaScript
|
|
199
|
+
|
|
200
|
+
## Technical Checks
|
|
201
|
+
|
|
202
|
+
The CLI performs the following technical checks:
|
|
203
|
+
|
|
204
|
+
- **SEO**
|
|
205
|
+
- Page title presence
|
|
206
|
+
- Meta description
|
|
207
|
+
- H1 heading (single)
|
|
208
|
+
|
|
209
|
+
- **Structured Data**
|
|
210
|
+
- JSON-LD schema markup
|
|
211
|
+
|
|
212
|
+
- **Accessibility**
|
|
213
|
+
- Image alt text
|
|
214
|
+
- ARIA labels on interactive elements
|
|
215
|
+
|
|
216
|
+
- **Content**
|
|
217
|
+
- Minimum word count
|
|
218
|
+
- MDX frontmatter
|
|
219
|
+
|
|
220
|
+
## Safety Features
|
|
221
|
+
|
|
222
|
+
- **Backup Creation**: Before any modification, the CLI creates a `.bak` backup file
|
|
223
|
+
- **Interactive Confirmation**: Each change requires confirmation (unless `--all` is used)
|
|
224
|
+
- **Rollback Support**: If you quit during apply, all changes are rolled back
|
|
225
|
+
- **Diff Preview**: View exact changes before applying
|
|
226
|
+
|
|
227
|
+
## CI/CD Integration
|
|
228
|
+
|
|
229
|
+
Use the `--json` flag for machine-readable output:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
citeme audit --json | jq '.score'
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Example GitHub Action:
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
- name: Run GEO Audit
|
|
239
|
+
run: |
|
|
240
|
+
npm install -g @citeme/cli
|
|
241
|
+
citeme login # Uses CITEME_API_KEY env var
|
|
242
|
+
SCORE=$(citeme audit --json | jq '.score')
|
|
243
|
+
if [ "$SCORE" -lt 60 ]; then
|
|
244
|
+
echo "GEO score is below threshold: $SCORE"
|
|
245
|
+
exit 1
|
|
246
|
+
fi
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Configuration
|
|
250
|
+
|
|
251
|
+
The CLI stores configuration in `~/.config/citeme/config.json`:
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"apiKey": "your-api-key",
|
|
256
|
+
"apiUrl": "https://citeme.io",
|
|
257
|
+
"email": "your@email.com"
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## License
|
|
262
|
+
|
|
263
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|