autoblogger 0.1.14 → 0.1.16
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 +86 -10
- package/dist/cli/index.js +1178 -0
- package/dist/index.d.mts +54 -8
- package/dist/index.d.ts +54 -8
- package/dist/index.js +934 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +930 -93
- package/dist/index.mjs.map +1 -1
- package/dist/ui.d.mts +5 -2
- package/dist/ui.d.ts +5 -2
- package/dist/ui.js +1833 -1378
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +1751 -1297
- package/dist/ui.mjs.map +1 -1
- package/package.json +13 -1
- package/prisma/schema.prisma +4 -0
package/README.md
CHANGED
|
@@ -68,7 +68,47 @@ You'll also need API keys if you want AI features:
|
|
|
68
68
|
|
|
69
69
|
## Installation
|
|
70
70
|
|
|
71
|
-
###
|
|
71
|
+
### Quick Start (CLI)
|
|
72
|
+
|
|
73
|
+
The fastest way to set up Autoblogger is with the CLI:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx autoblogger init
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This command will:
|
|
80
|
+
|
|
81
|
+
1. Detect your Next.js project and Prisma setup
|
|
82
|
+
2. Merge the required models into your Prisma schema
|
|
83
|
+
3. Create boilerplate files (`lib/cms.ts`, API route, dashboard page)
|
|
84
|
+
4. Patch your Tailwind config to include Autoblogger's components
|
|
85
|
+
5. Run the database migration
|
|
86
|
+
6. Optionally import existing markdown content
|
|
87
|
+
|
|
88
|
+
**CLI Options:**
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx autoblogger init --yes # Skip prompts, use defaults
|
|
92
|
+
npx autoblogger init --dry-run # Preview changes without writing files
|
|
93
|
+
npx autoblogger init --skip-migrate # Skip database migration
|
|
94
|
+
npx autoblogger init --import=./posts # Import content after setup
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Import Existing Content:**
|
|
98
|
+
|
|
99
|
+
If you have markdown or MDX files, import them into the database:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npx autoblogger import ./content/posts
|
|
103
|
+
npx autoblogger import ./posts --status=published # Import as published
|
|
104
|
+
npx autoblogger import ./posts --tag=imported # Add a tag to all
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Manual Installation
|
|
108
|
+
|
|
109
|
+
If you prefer to set things up manually:
|
|
110
|
+
|
|
111
|
+
#### Step 1: Install the package
|
|
72
112
|
|
|
73
113
|
```bash
|
|
74
114
|
npm install autoblogger
|
|
@@ -76,7 +116,7 @@ npm install autoblogger
|
|
|
76
116
|
|
|
77
117
|
This installs Autoblogger and its dependencies (Tiptap editor, AI SDKs, markdown utilities).
|
|
78
118
|
|
|
79
|
-
|
|
119
|
+
#### Step 2: Add the database models
|
|
80
120
|
|
|
81
121
|
Autoblogger needs several tables in your database. Copy the models from the package's schema file into your own Prisma schema.
|
|
82
122
|
|
|
@@ -110,7 +150,7 @@ The required models are:
|
|
|
110
150
|
| `TopicSubscription` | RSS feed subscriptions for auto-drafting |
|
|
111
151
|
| `NewsItem` | Individual RSS items fetched from subscriptions |
|
|
112
152
|
|
|
113
|
-
|
|
153
|
+
#### Step 3: Run the migration
|
|
114
154
|
|
|
115
155
|
After adding the models to your schema:
|
|
116
156
|
|
|
@@ -120,7 +160,7 @@ npx prisma migrate dev --name add-autoblogger
|
|
|
120
160
|
|
|
121
161
|
This creates the tables in your database.
|
|
122
162
|
|
|
123
|
-
|
|
163
|
+
#### Step 4: Generate the Prisma client
|
|
124
164
|
|
|
125
165
|
```bash
|
|
126
166
|
npx prisma generate
|
|
@@ -447,16 +487,52 @@ import { ARTICLE_STYLES } from 'autoblogger/styles/article'
|
|
|
447
487
|
|
|
448
488
|
---
|
|
449
489
|
|
|
490
|
+
## CLI Reference
|
|
491
|
+
|
|
492
|
+
Autoblogger includes a CLI for project setup and content management.
|
|
493
|
+
|
|
494
|
+
### Commands
|
|
495
|
+
|
|
496
|
+
| Command | Description |
|
|
497
|
+
|---------|-------------|
|
|
498
|
+
| `npx autoblogger init` | Set up Autoblogger in your Next.js project |
|
|
499
|
+
| `npx autoblogger import <path>` | Import markdown/MDX content into the database |
|
|
500
|
+
|
|
501
|
+
### Init Options
|
|
502
|
+
|
|
503
|
+
| Option | Description |
|
|
504
|
+
|--------|-------------|
|
|
505
|
+
| `--yes`, `-y` | Skip prompts and use defaults |
|
|
506
|
+
| `--skip-migrate` | Don't run database migration |
|
|
507
|
+
| `--import=<path>` | Import content from specified path after setup |
|
|
508
|
+
| `--dry-run` | Show what would be done without making changes |
|
|
509
|
+
|
|
510
|
+
### Import Options
|
|
511
|
+
|
|
512
|
+
| Option | Description |
|
|
513
|
+
|--------|-------------|
|
|
514
|
+
| `--status=<status>` | Set imported posts status (`draft` or `published`) |
|
|
515
|
+
| `--tag=<tag>` | Add a tag to all imported posts |
|
|
516
|
+
| `--dry-run` | Show what would be imported without making changes |
|
|
517
|
+
|
|
518
|
+
---
|
|
519
|
+
|
|
450
520
|
## AI Models
|
|
451
521
|
|
|
452
522
|
Autoblogger supports these AI models out of the box:
|
|
453
523
|
|
|
454
|
-
| ID | Name | Provider |
|
|
455
|
-
|
|
456
|
-
| `claude-sonnet` |
|
|
457
|
-
| `claude-opus` |
|
|
458
|
-
| `gpt-5.2` | GPT-5.2 | OpenAI |
|
|
459
|
-
| `gpt-5-mini` | GPT-5 Mini | OpenAI |
|
|
524
|
+
| ID | Name | Provider | Description |
|
|
525
|
+
|----|------|----------|-------------|
|
|
526
|
+
| `claude-sonnet` | Sonnet 4.5 | Anthropic | Fast, capable, best value |
|
|
527
|
+
| `claude-opus` | Opus 4.5 | Anthropic | Highest quality, slower |
|
|
528
|
+
| `gpt-5.2` | GPT-5.2 | OpenAI | Latest OpenAI flagship |
|
|
529
|
+
| `gpt-5-mini` | GPT-5 Mini | OpenAI | Fast and cost-efficient |
|
|
530
|
+
|
|
531
|
+
### AI Features
|
|
532
|
+
|
|
533
|
+
- **URL Context**: Paste a URL into your prompt and the AI will fetch and read the article content
|
|
534
|
+
- **Chat Modes**: Rewrite, expand, shorten, or chat freely with your content
|
|
535
|
+
- **Custom Prompts**: Configure prompt templates in **Settings → AI**
|
|
460
536
|
|
|
461
537
|
Configure the default model and custom prompts in the dashboard under **Settings → AI**.
|
|
462
538
|
|