Skip to content

AIfriendly/AIvideogen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI Post Studio

A tiny self-contained tool that uses a free Groq LLM to draft AI tutorials and publish them straight to Dev.to. No backend, no deploy, no caching nightmare — one HTML file you bookmark, plus one Node script for fully-automated publishing.

Two ways to use it

1. Browser app — index.html

Phone-friendly single-file HTML. Hosted via the CDN of your choice (raw.githack.com, cdn.jsdelivr.net, GitHub Pages, etc.) or opened locally. Settings stored in browser localStorage.

https://raw.githack.com/<your-username>/<this-repo>/main/index.html

Setup (one-time):

  1. Open the URL on your phone.
  2. Settings panel auto-opens. Paste your Groq + Dev.to API keys.
  3. Tap Save. Add to Home Screen for app-like feel.

Use:

  • Tap Generate post → wait ~7 s → draft appears (1000–1400 words).
  • Edit if you want, then tap Send to Dev.to.
  • App copies the markdown (with frontmatter) to your clipboard and opens dev.to/new — paste in the body field, Dev.to auto-fills title/tags.

Dev.to's API doesn't allow browser POST (CORS), so the app uses the copy-and-paste flow rather than a direct API call. Works reliably on iOS Safari, Chrome Android, desktop, etc.

2. Node script — scripts/publish.mjs

Self-contained CLI that does the whole pipeline end-to-end with no manual steps. Generates the topic, writes the draft, POSTs to Dev.to as a real published article, prints the resulting URL plus a Medium cross-post link.

GROQ_API_KEY="gsk_..." DEVTO_API_KEY="..." node scripts/publish.mjs

Flags:

  • --topic "RAG with SQLite" — supply a topic instead of letting the LLM pick.
  • --draft — save to Dev.to as draft (default is live publish).

Cross-posting to Medium (manual, 3 taps): The script prints your published Dev.to URL plus the Medium import URL. On Medium, paste the Dev.to URL into the import form → tap Import → tap Publish. Medium has no usable API for new accounts, so this is the cleanest path.

Why Dev.to, not Medium

Medium closed Integration Token issuance years ago — new accounts cannot post via API. Their mobile web also blocks the import-a-story page (forces app install). Dev.to has an open API, generous rate limits, the same dev-focused audience, and you can cross-post to Medium afterwards via Medium's import form.

API keys you need

Service Where to get it
Groq (the LLM) https://console.groq.com/keys · free, no card required
Dev.to (publishing) https://dev.to/settings/extensions · scroll to DEV Community API Keys

Both keys live only in your phone's browser (for index.html) or your shell env (for publish.mjs). They are never stored in this repo.

Default model fallback chain

The app and script try these Groq models in order, falling back on rate-limit or unparseable output:

  1. openai/gpt-oss-120b — best general quality
  2. meta-llama/llama-4-scout-17b-16e-instruct
  3. openai/gpt-oss-20b
  4. llama-3.3-70b-versatile
  5. llama-3.1-8b-instant — last-resort, fastest

All verified working as of project creation. Browse the current Groq free model list at https://console.groq.com/docs/models.

File layout

.
├── index.html            ← the single-file web app
├── scripts/
│   └── publish.mjs       ← CLI publisher
├── .gitignore
└── README.md

That's the whole project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors