Installation Guide

Get started with Khadem in minutes. This comprehensive guide walks you through installing Khadem and setting up your development environment on any platform.

Quick Start

Already have Dart installed? Jump directly to the installation steps:

Skip to Khadem Installation

System Requirements

Khadem requires the following minimum system specifications to run smoothly:

Required

  • Dart SDK: 3.0.0 or higher
  • Operating System: Windows, macOS, or Linux
  • Git: For version control

Optional

  • Docker: For containerized deployments
  • MySQL: For database features
  • Redis: For caching and queue management

Prerequisites

Before installing Khadem, you need to have Dart SDK installed on your system.

Installing Dart SDK

Khadem requires Dart SDK 3.0.0 or higher. Choose your platform below to download and install Dart:

Verify Dart Installation

After installing Dart, verify it's working correctly by checking the version:

bash
# Verify Dart installation
dart --version

Expected output: You should see something like Dart SDK version: 3.1.0 (stable)

Installing Khadem

Now that Dart is installed, let's install the Khadem CLI globally using Dart's package manager:

bash
# Install Khadem globally
dart pub global activate khadem

# This will download and install Khadem CLI globally

This command downloads and installs the Khadem CLI tool globally, making it accessible from anywhere in your terminal.

Verify Installation

Confirm that Khadem is installed correctly and accessible from your command line:

bash
# Verify Khadem installation
khadem --version

Success! If you see the Khadem version information, the installation was successful.

Updating Khadem

Keep Khadem up-to-date to get the latest features, improvements, and bug fixes:

bash
# Update to the latest version
dart pub global activate khadem

# Force update if needed
dart pub global activate khadem --overwrite

Pro Tip: Run this command regularly to stay updated with the latest Khadem features and security patches.

Troubleshooting

Having issues with installation? Here are solutions to common problems:

Version Conflicts

If you encounter version conflicts or Khadem isn't updating properly, try reinstalling:

bash
# Uninstall and reinstall Khadem
dart pub global deactivate khadem
dart pub global activate khadem

Command Not Found

If you see "khadem: command not found", you need to add Dart's pub cache to your PATH:

Windows:

bash
# Add to PowerShell profile (run as Administrator)
$env:Path += ";$env:USERPROFILE\.pub-cache\bin"

# Or add permanently to environment variables:
# Control Panel > System > Advanced System Settings > Environment Variables
# Add to PATH: %USERPROFILE%\.pub-cache\bin

macOS/Linux:

bash
# Add to your shell profile (.bashrc, .zshrc, etc.)
echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc

# Reload your shell configuration
source ~/.bashrc

# For Zsh users
echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.zshrc
source ~/.zshrc

Permission Issues (macOS/Linux)

If you encounter permission errors during installation:

bash
# Fix permission issues on macOS/Linux
sudo chown -R $(whoami) ~/.pub-cache
chmod +x ~/.pub-cache/bin/khadem

Post-Installation Checklist

Make sure everything is set up correctly before moving forward:

Dart SDK 3.0.0+ installed

Verify with dart --version

Khadem CLI installed globally

Check with khadem --version

Khadem accessible from command line

Run khadem --help to see available commands

IDE configured with Dart support

Install Dart extension for VS Code, IntelliJ, or your preferred IDE

Need Help?

Having trouble with installation? Our community is here to help!

On this page