kinde-ops
v1.0.1
Published
CLI tool for Kinde operations, QA, and automation
Downloads
31
Maintainers
Readme
kinde-ops 🚀
Unofficial CLI tool for creating test data and running simple workflows in Kinde.
📋 Table of Contents
✨ Features
- 🔧 Easy Configuration - Interactive setup wizard for quick onboarding
- 👥 User Management - List, filter, and seed users with advanced options
- 🏢 Organization Management - Manage and seed organizations effortlessly
- 🎲 Data Seeding - Generate realistic test data using Faker.js
- 🔐 Secure Credential Storage - Credentials stored securely in system keychain
- 🎨 Beautiful CLI - Colorful, intuitive interface built with Chalk
- 🚀 Developer Focused - Built for QA teams and developers working with Kinde
📦 Installation
Global Installation (Recommended)
npm install -g kinde-opsLocal Installation
npm install kinde-opsFrom Source
git clone https://github.com/arobce/kinde-ops.git
cd kinde-ops
npm install
npm run build
npm link🚀 Quick Start
Initialize your configuration
kinde-ops initYou'll be prompted to enter:
- Profile name (e.g., "default", "production", "staging")
- Kinde domain (e.g., your-domain.kinde.com)
- M2M Client ID
- M2M Client Secret
List users
kinde-ops users:listSeed test data
kinde-ops users:seed --number 10 --base-email [email protected]
⚙️ Configuration
Profile Management
kinde-ops supports multiple profiles for different environments:
# Initialize a new profile
kinde-ops init
# Use a specific profile
kinde-ops users:list --profile productionCredential Storage
Credentials are securely stored in your system's keychain using keytar:
- macOS: Keychain
- Linux: libsecret
- Windows: Credential Vault
📚 Commands
Config Commands
init
Initialize or update your Kinde CLI configuration.
kinde-ops initInteractive prompts:
- Profile name
- Kinde domain
- M2M Client ID
- M2M Client Secret
User Commands
users:list
List users with optional filtering and pagination.
kinde-ops users:list [options]Options:
| Option | Description | Example |
|--------|-------------|---------|
| --page-size <number> | Number of results per page | --page-size 50 |
| --next-token <token> | Pagination token for next page | --next-token abc123 |
| --user-id <ids> | Filter by comma-separated user IDs | --user-id id1,id2 |
| --email <emails> | Filter by comma-separated emails | --email [email protected],[email protected] |
| --username <names> | Filter by comma-separated usernames | --username john,jane |
| --phone <phones> | Filter by comma-separated phone numbers | --phone +1234567890 |
| --expand <fields> | Expand related data: organizations, identities, billing | --expand organizations,identities |
| --has-organization | Only return users with at least one organization | --has-organization |
| --verbose | Enable detailed output | --verbose |
Examples:
# List all users
kinde-ops users:list
# List users with pagination
kinde-ops users:list --page-size 25
# Filter by email
kinde-ops users:list --email [email protected]
# Expand organizations data
kinde-ops users:list --expand organizations --verboseusers:seed
Create multiple test users with realistic fake data.
kinde-ops users:seed [options]Options:
| Option | Description | Default |
|--------|-------------|---------|
| --number <number> | Number of users to create | Required |
| --base-email <email> | Base email, emails are then generated by prefixing + before the @ symbol | Required |
| --is-verified | Mark users as verified | false |
Examples:
# Create verified users with specific email pattern
kinde-ops users:seed --number 5 --base-email [email protected] --is-verifiedOrganization Commands
organizations:list
List all organizations with optional pagination.
kinde-ops organizations:list [options]Options:
| Option | Description |
|--------|-------------|
| --page-size <number> | Number of results per page |
| --verbose | Enable detailed output |
Examples:
# List all organizations
kinde-ops organizations:list
# List with custom page size
kinde-ops organizations:list --page-size 50 --verboseorganizations:seed
Create multiple test organizations.
kinde-ops organizations:seed [options]Options:
| Option | Description |
|--------|-------------|
| --number <number> | Number of organizations to create |
Examples:
# Create 5 test organizations
kinde-ops organizations:seed --number 5🎛️ Options
Global Options
Available for all commands:
| Option | Description | Example |
|--------|-------------|---------|
| --profile <name> | Use a specific configuration profile | --profile production |
| -h, --help | Display help for command | |
| -V, --version | Output version number | |
💡 Examples
Complete Workflow Example
# 1. Initialize configuration
kinde-ops init
# 2. Create test organizations
kinde-ops organizations:seed --number 3
# 3. Create test users
kinde-ops users:seed --number 20 --base-email [email protected] --is-verified
# 4. List all users with organization details
kinde-ops users:list --expand organizations --verbose
# 5. Filter specific users
kinde-ops users:list --email [email protected],[email protected]Multi-Environment Setup
# Configure development environment
kinde-ops init
# Enter profile: dev
# Enter domain: dev.kinde.com
# ...
# Configure production environment
kinde-ops init
# Enter profile: production
# Enter domain: prod.kinde.com
# ...
# Use different profiles
kinde-ops users:list --profile dev
kinde-ops users:list --profile production🛠️ Development
Prerequisites
- Node.js 18.x or higher
- npm or yarn
Setup
# Clone the repository
git clone https://github.com/arobce/kinde-ops.git
cd kinde-ops
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build the project
npm run build
# Link for local testing
npm linkProject Structure
kinde-ops/
├── src/
│ ├── cli/
│ │ ├── index.ts # Main CLI entry point
│ │ ├── commands/ # Command implementations
│ │ │ ├── config.ts
│ │ │ ├── organizations.ts
│ │ │ └── users.ts
│ │ └── context/
│ │ └── runtime.ts # Profile resolution
│ ├── kinde/
│ │ ├── organizations.ts # Organization API calls
│ │ ├── users.ts # User API calls
│ │ └── utils/
│ │ ├── client.ts # HTTP client setup
│ │ ├── error-handler.ts # Error handling
│ │ └── query.ts # Query builder
│ ├── types/ # TypeScript type definitions
│ └── utils/
│ └── config/ # Configuration management
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── README.mdScripts
| Script | Description |
|--------|-------------|
| npm run dev | Run CLI in development mode |
| npm run build | Compile TypeScript to JavaScript |
| npm run prepublishOnly | Automatically build before publishing |
🔮 Coming Soon
🎯 Automated Workflows
- End-to-End Test Scenarios - Run complete workflows with a single command
- Generate users → Create organizations → Auto-assign users to organizations
- Customizable workflow templates for common testing scenarios
- Batch operations with progress tracking
🚀 Enhanced Management
Advanced User Operations
- Bulk user updates and deletions
- User role management and permissions
- Import/export user data (CSV, JSON)
- User activity tracking and reporting
Organization Management
- Assign/remove users from organizations
- Bulk organization operations
- Organization hierarchy management
- Custom organization properties
Role & Permission Management
- Create and manage custom roles
- Assign roles to users and organizations
- Permission auditing and reporting
📊 Analytics & Reporting
- Generate comprehensive reports on users, organizations, and activities
- Export data in multiple formats (JSON, CSV, HTML)
- Custom query builder for complex filtering
Want to see a feature sooner? Open an issue or contribute!
🤝 Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
ISC © Roshan Chapagain
🔗 Links
🙏 Acknowledgments
- Built with Commander.js
- Styled with Chalk
- Test data from Faker.js
- Secure storage via Keytar
Made with ❤️ for the Kinde community
