@mayur7685/airkit-cli
v1.0.1
Published
CLI tool for AIR Kit credential application development
Maintainers
Readme
AIR Kit CLI
A comprehensive command-line interface for AIR Kit credential application development.
Features
- 🚀 Project Scaffolding: Initialize new AIR Kit projects with interactive setup
- ⚙️ Configuration Management: Manage environment variables and settings
- 🔐 Key Management: Generate and manage cryptographic keys
- 🌍 Environment Management: Switch between sandbox, staging, and production
- 🧪 Testing Tools: Test credential flows and API connectivity
- 🚀 Deployment Tools: Validate and deploy to multiple platforms
- 📚 Comprehensive Help: Built-in documentation and troubleshooting guides
Installation
Global Installation (Recommended)
npm install -g @mayur7685/airkit-cliLocal Development
git clone https://github.com/mayur7685/airkit-cli.git
cd airkit-cli
npm install
npm run build
npm linkQuick Start
Create a new project:
airkit initFollow the interactive setup wizard to configure your project
Start development:
cd your-project-name airkit dev start
Commands
Project Management
airkit init [type] [name]- Initialize a new AIR Kit projectairkit validate- Validate CLI installation and functionality
Configuration
airkit config init- Initialize configuration filesairkit config validate- Validate current configurationairkit config export- Export configuration for deployment
Environment Management
airkit env list- List available environmentsairkit env set <env>- Switch to specified environmentairkit env validate- Validate environment configuration
Key Management
airkit keys generate- Generate new cryptographic keysairkit keys validate- Validate existing keysairkit keys rotate- Rotate private keys
Testing
airkit test issuance- Test credential issuance flowairkit test verification- Test credential verification flowairkit test connectivity- Test API connectivity
Development
airkit dev start- Start development server with AIR Kit integration
Deployment
airkit deploy validate- Validate production readinessairkit deploy platform --platform <name>- Generate platform-specific configurationsairkit deploy guide- Generate comprehensive deployment guide
Help & Documentation
airkit help- Show general helpairkit help <command>- Show command-specific helpairkit help workflow <name>- Show workflow guidesairkit help faq- Show frequently asked questions
Project Types
Demo Project
Full-featured application with both credential issuance and verification capabilities.
airkit init demo my-demo-appIssuer Project
Credential issuance-only application.
airkit init issuer my-issuer-appVerifier Project
Credential verification-only application.
airkit init verifier my-verifier-appCustom Project
Minimal setup with manual configuration options.
airkit init custom my-custom-appSupported Frameworks
- React + Vite: Fast development with hot reload
- Next.js: Full-stack React framework with SSR
- Vanilla JavaScript: Pure JavaScript without frameworks
Deployment Platforms
The CLI supports deployment to multiple platforms:
- Vercel: Optimized for frontend applications
- Netlify: JAMstack deployments
- Docker: Containerized deployments
- Railway: Simple cloud deployments
- Render: Full-stack cloud platform
- AWS: Amazon Web Services
- Google Cloud: Google Cloud Platform
Configuration
The CLI uses environment variables for configuration:
# Core AIR Kit Configuration
PARTNER_PRIVATE_KEY="your-private-key"
SIGNING_ALGORITHM="ES256"
NEXT_PUBLIC_BUILD_ENV="sandbox"
NEXT_PUBLIC_PARTNER_ID="your-partner-id"
# Feature-specific variables
NEXT_PUBLIC_ISSUER_DID="your-issuer-did"
NEXT_PUBLIC_ISSUE_PROGRAM_ID="your-program-id"
NEXT_PUBLIC_VERIFIER_PROGRAM_ID="your-verifier-id"Development
Building
# Clean build
npm run build
# Development with watch mode
npm run dev
# Production build
npm run build:prodImportant: Always run npm run build after making changes to TypeScript files before testing the CLI.
Testing
npm test
npm run test:coverageLinting
npm run lint
npm run lint:fixValidation
npm run build
airkit validate --fullTroubleshooting
Common Issues
- Command not found: Ensure the CLI is properly installed globally
- Permission errors: Check file permissions and try with elevated privileges
- Network errors: Verify internet connection and AIR Kit service status
- Configuration errors: Run
airkit config validateto check settings
Getting Help
- Run
airkit help troubleshootingfor detailed troubleshooting guide - Check the documentation
- Report issues on GitHub
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run
npm run lintandnpm test - Submit a pull request
License
MIT License - see LICENSE file for details.
