A high-performance TypeScript CLI for processing homework submissions from CSV files and Notion databases with ultra-fast GitHub repository analysis.
# From NPM (public)
npm install -g homework-grader
# From GitHub Packages (alternative)
npm install -g @trancethehuman/homework-grader# From NPM (public)
npx homework-grader
# From GitHub Packages (alternative)
npx @trancethehuman/homework-gradergit clone https://github.com/trancethehuman/homework-grader.git
cd homework-grader
pnpm install
pnpm build
pnpm startAfter installation, simply run:
homework-graderThe CLI will guide you through:
- Setting up API keys (GitHub, E2B, AI providers)
- Choosing data source (Notion Database or CSV File)
- Processing repositories and generating grades
The CLI includes a built-in update checker that:
- ✅ Checks daily for new versions (cached, non-intrusive)
- ✅ Shows friendly notifications when updates are available
- ✅ Provides clear update instructions
- ✅ Never interrupts your workflow - notifications appear at the end
- ✅ Fails silently - won't break if update check fails
Example notification:
📦 Update available!
Current: 1.0.0
Latest: 1.1.0
Run the following to update:
npm install -g homework-grader@latest
- Ultra-Fast Processing: Sandbox integration with 5-20x performance boost
- Dual Processing Modes: Sandbox (default) with GitHub API fallback
- Interactive CLI: React/Ink-based interface with step-by-step workflow
- Real-Time Metrics: Processing speed and timing data for all operations
- Smart Optimization: Adapts strategy based on repository size
pnpm build- Build TypeScript (required first)pnpm start- Run interactive modepnpm run dev- Development mode (no build needed)pnpm start file.csv- Legacy mode with CSV file
Create a .env file in the project root with the following required variables:
# AI Provider API Keys (at least one required)
OPENAI_API_KEY="your-openai-api-key"
ANTHROPIC_API_KEY="your-anthropic-api-key"
GOOGLE_GENERATIVE_AI_API_KEY="your-google-ai-api-key"
# Notion OAuth (required for Notion access)
# Deploy `notion-proxy/` to Render and set env vars:
# NOTION_CLIENT_ID=234d872b-594c-80ec-9dac-00379870e655
# NOTION_CLIENT_SECRET=******
# REDIRECT_URI=https://<your-render-service>.onrender.com/callback
# Optional override (defaults to hosted proxy if omitted):
# NOTION_PROXY_URL=https://<your-render-service>.onrender.com
# Sandbox (required for ultra-fast processing)
E2B_API_KEY="your-e2b-api-key"
# Optional GitHub API settings
GITHUB_TOKEN="your-github-token"
GITHUB_API_ONLY=true # Force GitHub API mode (skip sandbox)Setup Instructions:
- AI Providers: Get API keys from OpenAI, Anthropic, or Google AI
- Notion: Create integration at Notion Developers. Use OAuth via the bundled proxy instead of a Notion API key. The CLI will open a browser to connect your workspace.
- Sandbox: Get API key from your E2B Dashboard
- CLI calls a minimal proxy (
/notion-proxy) to start OAuth; client secret lives only on the proxy. - Proxy routes:
/auth/start,/auth/status/:state,/callback,/refresh. - Redirect URI must match in Notion settings and proxy:
https://<render>/callback(prod) orhttp://localhost:8765/callback(local). - CLI stores the access token locally; it refreshes when possible and only prompts when needed.
- Free Render plan may cold-start; hit
/healthfirst to warm up if OAuth feels slow.
If you encounter permission errors during global installation:
# On macOS/Linux - use sudo if needed
sudo npm install -g homework-grader
# Or use npx instead (no installation required)
npx homework-graderEnsure you're using Node.js 22 or higher:
node --version # Should be >= 22.0.0- GitHub: Without a token, you're limited to 60 requests/hour
- Solution: Provide a GitHub Personal Access Token when prompted
- E2B: If sandbox initialization fails, the CLI will automatically fall back to GitHub API
- Solution: Ensure your E2B API key is valid at E2B Dashboard
- "Command not found" - The global installation may have failed or your PATH is incorrect
- Try:
npx homework-graderinstead
- Try:
- "Module not found" - Dependencies may be missing
- Try: Reinstalling with
npm install -g homework-grader --force
- Try: Reinstalling with
- Notion OAuth fails - The proxy service may be cold starting
- Try: Wait a moment and retry the authentication
If you prefer to disable update checking:
# Set environment variable to disable update checks
export NO_UPDATE_NOTIFIER=true
homework-graderThis package uses fully automated publishing - no manual steps required!
Every push to main branch automatically:
- ✅ Builds and tests the package
- ✅ Auto-increments version if needed (patch version bump)
- ✅ Publishes to NPM as
homework-grader - ✅ Publishes to GitHub Packages as
@trancethehuman/homework-grader - ✅ Creates GitHub Release with changelog
- ✅ Creates git tag for the version
# Just push your changes to main
git add .
git commit -m "Add new feature"
git push origin main
# GitHub Actions automatically:
# - Detects if version exists on NPM
# - Increments patch version if needed (1.0.0 → 1.0.1)
# - Publishes to both NPM and GitHub Packages
# - Creates release notes- First publish: Uses version from
package.json(currently 1.0.0) - Subsequent pushes: Auto-increments patch version (1.0.0 → 1.0.1 → 1.0.2...)
- Manual control: Update
package.jsonversion manually for major/minor releases
For automated publishing, add NPM_TOKEN to repository secrets:
-
Get NPM Token:
- Go to npmjs.com → Profile → Access Tokens
- Generate "Automation" token for
homework-grader - Copy the token (starts with
npm_...)
-
Add to GitHub:
- Go to repository → Settings → Secrets and variables → Actions
- Add secret:
NPM_TOKENwith your token value
-
Release Process:
# Update version and create git tag npm version patch # or minor/major # Push to trigger automated release git push --follow-tags
This repository auto-publishes on pushes to main. If the current package.json version already exists on NPM, CI will bump the patch version and push a bot commit back to main. As a result, your local branch can become behind immediately after you push.
Recommended setup (one-time):
git config --global pull.rebase true
git config --global rebase.autostash true
# optional convenience
git config --global alias.up 'pull --rebase --autostash'Project-only setup (repo-local, not global):
git config pull.rebase true
git config rebase.autostash true
git config alias.up 'pull --rebase --autostash'
# optional
git config pull.ff only
# verify local settings
git config --local --list | grep -E 'pull.rebase|rebase.autostash|alias.up|pull.ff'Everyday flow:
# before pushing more changes after a prior push
git pull --rebase
git pushIf you prefer to avoid CI pushing to main, switch to a tag-based release flow (create a tag locally with npm version and push tags) or a PR-based version bump workflow.
- ✅ Multi-version testing on Node.js 22 & 23
- ✅ Package installation verification
- ✅ Dual publishing to NPM + GitHub Packages
- ✅ Automated GitHub releases with changelog
- ✅ Build artifacts stored for debugging
- ✅ Status badges show real-time build status
GNU