AlphaNimble Technologies LLP

Documentation

CodeFlex CLI Docs

CodeFlex converts your git work into polished technical content. Use this guide to install, configure, generate, edit, and save posts faster.

Install and Setup

Quick path from install to first generated post.

Requirements

  • Node.js 20 or newer
  • An OpenRouter API key

Install

npm install -g codeflex-cli
# or
npx codeflex-cli --help

Configure API Key

cp .env.example .env
# then set
OPENROUTER_API_KEY=your_openrouter_api_key_here

Get your key from https://openrouter.ai/keys

Core Commands

Everything you need for the standard CodeFlex workflow.

init

Interactive setup for tone, output directory, and style defaults.

codeflex init

generate

Generate a post from local git history or from a PR/MR URL.

codeflex generate --from v1.0.0 --to HEAD --tone changelog

style

Create and manage writing style profiles from markdown samples.

codeflex style add ./posts/*.md --name technical

config

Update model, tone, output path, project name, and style settings.

codeflex config

history

Browse previously generated posts from your output directory.

codeflex history

Generate Flags

Use flags to control context, tone, and output behavior.

--from <ref>

Start ref for commit analysis (tag, branch, or hash).

--to <ref>

End ref for analysis. Defaults to HEAD.

--pr <url>

Generate from GitHub PR or GitLab MR context.

--tone <tone>

Set tone directly: changelog, casual, product-announcement, deep-dive, devto-blog-post, release-notes, postmortem, storytelling, tweet-thread, eli5.

--style <style>

Apply one style profile or a blend like technical:70,casual:30.

--no-preview

Skip preview and jump straight to save flow.

Typical Workflow

Recommended sequence for repeatable, high quality outputs.

    Run codeflex init once to set defaults.
    Generate from your latest changes with codeflex generate or use --from, --to, or --pr.
    Select tone, platform, and model; then review preview output.
    Use draft editing and consistency helpers before saving.
    Save to your configured output folder and revisit with codeflex history.

Security Notes

Keep credentials safe while using AI-powered generation.

Do

  • Keep API keys in local .env files.
  • Commit only placeholder values in .env.example.
  • Review generated content before publishing.

Avoid

  • Committing secrets into git history.
  • Publishing AI text without quick fact checks.
  • Assuming PR context includes private data safely.