Ever felt your Markdown filled with your beautiful prose were the wallflowers at the prom? Not when rizzdown
is your date! Turn that md
frown upside down and give your content the shimmer and shine it deserves! π
Designed for technical authors and devs creating their linguistic empire using markdown content and SSG sites. Let's get your content poppin'!
- Features
- CLI Usage
- How
rizzdown
Works - π€ API
- π Crafting
rizzdown
Profiles By Hand - Tips
- π§ The
rizzdown
Intelligence: Crafting the Perfect Prose πͺΆ - π OpenAI API Key - The Magic Wand! πͺ
- Contribute
- π Instant Enhancements: Upgrade from mundane to magnificent with a simple command!
- π Markdown-Friendly: Designed with
.md
files in mind. - π‘ Frontmatter Magic: Auto-generate
description
,title
, and# Overview
, and even rewrite your original content! - π¦₯ Exponential Backoff: We're gentle with the GPT API. No throttling woes here!
-
Installation:
Get
rizzdown
into your toolbelt:npm i -g rizzdown
OR just run on-the-fly with:
npx rizzdown
-
Command & Conquer:
Navigate to your Markdown file's directory and simply:
rizzdown enhance --dry-run myfile.md
or do a whole batch
rizzdown enhance --dry-run mycontent/**/*.md
-
Adjust & Admire:
Peek into your newly-enhanced Markdown file. Tweak as you see fit and bask in its improved glory!
When I created rizzdown
, I wrote this:
I have a CLI tool which enhances markdown files using ChatGPT by taking into account author, audience, subject matter, type of prose, and body content. It then produces a
description
andtitle
for frontmatter and an# Overview
. it can also rewrite the entire content if requested. everything is fully controlled by the command line, and it even has exponential backoff in case of GPT API throttling. You install it usingnpm i -g <tool>
ornpx <tool>
...and rizzdown
turned it into...
That's right, I used rizzdown
to write this readme.md
! Look at that, you're the belle of the ball. Perfect for all you authors crafting SSG sites and wanting your Markdown to be not just readable, but rizzmarkable.
rizzdown
offers a programmatic way to enhance your writing, leveraging the power of OpenAI. Create custom profiles to tailor the enhancement to your unique voice, style, and audience.
rizzdown
runs on nodejs>16 only. It will not run in the browser.
npm i rizzdown
import { factory } from 'rizzdown'
const { generate } = factory({ profilePath, subjectMatter })
const rizzed = await generate(`Give me a funny 350 word summary`)
The factory
function sets up the environment for generating enhanced content. factory
supports these parameters. Everything is optional:
profilePath
: Defaults to$RIZZDOWN_HOME/default
, which is probably~/.rizzdown/default
unless you changed theRIZZDOWN_HOME
environment variable. You can provide a custom path too, which is handy when you have profiles stored in your project repo.promptIfProfileMissing
: Defaultfalse
. If set totrue
, the system will prompt you for profile information if any is missing.maxConcurrent
: Maximum number of concurrent OpenAI API calls.subjectMatter
: The main content you wish to enhance.
If you don't provide subjectMatter
in to factory
, you'll need to provide it when you call generate
:
const rizzed = await generate(`Give me a funny 350 word summary`, {
subjectMatter: `...custom subjectMatter...`,
})
- By default,
rizzdown
uses~/.rizzdown
as the home directory for profiles. Customize this by modifyingRIZZDOWN_HOME
in.profile
,.zshrc
, or.bashrc
.
- Store the OpenAI secret key within the profile directory as
openai-secret-key
. - Alternatively, use the
OPENAI_SECRET_KEY
environment variable. Any key passed in the environment will override any other secret key source. - You can also store
openapi-secret-key
in$RIZZDOWN_HOME
. Any profile that doesn't have its own secret key defined will use this global key.
A profile contains the following files:
openai-secret-key
: Optional secret key to use with this profile only.author.md
: Author bio showcasing personality, background, and interests.subject.md
: Background information about the writing's subject.audience.md
: Description of the intended readership.style.md
: Description of the desired writing style, tone, and platform.
Use the generate
function to create the enhanced content:
const content = await generate(prompt)
The prompt
parameter defines the enhancement instructions, like "Generate a summary in 50 words or less". You can also use this to provide any final instructions on exactly how to craft the tone of the rizz'd result.
The Context
enum helps identify different parts of a profile:
export enum Context {
Style = 'style',
Author = 'author',
Subject = 'subject',
Audience = 'audience',
}
The system leverages the Bottleneck
library to handle rate limits, ensuring the OpenAI API isn't overwhelmed.
rizzdown
gracefully handles retries with the exponential-backoff
library, particularly useful if the OpenAI API requests get throttled.
Dive deeper into customization! Craft a rizzdown
profile by hand and tailor the enhancement to your distinct voice, style, and audience. Here's how to get started:
- By default,
RIZZDOWN_HOME
is nestled snugly at~/.rizzdown
. - Crave a change? Add
RIZZDOWN_HOME
to.profile
,.zshrc
, or.bashrc
. Adjust the path to wherever you'd like yourrizzdown
settings to reside. - Flexing those programmatic muscles? Point to any desired spot during programmatic access.
- Create a
openai-secret-key
file within~/.rizzdown
. It should house your precious OpenAI secret key. - Feeling rebellious? Sidestep the file approach and use the
OPENAI_SECRET_KEY
environment variable.rizzdown
will smartly fetch the key from there. - Bonus: Fancy using different keys? Store them safely inside individual profiles.
Profiles can have any name your heart desires and reside in $RIZZDOWN_HOME/<profile-name>
. Here's what you need inside:
-
author.md
:- Your spotlight! π
- Pen down a bio capturing your essence: personality, interests, capabilities, and maybe that one time you fought a dragon (or just debugged a legacy codebase).
-
subject.md
:- Your domain expertise.
- Fill it with information you'd assume is common knowledge for your readers. It sets the stage for your prose's context.
-
audience.md
:- Meet your reader! π
- Describe their quirks, values, and their connection to your subject. The better you know them, the better
rizzdown
can tailor the content!
-
style.md
:- Your desired narrative vibe.
- Clarify your prose type: Blog post? Technical document? Mysterious tale of the haunted mainframe?
- Define the tone: Humorous or serious? Casual chat or formal seminar? Describe any quirks to make the voice uniquely yours.
Pro Tip: Remember, the better and more detailed your profile, the closer rizzdown
can get to mirroring your unique voice and intention!
- β¨ Perfect for SSG buffs: If you're all about static site generators,
rizzdown
will be your go-to for content enhancement! - π€ Trust but verify: While
rizzdown
is one smart cookie, always review the magic to ensure it matches your voice and intent!
You might wonder, "How does rizzdown
turn my Markdown from mundane to magical?" The secret sauce isn't just algorithmicβit's empathetic, intuitive, and tailored.
Here's how rizzdown
finely tunes its enchantment:
-
Intent of Writing:
Whether you're penning a technical documentation, sharing thoughts in a blog, or weaving a world in a novel,
rizzdown
gets it. It understands the innate structure and nuances of different writing styles and molds its enhancements accordingly. -
Author's Bio:
Your voice. Your style. Your unique flare. By absorbing tidbits from your bio,
rizzdown
ensures that the prose remains authentically you. -
Target Audience:
Who are you writing for? Tech-savvy developers? Enthusiastic foodies? A general audience seeking knowledge?
rizzdown
tailors the content to resonate with your readers, striking the right chord every time. -
Subject's Background Knowledge:
Every domain has its shared knowledge, its set of jargon, its common truths.
rizzdown
recognizes this and crafts content that's insightful without being redundant.
By synthesizing all these elements, rizzdown
creates prose that:
- Speaks in your voice π£
- Engages your target audience π₯
- Resonates at the perfect knowledge depth π
- Aligns with the intended writing style π
With rizzdown
, you're not just getting enhanced content; you're getting content that fits like a custom-tailored suit, designed with precision and a dash of flair. Say goodbye to generic edits and hello to prose that truly pops!
For rizzdown
to sprinkle its enchantment on your Markdown, it relies on some wizardry powered by OpenAI's GPT model. For this magic to work, you'll need an OpenAI API key.
-
Sign Up or Log In:
Begin your quest by heading over to OpenAI. If you're already a member of this magical realm, simply log in.
-
API Section:
Once you're in, navigate to the API section. Here, you'll be presented with the option to generate your unique API key.
-
Copy & Keep It Safe:
Generate your key, copy it, and store it somewhere safe. Treat it like the precious artifact it is! ππ
-
Integrate with
rizzdown
:When running
rizzdown
, you'll be prompted for the API key. Simply paste it in, and voila! The magic flows!
- π« Never Commit Your API Key: If you're storing your API key in any config or settings file, ensure it's ignored in your version control. You wouldn't want your magical powers to fall into the wrong hands!
- π Mind The Quota: OpenAI might have request limits depending on your account type. Be sure to keep an eye on your usage to avoid any interruptions in your enchanting sessions.
With your OpenAI API key in hand, you're all set to unleash the full power of rizzdown
! Let the transformations begin! ππ
Love the dazzle and have ideas to sprinkle more fairy dust? We welcome contributions! Check out our CONTRIBUTING.md
for guidelines.