Skip to content

Installation

Choose the installation method that best suits your needs:

  1. Quick Install (pip) - Fastest way to get started (recommended for users)
  2. Development Setup (git + Makefile) - For contributors and advanced users
  3. Manual Setup - Full control over the installation
  4. Container Setup - Isolated environment with Docker/Podman

The easiest way to install hatiyar is from PyPI using pip:

Terminal window
pip install hatiyar

After installation, you can run hatiyar using either:

Terminal window
# Using the console script (if available in your PATH)
hatiyar
# Or using the module entry point
python -m hatiyar
# To launch the interactive shell directly
hatiyar shell
# or
python -m hatiyar shell

Check the installed version:

Terminal window
hatiyar --version
# or
python -m hatiyar --version

For contributors or users who want the latest development version:

Before installing hatiyar, ensure you have the following:

  • Python 3.9 or higher - Download Python
  • git - Install git
  • uv - Install uv
  • build-essential (Linux only, for Makefile-based setup) - C compiler and build tools
    • Debian/Ubuntu: sudo apt install build-essential
    • Fedora/RHEL: sudo dnf install gcc make
    • Alpine: apk add build-base
Terminal window
git clone https://github.com/ajutamangdev/hatiyar.git
cd hatiyar

Use the Makefile to set up the virtual environment and install dependencies:

Terminal window
make setup

This will:

  • Create a virtual environment (.venv)
  • Install all dependencies with uv sync
  • Activate the environment

Check the project setup:

Terminal window
make info

This displays:

  • Python version (from virtual environment)
  • Tool versions (uv, mypy, ruff)
  • Project configuration

After setup, use the Makefile to launch hatiyar:

Terminal window
make shell # Launch interactive shell
make info # Show project info

All commands automatically use the activated virtual environment.

If you prefer not to use Makefile or need more control over the setup:

Terminal window
git clone https://github.com/ajutamangdev/hatiyar.git
cd hatiyar

2. Create and Activate Virtual Environment

Section titled “2. Create and Activate Virtual Environment”

Using uv to create a virtual environment:

Terminal window
uv venv
source .venv/bin/activate # On Linux/macOS
# OR
.venv\Scripts\activate # On Windows
Terminal window
uv sync
Terminal window
python3 src/hatiyar/main.py --version
Terminal window
python3 src/hatiyar/main.py shell # Interactive shell

hatiyar can be containerized for consistent deployment across environments. Use either Docker or Podman.

Terminal window
# Build the image
docker build -t hatiyar -f Containerfile .
# Verify the image was created
docker images | grep hatiyar
Terminal window
# Build the image
podman build -t hatiyar -f Containerfile .
# Verify the image was created
podman images | grep hatiyar
Terminal window
docker run -it --rm hatiyar shell
Terminal window
podman run -it --rm hatiyar shell

Mount your AWS credentials into the container for cloud operations:

Docker:

Terminal window
docker run -it --rm \
-v ~/.aws:/home/appuser/.aws:ro \
-e AWS_PROFILE=your-profile \
hatiyar shell

Podman:

Terminal window
podman run -it --rm \
-v ~/.aws:/home/appuser/.aws:ro \
-e AWS_PROFILE=your-profile \
hatiyar shell

Replace your-profile with your AWS profile name.

This error occurs when running a stale container image. Rebuild it:

Terminal window
# Docker
docker build -t hatiyar -f Containerfile . --no-cache
# Podman
podman build -t hatiyar -f Containerfile . --no-cache

The --no-cache flag forces a fresh build without using cached layers.

The Containerfile uses a multi-stage build for efficiency:

  1. Builder Stage (python:3.11-alpine): Compiles dependencies with uv
  2. Runtime Stage (python:3.11-slim): Runs the application with minimal footprint

Environment variables in the runtime:

  • PYTHONUNBUFFERED=1: Real-time log output
  • PYTHONDONTWRITEBYTECODE=1: No .pyc files in container
  • Non-root appuser for security

Install system dependencies:

Terminal window
# Debian/Ubuntu (with build tools for Makefile)
sudo apt update
sudo apt install python3 python3-pip git build-essential
# Fedora/RHEL (with build tools for Makefile)
sudo dnf install python3 python3-pip git gcc make
# Alpine (with build tools for Makefile)
apk add python3 git build-base

Then install uv:

Terminal window
curl -LsSf https://astral.sh/uv/install.sh | sh

Using Homebrew:

Terminal window
brew install python git
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Install Python
  2. Install git for Windows
  3. Install uv via PowerShell:
Terminal window
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Verify uv is installed:

Terminal window
uv --version

If not installed, follow the uv installation guide

Check Python version:

Terminal window
python3 --version
# Should show 3.9 or higher

To update to the latest version:

Terminal window
cd hatiyar
git pull origin main
make setup # Update dependencies and activate environment
Terminal window
# Remove directory
cd ..
rm -rf hatiyar