Skip to content

Instantly share code, notes, and snippets.

View alexcarpenter's full-sized avatar
:shipit:

Alex Carpenter alexcarpenter

:shipit:
View GitHub Profile
---
Clerk CLI vs Notion CLI Design: Key Differences
Things you already do well (matching or exceeding Notion's guidelines)
- Noun-verb structure -- you're already there (clerk users list, clerk apps create)
- stdout vs stderr separation -- your log.data() / log.info() split is clean and enforced by lint rules
- Non-TTY / agent mode -- your mode detection is actually more sophisticated than Notion's (explicit --mode flag, CLERK_MODE env var, auto-detection, structured JSON error
output for agents)
- Confirmation defaults -- destructive prompts default to false, --yes skips them. Matches exactly.
@alexcarpenter
alexcarpenter / wizard.tsx
Created May 7, 2026 21:29
wizard-prototype
/**
* Wizard State Machine — Prototype
*
* Unified wizard primitive inspired by XState 5. Steps, guards,
* sub-steps, and transitions are defined as static data. Guard
* implementations are provided separately (like XState's `setup()`)
* where they have access to React hooks and reactive state.
*
* The reducer handles pure navigation. Guards are resolved in the
* hook layer before dispatching — keeping the reducer testable
@alexcarpenter
alexcarpenter / easing-fade.md
Last active September 22, 2025 20:51
easing-fade.md
BEFORE AFTER
import {
format as dateFnsFormat,
formatDistanceToNow,
isToday,
isValid,
isYesterday,
parseISO,
} from 'date-fns';
/**
@alexcarpenter
alexcarpenter / settings.json
Created January 3, 2024 23:13
.vscode/settings.json
{
"window.autoDetectColorScheme": true,
"workbench.colorTheme": "GitHub Dark",
"workbench.preferredLightColorTheme": "GitHub Light",
"workbench.preferredDarkColorTheme": "GitHub Dark",
"workbench.tree.indent": 20,
"editor.fontFamily": "JetBrains Mono NL, Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.cursorStyle": "block",
@alexcarpenter
alexcarpenter / useBoolean.ts
Created June 21, 2022 20:57
useBoolean hook
function useBoolean(initialState = false) {
const [state, setState] = React.useState(initialState)
const handlers = React.useMemo(
() => ({
on: () => {
setState(true)
},
off: () => {
setState(false)
const container = {
hidden: { opacity: 0 },
show: {
opacity: 1,
transition: {
staggerChildren: 0.25,
},
},
}
on:
push:
branches:
- main
jobs:
stable_website_preview_cherry_pick:
runs-on: ubuntu-latest
name: Cherry pick main to stable-website-preview branch
steps:
#######################################################################################################################################
#######################################################################################################################################
#######################################################################################################################################
#######################################################################################################################################
#######################################################################################################################################
#######################################################################################################################################
########################################################################M@#############################################################
#########################################################x##############