Skip to content

shamikkarkhanis/kasa-tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kasa TUI Setup

This guide explains how to make the ktui command accessible from anywhere on your system.

1. Prerequisites

Ensure you have a virtual environment set up and dependencies installed:

# Create venv if not exists
python3 -m venv venv
# Activate it
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt

2. Install as a CLI Tool

Install the package in "editable" mode. This creates the ktui command and ensures any changes you make to the code are reflected immediately:

pip install -e .

3. Enable Global Access

To run ktui from any directory without activating the virtual environment, follow one of these methods:

Method A: Symlink to ~/bin (Recommended)

If you have a bin directory in your home folder that is already in your PATH:

# Create the symlink (replace /path/to/kasa with your actual project path)
ln -sf /Users/shamik/Documents/kasa/venv/bin/ktui ~/bin/ktui

Method B: Add to PATH in .zshrc or .bashrc

Add the virtual environment's bin directory directly to your shell's configuration:

# For Zsh (default on macOS)
echo 'export PATH="/Users/shamik/Documents/kasa/venv/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

# For Bash
echo 'export PATH="/Users/shamik/Documents/kasa/venv/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

4. Usage

Once configured, simply type:

ktui

This will launch the interactive TUI for discovering and controlling your Kasa devices.

About

TUI interface for kasa smart devices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages