{"_id":"@aquilasmc/baldo-cli","name":"@aquilasmc/baldo-cli","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@aquilasmc/baldo-cli","version":"1.0.1","description":"Baldo Command Line Interface - Mission Control for Projects","type":"module","bin":{"mc":"dist/cli.js","baldo":"dist/cli.js"},"main":"./dist/cli.js","scripts":{"postinstall":"echo '\n🎉 Baldo CLI installed successfully!\n\nGet started:\n  mc auth login\n  mc projects ls\n  mc --help\n'"},"keywords":["project-management","cli","baldo","mission-control","tasks","kanban","productivity","development"],"author":{"name":"Baldo Team"},"license":"MIT","homepage":"https://baldo.aquilasmc.com","repository":{"type":"git","url":"git+https://github.com/your-org/baldo.git","directory":"cli"},"bugs":{"url":"https://github.com/your-org/baldo/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"commander":"^14.0.0","chalk":"^5.6.0","convex":"^1.25.4","inquirer":"^12.9.4"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_id":"@aquilasmc/baldo-cli@1.0.1","gitHead":"7d8c34a9d051cd399aaaf42727a30188e84bc270","_nodeVersion":"24.1.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-QEJFa9FG64EP+Mf12qu25ccWM1iYQHcJ9DAHZLNIKtEYrAKXflRiw5lWSbLWWLwvkGfbh3DlvchGUYGOOpCAVg==","shasum":"348d0616f346d7d781ac327bda3db29bec744c96","tarball":"https://registry.npmjs.org/@aquilasmc/baldo-cli/-/baldo-cli-1.0.1.tgz","fileCount":4,"unpackedSize":142002,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE0G/1Fl03CV3g5McnRB4B8k6lGcjPNVllpyYz7YOLOpAiBsP8hjiQqI8lZjs63+OpnSWMrpt1nala7o0cO8mN3TZQ=="}]},"_npmUser":{"name":"gedaiphd","email":"jmgeda@aquilasmc.com"},"directories":{},"maintainers":[{"name":"gedaiphd","email":"jmgeda@aquilasmc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/baldo-cli_1.0.1_1756716930857_0.5544579650015629"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-01T08:55:30.749Z","1.0.1":"2025-09-01T08:55:31.054Z","modified":"2025-09-01T08:55:31.348Z"},"maintainers":[{"name":"gedaiphd","email":"jmgeda@aquilasmc.com"}],"description":"Baldo Command Line Interface - Mission Control for Projects","homepage":"https://baldo.aquilasmc.com","keywords":["project-management","cli","baldo","mission-control","tasks","kanban","productivity","development"],"repository":{"type":"git","url":"git+https://github.com/your-org/baldo.git","directory":"cli"},"author":{"name":"Baldo Team"},"bugs":{"url":"https://github.com/your-org/baldo/issues"},"license":"MIT","readme":"# Baldo CLI Production Integration Guide\n\n## Overview\n\nThis guide covers deploying and distributing the Baldo CLI (`mc`) for production use with full integration to the Baldo web application.\n\n## Architecture\n\nThe CLI provides perfect feature parity with the web interface through:\n\n- **Shared Backend**: Same Convex functions used by both web and CLI\n- **JWT Authentication**: Clerk-based authentication with device code flow\n- **Environment-Aware Configuration**: Automatic switching between development/staging/production\n- **Real-time Sync**: Changes made in CLI appear instantly in web UI and vice versa\n\n## Production Setup\n\n### 1. Environment Configuration\n\nCreate production environment configurations:\n\n```bash\n# Set production environment variables\nexport NEXT_PUBLIC_CONVEX_URL_PROD=\"https://your-production-convex.convex.cloud\"\nexport CLERK_PUBLISHABLE_KEY_PROD=\"pk_live_your_production_key\"\n\n# Build CLI for production\npnpm run cli:build\n\n# Test CLI configuration\n./dist/cli/index.js config env --all\n```\n\n### 2. Convex Production Deployment\n\n```bash\n# Deploy Convex to production\nnpx convex deploy --prod\n\n# Verify CLI authentication functions are deployed\nnpx convex logs --prod | grep \"CLI\"\n```\n\n### 3. Clerk Production Setup\n\n1. **Create Production Clerk App**:\n   - Set up production domain in Clerk dashboard\n   - Configure JWT templates for Convex integration\n   - Add production domain to allowed origins\n\n2. **Configure CLI Authentication**:\n   ```bash\n   # Update production environment\n   mc config add-env production \\\n     --convex-url \"https://your-production-convex.convex.cloud\" \\\n     --clerk-key \"pk_live_your_production_key\" \\\n     --web-url \"https://baldo.aquilasmc.com\"\n   \n   # Switch to production\n   mc config switch production\n   ```\n\n## Distribution Strategies\n\n### Option 1: npm Package (Recommended)\n\n```bash\n# Prepare package for publishing\nnpm version patch\nnpm publish --access public\n\n# Users install globally\nnpm install -g pmxpert-cli\n\n# Users can then run\nmc auth login\nmc projects ls\n```\n\n### Option 2: Direct Binary Distribution\n\n```bash\n# Build standalone binary\npnpm run cli:build\nchmod +x dist/cli/index.js\n\n# Distribute via GitHub Releases\ngh release create v1.0.0 \\\n  --title \"Baldo CLI v1.0.0\" \\\n  --notes \"Production CLI release with full web app integration\"\n```\n\n### Option 3: Docker Container\n\n```dockerfile\nFROM node:20-slim\nWORKDIR /app\nCOPY package*.json ./\nRUN npm ci --only=production\nCOPY dist/ ./dist/\nRUN ln -s /app/dist/cli/index.js /usr/local/bin/mc\nENTRYPOINT [\"mc\"]\n```\n\n## Installation Methods\n\n### For End Users\n\n#### Method 1: npm (Easiest)\n```bash\n# Install globally\nnpm install -g pmxpert-cli\n\n# Verify installation\nmc --version\n\n# Login and start using\nmc auth login\n```\n\n#### Method 2: Direct Download\n```bash\n# Download latest release\ncurl -L https://github.com/your-org/pmxpert/releases/latest/download/mc-linux -o mc\nchmod +x mc\nsudo mv mc /usr/local/bin/\n\n# Login\nmc auth login\n```\n\n#### Method 3: Development Installation\n```bash\n# Clone repository\ngit clone https://github.com/your-org/pmxpert.git\ncd pmxpert\n\n# Install dependencies and build CLI\npnpm install\npnpm run cli:build\n\n# Create global symlink\nnpm link\n\n# Use CLI\nmc auth login\n```\n\n## Authentication Flow\n\n### Device Code Flow (Production)\n\n1. **User runs**: `mc auth login`\n2. **CLI generates** unique device code\n3. **CLI opens browser** to production web app: `https://baldo.aquilasmc.com/cli-auth?code=ABC123`\n4. **User authorizes** in web browser (requires sign-in)\n5. **CLI receives** JWT token and stores securely\n6. **All subsequent commands** use JWT for authentication\n\n### Production Security\n\n- JWT tokens stored in `~/.pmxpert/auth.json`\n- Tokens expire after 24 hours (configurable)\n- Device codes expire after 5 minutes\n- All API calls use HTTPS with Clerk JWT validation\n\n## Environment Management\n\n### Switching Environments\n\n```bash\n# View current environment\nmc config env\n\n# View all environments  \nmc config env --all\n\n# Switch to production\nmc config switch production\n\n# Add custom environment\nmc config add-env staging \\\n  --convex-url \"https://staging-convex.convex.cloud\" \\\n  --clerk-key \"pk_test_staging_key\" \\\n  --web-url \"https://pmxpert-staging.vercel.app\"\n```\n\n### Environment Variables\n\n```bash\n# Override environment temporarily\nPMXPERT_CLI_ENV=production mc projects ls\n\n# Set permanently\nexport PMXPERT_CLI_ENV=production\n```\n\n## Production Monitoring\n\n### Health Checks\n\n```bash\n# Comprehensive diagnostics\nmc config doctor\n\n# JSON output for monitoring\nmc config doctor --json\n```\n\n### Analytics Integration\n\nThe CLI automatically reports usage analytics to the same PostHog instance as the web app:\n\n```typescript\n// CLI usage tracked alongside web usage\nposthog.capture('cli_command_executed', {\n  command: 'projects_ls',\n  environment: 'production',\n  user_id: user.id\n});\n```\n\n## Deployment Checklist\n\n### Pre-Deployment\n\n- [ ] Convex production deployment tested\n- [ ] Clerk production app configured\n- [ ] JWT templates created in Clerk\n- [ ] Production domain added to CORS settings\n- [ ] CLI builds without errors\n- [ ] All commands work with production backend\n\n### Deployment\n\n- [ ] Build CLI: `pnpm run cli:build`\n- [ ] Test authentication flow end-to-end\n- [ ] Verify all CLI commands work\n- [ ] Test environment switching\n- [ ] Run diagnostics: `mc config doctor`\n\n### Post-Deployment\n\n- [ ] Monitor CLI authentication success rates\n- [ ] Track command usage analytics\n- [ ] Monitor error rates in PostHog\n- [ ] Collect user feedback\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Authentication Failures**:\n   ```bash\n   mc config doctor --json\n   # Check connectivity and Clerk configuration\n   ```\n\n2. **Environment Issues**:\n   ```bash\n   mc config env --all\n   # Verify correct environment is selected\n   ```\n\n3. **Network Connectivity**:\n   ```bash\n   # Test Convex connectivity\n   curl -I https://your-production-convex.convex.cloud\n   ```\n\n### Debug Mode\n\n```bash\n# Enable verbose logging\nmc --verbose projects ls\n\n# JSON output for debugging\nmc projects ls --json\n```\n\n## Production URLs\n\nUpdate these URLs for your production deployment:\n\n- **Production Web App**: `https://baldo.aquilasmc.com`\n- **Production Convex**: `https://your-production-convex.convex.cloud`\n- **CLI Auth URL**: `https://baldo.aquilasmc.com/cli-auth?code=DEVICE_CODE`\n\n## Support\n\nFor CLI-specific issues:\n- Check `mc config doctor` output\n- Review logs in `~/.pmxpert/`\n- File issues with JSON output from diagnostics\n\nThe CLI maintains perfect parity with the web interface - if something works in the web app but not in CLI, it's a configuration issue, not a feature gap.","readmeFilename":"README.md","_rev":"1-eb5430583f37d78f6e5ab5fea7f7885f"}