CLI Commands
Complete reference for all Aparture command-line interface commands.
Core Commands
npm run dev
Start the Next.js development server for the web interface.
npm run devWhat it does:
- Starts development server on http://localhost:3000
- Enables hot module reloading
- Loads environment variables from
.env.local - Serves the Aparture web interface
When to use:
- Interactive web-based analysis
- Testing configuration changes
- Manual paper review
- First-time setup
Output:
▲ Next.js 14.2.31
- Local: http://localhost:3000
- Environments: .env.local
✓ Ready in 1254msnpm run analyze
Run complete automated analysis with all features enabled.
npm run analyzeWhat it does:
- Complete multi-stage analysis pipeline
- Generates NotebookLM document
- Uploads to Google NotebookLM
- Generates and downloads podcast
- Saves all outputs to
reports/
Duration: 40-120 minutes
Outputs:
- Analysis report:
YYYY-MM-DD_arxiv_analysis_XXmin.md - NotebookLM document:
YYYY-MM-DD_notebooklm_XXmin.md - Podcast audio:
YYYY-MM-DD_podcast.m4a - Screenshots:
reports/screenshots/
First run: Requires interactive Google authentication for NotebookLM
npm run analyze:report
Run analysis and generate report only (skip NotebookLM features).
npm run analyze:reportWhat it does:
- Complete multi-stage analysis pipeline
- Generates analysis report
- Skips NotebookLM document generation
- Skips podcast generation
Duration: 30-90 minutes
Outputs:
- Analysis report:
YYYY-MM-DD_arxiv_analysis_XXmin.md - Screenshots:
reports/screenshots/
When to use:
- Don't need podcast output
- Want faster completion
- Testing analysis configuration
npm run analyze:document
Run analysis and generate NotebookLM document (skip podcast).
npm run analyze:documentWhat it does:
- Complete multi-stage analysis pipeline
- Generates analysis report
- Generates NotebookLM document
- Skips podcast generation
Duration: 30-90 minutes
Outputs:
- Analysis report:
YYYY-MM-DD_arxiv_analysis_XXmin.md - NotebookLM document:
YYYY-MM-DD_notebooklm_XXmin.md - Screenshots:
reports/screenshots/
When to use:
- Want NotebookLM document for manual podcast generation
- Skip automated podcast to save time
- Generate document for other uses
npm run analyze:podcast
Generate podcast from existing files (skip analysis).
npm run analyze:podcastWhat it does:
- Finds most recent analysis report
- Finds most recent NotebookLM document
- Verifies files are from same date
- Uploads to Google NotebookLM
- Generates and downloads podcast
Duration: 10-20 minutes
Outputs:
- Podcast audio:
YYYY-MM-DD_podcast.m4a - Screenshots:
reports/screenshots/notebooklm_*.png
Requirements:
- Recent analysis report in
reports/ - Recent NotebookLM document in
reports/ - Files must have matching dates
When to use:
- Regenerate podcast with different duration
- Podcast generation failed previously
- Manual analysis, automated podcast
npm run setup
Interactive configuration wizard.
npm run setupWhat it does:
- Starts development server
- Opens browser to Aparture interface
- Lets you configure all settings visually
- Saves configuration to browser localStorage
- Closes automatically when done
Duration: 5-15 minutes (manual configuration)
Configuration includes:
- arXiv categories
- Research criteria
- Model selection for each stage
- Batch sizes and thresholds
- Optional stages (Quick Filter, Post-processing, NotebookLM)
- Podcast duration
When to use:
- First-time setup
- Change configuration
- Test different settings
Testing Commands
npm run test:dryrun
Run complete workflow with mock API (no costs).
npm run test:dryrunWhat it does:
- Simulates complete analysis workflow
- Uses mock API responses (no real API calls)
- Tests browser automation
- Verifies download functionality
- Generates mock report
Duration: ~45 seconds
Cost: Free (no API calls)
Outputs:
- Mock report:
YYYY-MM-DD_arxiv_analysis_dryrun.md - Screenshots:
reports/screenshots/
When to use:
- Verify installation
- Test configuration without costs
- Debug automation issues
- Demo the workflow
npm run test:minimal
Run real analysis with 3 papers (minimal cost).
npm run test:minimalWhat it does:
- Fetches 3 real papers from cs.LG
- Runs all analysis stages with real APIs
- Tests PDF download and analysis
- Generates real report
Duration: 5-10 minutes
Cost: ~$0.10-0.50 (depending on models)
Outputs:
- Real report:
YYYY-MM-DD_arxiv_analysis_minimal.md - Screenshots:
reports/screenshots/
When to use:
- Validate API keys
- Test model behavior
- End-to-end verification
- Before production runs
Build Commands
npm run build
Build the Next.js application for production.
npm run buildWhat it does:
- Compiles application for production
- Optimizes bundles
- Generates static pages where possible
- Outputs to
.next/directory
Duration: 30-60 seconds
When to use:
- Before deployment
- Performance optimization
- Production preparation
npm run start
Start production server (requires prior build).
npm run build
npm run startWhat it does:
- Starts optimized production server
- Serves built application
- Runs on http://localhost:3000
When to use:
- Test production build locally
- Deploy to server
- Production environment
Documentation Commands
npm run docs:dev
Start VitePress documentation development server.
npm run docs:devWhat it does:
- Starts documentation server on http://localhost:5173
- Enables hot reloading for doc changes
- Serves VitePress documentation site
When to use:
- Edit documentation
- Preview doc changes
- Local documentation browsing
npm run docs:build
Build static documentation site.
npm run docs:buildWhat it does:
- Builds static HTML documentation
- Optimizes assets
- Outputs to
docs/.vitepress/dist/
When to use:
- Deploy documentation
- Generate offline docs
- Production documentation build
npm run docs:preview
Preview built documentation site.
npm run docs:build
npm run docs:previewWhat it does:
- Serves built documentation
- Tests production documentation build
- Runs on http://localhost:4173
When to use:
- Verify documentation build
- Test before deployment
Code Quality Commands
npm run lint
Run ESLint to check code quality.
npm run lintWhat it does:
- Scans all JavaScript/JSX files
- Reports code quality issues
- Checks for errors and warnings
Exit codes:
- 0: No issues found
- 1: Issues found
npm run lint:fix
Run ESLint and automatically fix issues.
npm run lint:fixWhat it does:
- Scans all JavaScript/JSX files
- Automatically fixes fixable issues
- Reports remaining issues
npm run format
Check code formatting with Prettier.
npm run formatWhat it does:
- Checks all files against Prettier rules
- Reports formatting issues
- Does not modify files
npm run format:fix
Format code with Prettier.
npm run format:fixWhat it does:
- Formats all files according to Prettier rules
- Modifies files in place
- Reports changed files
Common Workflows
Daily Production Run
npm run analyzeComplete workflow: analysis → document → podcast
Time: 40-120 minutes Cost: ~$4-6
Quick Analysis (No Podcast)
npm run analyze:reportAnalysis only, skip time-consuming podcast.
Time: 30-90 minutes Cost: ~$3-5
Test Before Production
# Free test
npm run test:dryrun
# Paid test (~$0.50)
npm run test:minimal
# If tests pass, run production
npm run analyzeRegenerate Podcast
# Run analysis with document
npm run analyze:document
# Later, generate podcast with different settings
npm run analyze:podcastFirst-Time Setup
# 1. Install dependencies
npm install
# 2. Install Playwright
npx playwright install chromium
# 3. Configure settings
npm run setup
# 4. Test with dry run
npm run test:dryrun
# 5. Test with minimal
npm run test:minimal
# 6. Run production
npm run analyzeEnvironment Variables
All commands respect environment variables from .env.local:
Required:
ACCESS_PASSWORD- Web interface password- At least one of:
CLAUDE_API_KEYOPENAI_API_KEYGOOGLE_AI_API_KEY
Optional:
NODE_ENV- Environment modePORT- Development server port
See Environment Variables for details.
Troubleshooting Commands
Check Node Version
node --version
# Should be v18.0.0 or higherCheck npm Version
npm --version
# Should be 8.0.0 or higherVerify Installation
npm list --depth=0
# Lists all installed packagesClear Cache and Reinstall
rm -rf node_modules package-lock.json
npm cache clean --force
npm installCheck Port Availability
# Mac/Linux
lsof -i:3000
# Windows
netstat -ano | findstr :3000Kill Process on Port
# Mac/Linux
lsof -ti:3000 | xargs kill -9
# Windows
# Find PID from netstat, then:
taskkill /PID <pid> /FAdvanced Usage
Custom Port
PORT=3001 npm run devProduction Build and Start
npm run build
NODE_ENV=production npm run startWatch Logs
npm run analyze 2>&1 | tee aparture.logBackground Execution
# Linux/Mac
nohup npm run analyze > aparture.log 2>&1 &
# Windows (PowerShell)
Start-Process npm -ArgumentList "run analyze" -NoNewWindow