@lumel/ap-viz-cli
v0.0.2
Published
π Official CLI tool for creating and building custom visualizations for Analytics Plus. Generate professional templates with AP SDK integration.
Readme
π AP Visualization CLI
Official CLI tool for creating and building custom visualizations for Analytics Plus. Generate professional templates with AP SDK integration, modern styling, and development tools.
π¦ Installation
npm install -g @lumel/ap-viz-cliπ Quick Start
Create a new visualization project:
# Create a React TypeScript project
apviz create my-dashboard --template react-ts
# Create a vanilla JavaScript project
apviz create my-chart --template vanilla
# Create in current directory
apviz create . --template reactBuild your project for production:
apviz buildπ Available Templates
| Template | Description | Best For |
|----------|-------------|----------|
| vanilla | Pure JavaScript with AP SDK | Simple visualizations, learning |
| vanilla-ts | TypeScript with type safety | Type-safe JavaScript development |
| react | React with modern hooks | Interactive components |
| react-ts | React + TypeScript | Enterprise-grade applications |
π οΈ Commands
apviz create [folder] [options]
Create a new AP visualization project with professional templates.
Arguments:
folder- Target folder name (use "." for current directory)
Options:
-t, --template <template>- Choose project template (default: vanilla)
Examples:
apviz create my-dashboard --template react-ts
apviz create chart-widget -t vanilla
apviz create . --template reactapviz build
Build and package your visualization project for production.
Features:
- Compiles source code
- Optimizes assets for production
- Creates distribution files
- Validates AP visualization requirements
β¨ What's Included
Every template includes:
- π§ AP SDK Integration - Pre-configured with Analytics Plus SDK
- π Data Configuration - Ready-to-use pivot configurations
- π¨ Modern Styling - Professional CSS with responsive design
- π Documentation - Comprehensive comments and guides
- β‘ Development Server - Hot reload with Vite
- π¦ Build System - Production-ready build configuration
- π TypeScript Support - Full type safety (TS templates)
π Project Structure
my-visualization/
βββ src/
β βββ main.tsx # AP SDK integration
β βββ App.tsx # Main component
β βββ index.css # Styling
βββ public/
β βββ index.html # HTML template
βββ package.json # Dependencies
βββ vite.config.ts # Build configuration
βββ apviz.json # AP visualization metadataπ§ Development Workflow
Create Project
apviz create my-chart --template react-ts cd my-chartInstall Dependencies
npm installStart Development
npm run devBuild for Production
apviz build
π AP SDK Features
All templates include pre-configured:
- Data Roles - Category and Value mappings
- Matrix Data View - Structured data access
- Drill-down Support - Interactive data exploration
- Update Handlers - Real-time data updates
- Selection Management - User interaction handling
π― Template Details
Vanilla JavaScript
- Pure ES6+ JavaScript
- DOM manipulation
- AP SDK integration
- Modern CSS styling
Vanilla TypeScript
- Full TypeScript support
- Type-safe AP SDK usage
- Enhanced IDE experience
- Compile-time error checking
React
- Modern React with hooks
- Component-based architecture
- JSX templating
- State management
React TypeScript
- Enterprise-grade setup
- Full type safety
- React + TypeScript best practices
- Professional development experience
π Requirements
- Node.js 16.0 or higher
- npm 7.0 or higher
- Analytics Plus environment for deployment
π§ Support
For questions, issues, or feature requests, contact Lumel Technologies.
π License
ISC License - Copyright (c) Lumel Technologies
Developed by Lumel Technologies
