Gathering detailed insights and metrics for @bluefly/llmcli
Gathering detailed insights and metrics for @bluefly/llmcli
Gathering detailed insights and metrics for @bluefly/llmcli
Gathering detailed insights and metrics for @bluefly/llmcli
npm install @bluefly/llmcli
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
28
23
Version: 0.1.4
Stack: TypeScript, Commander.js, Node.js 18+
Purpose: Comprehensive CLI for AI development workflows and platform management
A feature-rich command-line interface for AI development, testing, and platform management. LLMCLI provides tools for AI-TDD workflows, multi-provider AI integration, project management, and deployment automation.
✅ Successfully Implemented
npm run build
works)⚠️ Known Technical Issues
🚀 Ready for Production (with validation)
❌ Needs Verification
CLI Framework (Verified Working):
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Commander.js │───▶│ Command │───▶│ AI Provider │
│ Argument │ │ Execution │ │ HTTP Client │
│ Parsing │ │ Framework │ │ (Real APIs) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Token │ │ Config │ │ Project │
│ Management │ │ Management │ │ Analysis │
│ (File System) │ │ (Multi-env) │ │ (Working) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
1# Clone the repository 2git clone https://gitlab.bluefly.io/llm/llmcli.git 3cd llmcli 4 5# Run the automated installer 6./scripts/install.sh --all
1# Install dependencies and build 2npm install 3 4# Build the CLI 5npm run build 6 7# Make executable 8chmod +x bin/llmcli 9 10# Test installation 11./bin/llmcli --help
1# Install globally 2npm install -g . 3 4# Test installation 5llmcli --help
1# Build Docker image 2docker build -t bluefly/llmcli:latest . 3 4# Run with Docker 5docker run --rm -it \ 6 -v ~/.tokens:/home/llmcli/.tokens:ro \ 7 -v ~/.gitconfig:/home/llmcli/.gitconfig:ro \ 8 -v $(pwd):/workspace \ 9 -w /workspace \ 10 bluefly/llmcli:latest --help 11 12# Or use the convenience script 13npm run docker:run -- --help
1# Development environment 2docker-compose --profile development up 3 4# Testing environment 5docker-compose --profile test up 6 7# Production environment 8docker-compose --profile production up
1# Create token directory 2mkdir -p ~/.tokens 3 4# Add your API keys 5echo "sk-your-openai-key-here" > ~/.tokens/openai.token 6echo "sk-ant-your-anthropic-key" > ~/.tokens/anthropic.token 7 8# Test AI integration 9./bin/llmcli ai test-connection
1# Install all dependencies (including dev) 2npm install 3 4# Build the project 5npm run build 6 7# Run tests 8npm test 9 10# Development mode with watch 11npm run dev
The package includes automated installation scripts:
1# Install all methods (npm + Docker + dev) 2./scripts/install.sh --all 3 4# Install only Docker 5./scripts/install.sh --docker 6 7# Install development environment 8./scripts/install.sh --dev 9 10# Install npm (local) 11./scripts/install.sh --npm 12 13# Install npm (global) 14./scripts/install.sh --npm-global
1# Build and install 2npm run build 3npm run postinstall 4 5# Docker operations 6npm run docker:build 7npm run docker:run -- --help 8 9# Development 10npm run dev 11npm run test 12npm run lint 13npm run typecheck 14 15# Installation helpers 16npm run install:docker 17npm run install:dev 18npm run install:all
LLMCLI uses Bluefly CI/CD Components for automated builds, testing, and Docker image publishing.
The project includes a comprehensive .gitlab-ci.yml
that:
Images are automatically published to:
registry.gitlab.bluefly.io/llm/llmcli:latest
registry.gitlab.bluefly.io/llm/llmcli:{commit-sha}
1docker pull registry.gitlab.bluefly.io/llm/llmcli:latest
1# Show help 2docker run --rm registry.gitlab.bluefly.io/llm/llmcli:latest --help 3 4# AI chat 5docker run --rm registry.gitlab.bluefly.io/llm/llmcli:latest ai --model ollama 6 7# Project management 8docker run --rm registry.gitlab.bluefly.io/llm/llmcli:latest project status
1docker run -it --rm registry.gitlab.bluefly.io/llm/llmcli:latest interactive
1docker run -it --rm \ 2 -v ~/.tokens:/home/llmcli/.tokens:ro \ 3 -v $(pwd):/workspace \ 4 -w /workspace \ 5 registry.gitlab.bluefly.io/llm/llmcli:latest interactive
1# Test the pipeline locally 2gitlab-ci-local 3 4# Run specific stages 5gitlab-ci-local --stage validate 6gitlab-ci-local --stage build
1# Pull the latest image 2docker pull registry.gitlab.bluefly.io/llm/llmcli:latest 3 4# Run basic commands 5docker run --rm registry.gitlab.bluefly.io/llm/llmcli:latest --help 6docker run --rm registry.gitlab.bluefly.io/llm/llmcli:latest ai --model ollama 7 8# Interactive mode with volume mounts 9docker run -it --rm \ 10 -v ~/.tokens:/home/llmcli/.tokens:ro \ 11 -v $(pwd):/workspace \ 12 -w /workspace \ 13 registry.gitlab.bluefly.io/llm/llmcli:latest interactive
Build Failures
1# Clear node_modules and reinstall 2rm -rf node_modules package-lock.json 3npm install 4 5# Check TypeScript version 6npx tsc --version 7 8# Verify Node.js version 9node --version
Permission Issues
1# Make CLI executable 2chmod +x bin/llmcli 3 4# Fix npm permissions (if needed) 5sudo chown -R $USER:$GROUP ~/.npm 6sudo chown -R $USER:$GROUP ~/.config
Docker Issues
1# Check Docker installation 2docker --version 3docker-compose --version 4 5# Build with no cache 6docker build --no-cache -t bluefly/llmcli:latest . 7 8# Run with debug 9docker run --rm -it --entrypoint /bin/sh bluefly/llmcli:latest
API Token Issues
1# Verify token files exist 2ls -la ~/.tokens/ 3 4# Check token format 5head -c 10 ~/.tokens/openai.token 6 7# Test API connection 8./bin/llmcli ai test-connection
1# Show all available commands 2./bin/llmcli --help 3 4# Get help for specific command 5./bin/llmcli ai --help 6./bin/llmcli tdd --help 7 8# Check system status 9./bin/llmcli system report 10 11# Validate installation 12./bin/llmcli project validate
llmcli llm platform:install
CommandThe llmcli llm platform:install
command provides comprehensive Drupal LLM platform installation with advanced composer package management and conflict resolution.
1llmcli llm platform:install \ 2 --project-name="llm-platform-demo" \ 3 --working-dir="/Users/flux423/Sites/" \ 4 --site-name="DEMO LLM Platform" \ 5 --ddev-name="llm-platform-demo" \ 6 --admin-user="admin" \ 7 --admin-pass="admin" \ 8 --provider="ollama" \ 9 --drupal-version="10" \ 10 --token-location="~/.tokens" \ 11 --ollama-key-loc /usr/share/ollama/.ollama/id_ed25519.pub \ 12 --development-mode="true"
The command automatically handles Bluefly composer packages with proper stability settings:
1# Install with custom composer packages 2llmcli llm platform:install \ 3 --composer-require="bluefly/ai_agent_crewai,bluefly/llm,bluefly/secure_drupal" \ 4 --composer-minimum-stability="dev" \ 5 --composer-prefer-stable="true" \ 6 --with-development-symlinks="true" 7 8# Install with local module development 9llmcli llm platform:install \ 10 --modules-source-path="/path/to/custom/modules" \ 11 --recipes-source-path="/path/to/custom/recipes" \ 12 --themes-source-path="/path/to/custom/themes"
The command automatically installs these Bluefly modules:
bluefly/ai_agent_crewai
- CrewAI multi-agent integrationbluefly/ai_agent_huggingface
- HuggingFace agent integrationbluefly/ai_agent_orchestra
- Agent orchestration frameworkbluefly/ai_provider_apple
- Apple Foundation Models integrationbluefly/ai_provider_langchain
- LangChain integrationbluefly/alternative_services
- Alternative service providersbluefly/api_normalizer
- API standardization layerbluefly/gov_compliance
- Government compliance frameworkbluefly/llm
- Core LLM integration hubbluefly/llm_platform
- LLM platform managementbluefly/llm_platform_manager
- Platform management UIbluefly/mcp_registry
- MCP protocol registrybluefly/recipe_onboarding
- Recipe-based onboardingbluefly/secure_drupal
- Security frameworkThe command runs through 18 phases:
The command automatically handles common installation issues:
Package Stability Issues
1# Automatically sets in composer.json: 2{ 3 "config": { 4 "minimum-stability": "dev", 5 "prefer-stable": true 6 } 7}
Configuration Conflicts
ai.settings
configuration conflictsModule Installation
1--project-name <name> # Project name 2--working-dir <path> # Working directory 3--site-name <name> # Drupal site name 4--admin-user <user> # Admin username 5--admin-pass <pass> # Admin password 6--drupal-version <version> # Drupal version (10, 11) 7--profile <profile> # Installation profile
1--provider <provider> # Primary AI provider (ollama, openai, anthropic) 2--ollama-server-url <url> # Ollama server URL 3--ollama-default-model <model> # Ollama default model 4--ollama-key-loc <path> # Ollama key location 5--ai-models <models> # Comma-separated AI models 6--embedding-models <models> # Comma-separated embedding models
1--composer-require <packages> # Comma-separated composer packages 2--composer-minimum-stability <level> # dev, alpha, beta, RC, stable 3--composer-prefer-stable <true|false> # Prefer stable versions 4--composer-require-dev <packages> # Comma-separated dev packages 5--with-development-symlinks <true|false> # Use development symlinks
1--development-mode <true|false> # Enable development mode 2--modules-source-path <path> # Path to custom modules 3--recipes-source-path <path> # Path to custom recipes 4--themes-source-path <path> # Path to custom themes 5--with-local-packages <true|false> # Use local packages 6--auto-composer-install <true|false> # Auto install composer packages
1--with-vector-db <true|false> # Enable vector database 2--with-ai-swarm <true|false> # Enable AI swarm intelligence 3--with-secure <true|false> # Enable security hardening 4--with-ddev-orchestration <true|false> # Enable DDEV orchestration 5--with-automated-testing <true|false> # Enable automated testing
Minimal Installation
1llmcli llm platform:install \ 2 --project-name="llm-minimal" \ 3 --site-name="LLM Platform Minimal" \ 4 --provider="ollama"
Development Installation
1llmcli llm platform:install \ 2 --project-name="llm-dev" \ 3 --site-name="LLM Platform Development" \ 4 --provider="ollama" \ 5 --development-mode="true" \ 6 --with-vector-db="true" \ 7 --with-ai-swarm="true" \ 8 --with-automated-testing="true" \ 9 --modules-source-path="/path/to/custom/modules"
Production Installation
1llmcli llm platform:install \ 2 --project-name="llm-prod" \ 3 --site-name="LLM Platform Production" \ 4 --provider="openai" \ 5 --with-secure="true" \ 6 --composer-minimum-stability="stable" \ 7 --with-performance-baseline="true"
Composer Package Issues
1# Check if packages exist 2composer show bluefly/ai_agent_crewai 3 4# Clear composer cache 5composer clear-cache 6 7# Update composer 8composer self-update
Module Installation Issues
1# Check module status 2ddev drush pm:list 3 4# Clear cache 5ddev drush cr 6 7# Check for conflicts 8ddev drush config:status
DDEV Issues
1# Restart DDEV 2ddev restart 3 4# Check DDEV status 5ddev status 6 7# Rebuild DDEV 8ddev rebuild
1// This actually makes HTTP requests 2import { AIProvider } from './ai/ai-provider.js'; 3 4const provider = new AIProvider({ 5 provider: 'openai', 6 apiKey: 'sk-...', // Loaded from ~/.tokens/ 7 model: 'gpt-4', 8 temperature: 0.7 9}); 10 11// Makes real API call to OpenAI 12const result = await provider.generateText('Explain quantum computing');
1// Real file system integration 2function getOpenAIToken(): string | null { 3 // Checks multiple locations: 4 // 1. OPENAI_API_KEY environment variable 5 // 2. ~/.tokens/openai.token file 6 // 3. ~/.tokens/openai.key file 7 8 // Actually reads files and validates format 9 if (tokenContent.startsWith('sk-')) { 10 return tokenContent; 11 } 12}
Available Commands (25+ categories):
├── ai/ # AI provider integration
├── tdd/ # Test-driven development
├── project/ # Project management and analysis
├── worker/ # Worker orchestration
├── token/ # API token management
├── system/ # System analysis and health
├── git/ # Git workflow automation
├── cicd/ # CI/CD pipeline management
├── drupal/ # Drupal-specific commands
├── llm/ # LLM platform installation & management
│ ├── platform:install # Complete Drupal LLM platform setup
│ ├── platform:configure # Platform configuration
│ └── platform:validate # Platform validation
├── config/ # Configuration management
├── reports/ # Analysis and reporting
├── security/ # Security audit and deployment
│ ├── audit # Comprehensive security audit
│ ├── scan # Quick security scan
│ ├── fix # Apply automated security fixes
│ ├── deploy-standards # Deploy security standards across projects
│ ├── report # Generate security reports
│ └── compliance # Check government compliance
└── interactive/ # Interactive workflows
1# Development with watch mode 2npm run dev 3 4# Run tests (100+ test files) 5npm test 6 7# Type checking 8npm run typecheck 9 10# Build for distribution 11npm run build 12 13# Test specific functionality 14./bin/llmcli ai test-connection 15./bin/llmcli token list 16./bin/llmcli project analyze
1# These work with real API keys: 2llmcli ai chat "Your prompt here" 3llmcli ai generate-code "Create a React component" 4llmcli ai analyze-code file.js 5llmcli ai test-connection
1# File and dependency analysis: 2llmcli project analyze 3llmcli project info 4llmcli deps check 5llmcli system report
1# Test-driven development automation: 2llmcli tdd init 3llmcli tdd generate-tests 4llmcli ai-tdd workflow
1# ONE-COMMAND SYNC: Commit, merge, and push all projects 2llmcli git sync-all 3 4# With options for comprehensive control 5llmcli git sync-all --force --commit-message "feat: major sync" --report /tmp/sync-report.json 6 7# Multi-project git operations 8llmcli git multi-project --health-check 9llmcli git multi-project --status --type nodejs-package 10llmcli git multi-project --sync --report /tmp/health-report.json 11 12# Individual git operations 13llmcli git pr create "Add new feature" 14llmcli git conventional changelog 15llmcli git flow feature start my-feature
1# SAFE: See what would be deployed without making changes 2llmcli security deploy-standards --dry-run 3 4# Test on a single project first 5llmcli security deploy-standards --projects "_CommonNPM/llmcli" --dry-run 6 7# Deploy only GitLab templates (safest option) 8llmcli security deploy-standards --templates-only --dry-run 9 10# Deploy only CI/CD security enhancements 11llmcli security deploy-standards --ci-only --dry-run 12 13# Deploy to specific projects with backups 14llmcli security deploy-standards --projects "_CommonNPM/llm-gateway,_CommonNPM/llm-ui" --force 15 16# Deploy across all 25 LLM Platform projects 17llmcli security deploy-standards --force
1# Comprehensive security audit across all projects 2llmcli security audit 3 4# Run audit with automatic fixes 5llmcli security audit --fix 6 7# Audit specific projects only 8llmcli security audit --projects "/path/to/project1,/path/to/project2" 9 10# Government compliance mode (FedRAMP, FISMA) 11llmcli security audit --gov-compliance --framework fedramp 12 13# TDD enforcement (95% coverage minimum) 14llmcli security audit --tdd-enforce
1# Quick scan of all projects 2llmcli security scan 3 4# Quiet mode (minimal output) 5llmcli security scan --quiet
1# Apply automated security fixes 2llmcli security fix 3 4# See what would be fixed without applying changes 5llmcli security fix --dry-run 6 7# Fix specific vulnerability types 8llmcli security fix --type npm_vulnerabilities,missing_security_headers
1# Generate comprehensive security report 2llmcli security report 3 4# Generate report in different formats 5llmcli security report --format json --output security-report.json 6llmcli security report --format html --output security-report.html 7llmcli security report --format pdf --output security-report.pdf
1# Check government compliance status 2llmcli security compliance 3 4# Check specific compliance framework 5llmcli security compliance --framework fedramp 6llmcli security compliance --framework fisma 7llmcli security compliance --framework hipaa 8llmcli security compliance --framework sox
The security deploy-standards
command provides comprehensive security standards deployment across the entire LLM Platform ecosystem (25+ projects) using 100% open-source tools compatible with GitLab Community Edition.
Core Security Files:
SECURITY.md
- Standardized security vulnerability reporting policy.editorconfig
- Consistent code formatting across teams.pre-commit-config.yaml
- Automated security and quality checksGitLab Templates:
CI/CD Security Enhancements:
--dry-run Mode: Shows exactly what would be deployed without making any changes:
1llmcli security deploy-standards --dry-run
Automatic Backups: Existing files are automatically backed up before overwriting:
1# Backups created as: filename.backup.timestamp 2SECURITY.md.backup.1641234567 3.editorconfig.backup.1641234567
Selective Deployment: Deploy only specific components or projects:
1# Deploy only GitLab templates (safest) 2llmcli security deploy-standards --templates-only 3 4# Deploy only CI/CD enhancements 5llmcli security deploy-standards --ci-only 6 7# Deploy to specific projects 8llmcli security deploy-standards --projects "_CommonNPM/llm-gateway,_CommonNPM/llm-ui"
Project Type Intelligence: Automatically detects and customizes deployments:
_CommonNPM/*
): ESLint security, npm audit_DrupalSource/*
): PHPStan security, Drupal standards1# Basic usage 2llmcli security deploy-standards [options] 3 4# Options: 5--dry-run # Show what would be deployed without changes 6--projects <paths> # Comma-separated list of specific project paths 7--force # Overwrite existing security files 8--skip-backup # Skip backing up existing files 9--templates-only # Deploy only GitLab templates 10--ci-only # Deploy only CI/CD security enhancements
The command targets all LLM Platform ecosystem projects:
Core Platform (_CommonNPM/):
TDDAI Suite:
CI/CD Components:
Drupal Components (_DrupalSource/):
Phase 1: Safe Exploration
1# 1. See the full deployment plan 2llmcli security deploy-standards --dry-run 3 4# 2. Test on a single project 5llmcli security deploy-standards --projects "_CommonNPM/llmcli" --dry-run
Phase 2: Gradual Deployment
1# 3. Deploy templates only (safest) 2llmcli security deploy-standards --templates-only 3 4# 4. Deploy CI/CD enhancements 5llmcli security deploy-standards --ci-only 6 7# 5. Deploy all security files 8llmcli security deploy-standards --force
Phase 3: Validation
1# 6. Test deployed security features 2cd _CommonNPM/llmcli 3pre-commit install 4pre-commit run --all-files 5 6# 7. Run security audit 7llmcli security audit
Open Source Tools Used:
GitLab Community Edition Compatible:
The deployment generates comprehensive reports:
1# Deployment summary 2📊 DEPLOYMENT SUMMARY 3==================== 4✅ Successfully processed: 23 projects 5⚠️ Skipped: 0 projects 6❌ Errors: 2 projects 7⏱️ Duration: 45s 8 9# Security compliance check 10🔍 SECURITY COMPLIANCE CHECK 11============================ 12✅ All required security files present 13✅ GitLab templates deployed 14✅ CI/CD security enhancements active 15⚠️ 2 projects need manual configuration
1# Reality check needed for: 2# - Platform deployment features (unverified scope) 3# - Kubernetes orchestration (complex claims) 4# - Multi-service coordination (needs testing) 5 6# Verified working: 7# - CLI framework and parsing 8# - AI provider integration 9# - Token management 10# - Basic project analysis
1# Required for full functionality: 2# 1. API keys properly configured 3# 2. Git repository context 4# 3. Node.js project structure 5# 4. TypeScript toolchain
Technical Constraints
Verified Capabilities
Phase 1: Validation & Testing
Phase 2: Core Improvements
What Works Well:
What Needs Verification:
This Project's Strength:
1# Build for distribution 2npm run build 3 4# Test the package locally 5npm pack 6 7# Publish to npm registry 8npm publish 9 10# Publish with specific tag 11npm publish --tag beta
1# Build production image 2docker build -t bluefly/llmcli:latest . 3 4# Tag for version 5docker tag bluefly/llmcli:latest bluefly/llmcli:v1.0.0 6 7# Push to registry 8docker push bluefly/llmcli:latest 9docker push bluefly/llmcli:v1.0.0
1# Build all distribution formats 2npm run build 3npm run docker:build 4 5# Create release package 6tar -czf llmcli-v1.0.0.tar.gz dist/ bin/ package.json README.md LICENSE 7 8# Test installation from package 9npm install -g llmcli-v1.0.0.tar.gz
1# Run all tests 2npm test 3 4# Run specific test suites 5npm run test:unit 6npm run test:integration 7npm run test:e2e 8 9# Check code quality 10npm run lint 11npm run typecheck 12npm run test:coverage
MIT
Development Platform: Node.js CLI for AI development workflows
Current State: Solid foundation with real AI integration, needs validation of complex features
Next Steps: Test end-to-end workflows and verify platform deployment claims
Last Updated: January 2025
NOTE: This CLI has substantial real functionality. While some complex features need verification, the core AI integration, token management, and command framework are genuinely implemented and functional.
LLMCLI_CONFIG
to specify a custom config file:
1LLMCLI_CONFIG=./myconfig.json ./bin/llmcli ai --model ollama
1OPENAI_API_KEY=sk-xxx ./bin/llmcli ai --model openai
--debug
for verbose output:
1./bin/llmcli ai --model ollama --debug
1docker run -it --rm \ 2 -v ~/.tokens:/home/llmcli/.tokens:ro \ 3 -v $(pwd):/workspace \ 4 -w /workspace \ 5 registry.gitlab.bluefly.io/llm/llmcli:latest interactive
docker login registry.gitlab.bluefly.io
and use a valid GitLab personal access token.~/.tokens/
directory contains the correct files (e.g., openai.token
, anthropic.token
).chmod +x bin/llmcli
to make the CLI executable.npm install
and npm run build
to ensure dependencies and build output are up to date.Badges update automatically based on the latest pipeline and registry status. For more details, see the project pipeline and container registry.
No vulnerabilities found.
No security vulnerabilities found.