🎯 Kanmi Suite CLI

Unified Command Line Interface for Analytics & SEO

🚀 Quick Installation

npm install -g kanmi-suite-cli

This provides the unified kanmi command and manages all KanmiLabs CLI tools with enhanced features including configuration management, colorized output, and smart command routing.

✨ What is Kanmi Suite CLI?

Kanmi Suite CLI is an enhanced command orchestrator that provides a unified interface for all KanmiLabs tools. Rather than remembering multiple CLI commands, you can use the single kanmi command to access Google Analytics 4, Search Console, and Looker Studio functionality.

🎪 Smart Command Routing

The suite CLI automatically routes your commands to the appropriate underlying tool. For example, kanmi gsc sites automatically runs gsc-cli sites with enhanced features like configuration management and colorized output.

🛠 Managed Tools

Tool Short Command Package Purpose
GSC CLI kanmi gsc kanmi-gsc-cli Google Search Console data retrieval
GA4 CLI kanmi ga4 kanmi-ga4-cli Google Analytics 4 reporting
Looker CLI kanmi looker kanmi-looker-cli Looker Studio report management

🔧 Enhanced Features

🎨 Colorized Output

All commands feature enhanced colorized output with success, error, warning, and info messages for better visibility.

⚙️ Configuration Management

Save command defaults, manage global settings, and store frequently used parameters for quick access.

🚀 Smart Installation

Automatically install, update, and manage all underlying CLI tools with dependency checking.

📊 Status Monitoring

Check installation status, version information, and tool availability with comprehensive reporting.

🔄 Command Routing

Intelligent command routing with automatic tool detection and helpful error messages.

💾 Default Saving

Save commonly used command parameters as defaults to avoid repetitive typing.

📖 Core Commands

Tool Management

kanmi status

Check installation status of all tools

kanmi install

Install all CLI tools at once

kanmi install <tool>

Install specific tool (gsc, ga4, looker)

kanmi update

Update all tools to latest versions

kanmi discover

Discover and report available tools

kanmi version

Show version info for suite and tools

Configuration Management

# View current configuration kanmi config # Set a configuration value kanmi config set default-project 123456789 # Get a specific configuration value kanmi config get default-project # Delete a configuration key kanmi config delete default-project # Show saved command defaults kanmi config defaults # Reset all configuration kanmi config reset

Tool Commands (with Suite Enhancement)

# Google Search Console kanmi gsc sites # List all sites kanmi gsc query https://example.com # Get search analytics kanmi gsc sitemaps https://example.com # Check sitemaps # Google Analytics 4 kanmi ga4 report -p 123456 -m users -d country # Users by country kanmi ga4 events -p 123456 -s 2024-01-01 # Top events kanmi ga4 compare -p 123456 --current last-7-days # Compare periods # Looker Studio kanmi looker list # List reports kanmi looker export -i report_id # Export as PDF kanmi looker clone -i report_id -n "Copy" # Clone report

💾 Advanced Features

Save Command Defaults

Save frequently used parameters to avoid retyping them:

# Save default parameters for a command kanmi gsc query sc-domain:example.com --dimensions query,page --save-defaults # Later, just run the base command and defaults will be used kanmi gsc query # Check what defaults are saved kanmi config defaults gsc

Smart Command Routing

The suite CLI provides intelligent error handling and suggestions:

If a tool isn't installed, you'll see helpful guidance:

❌ gsc-cli is not installed.
Run: npm install -g kanmi-gsc-cli
Or: kanmi install

Configuration Examples

# Set default Google Analytics property kanmi config set default-ga4-property 123456789 # Set default Search Console site kanmi config set default-gsc-site https://example.com # Set preferred output format kanmi config set default-format json # Save complex command as default kanmi gsc query sc-domain:example.com --dimensions query,page,position --date-range last-30-days --save-defaults

🚀 Getting Started

1. Install the Suite CLI

npm install -g kanmi-suite-cli

2. Check Status and Install Tools

# Check what's installed kanmi status # Install all tools at once kanmi install # Or install tools individually kanmi install gsc kanmi install ga4 kanmi install looker

3. Set Up Authentication

Each tool requires Google Cloud OAuth setup. Run any command to start the authentication flow:

# This will trigger OAuth setup for GSC kanmi gsc sites # This will trigger OAuth setup for GA4 kanmi ga4 properties # This will trigger OAuth setup for Looker kanmi looker list
💡 Pro Tip: The suite CLI automatically checks if tools are installed and provides helpful installation guidance if they're missing.

🔐 Authentication & Setup

Google Cloud Requirements

OAuth Credentials

# Create .env file in your project directory CLIENT_ID=your-google-oauth-client-id CLIENT_SECRET=your-google-oauth-client-secret
⚠️ Important: Each underlying tool manages its own authentication tokens. The suite CLI doesn't store or manage credentials directly.

📊 Practical Examples

Daily SEO Monitoring Workflow

# Check all tools are ready kanmi status # Get yesterday's Search Console data kanmi gsc query https://example.com --date-range yesterday --format json # Get GA4 traffic data for comparison kanmi ga4 report -p 123456 --metrics sessions,users --dimensions date --date-range yesterday # Export current dashboard kanmi looker export -i dashboard_id --output daily-report.pdf

Monthly Reporting Automation

# Set up defaults for monthly reporting kanmi config set report-site https://example.com kanmi config set report-property 123456789 # Save monthly GSC query defaults kanmi gsc query $SITE --dimensions query,page --date-range last-month --limit 100 --save-defaults # Save monthly GA4 report defaults kanmi ga4 report -p $PROPERTY --metrics sessions,users,pageviews --dimensions source,medium --date-range last-month --save-defaults # Now monthly reports are just: kanmi gsc query > monthly-seo.json kanmi ga4 report > monthly-analytics.json

Multi-Site Management

# List all sites in Search Console kanmi gsc sites --format json > all-sites.json # Check sitemaps for all sites for site in $(cat all-sites.json | jq -r '.sites[].siteUrl'); do kanmi gsc sitemaps "$site" --format json done # Get site performance comparison kanmi gsc query https://site1.com --date-range last-7-days > site1.json kanmi gsc query https://site2.com --date-range last-7-days > site2.json

🚨 Troubleshooting

Common Issues

Tool Not Found

# If you see "command not found" errors kanmi status # Check what's installed kanmi install # Install missing tools kanmi discover # Discover available tools

Configuration Issues

# Reset configuration if needed kanmi config reset # Check current configuration kanmi config # Verify saved defaults kanmi config defaults

Authentication Problems

Authentication is handled by individual tools. If you have auth issues:

Debug Mode

# Enable verbose output for troubleshooting DEBUG=* kanmi gsc sites DEBUG=* kanmi ga4 properties

🔗 Related Tools

📞 Support