Khaled Code
AI-powered coding assistant for your terminal.
Installation
npm install -g khaled-code
Requirements
- Node.js 18+ (required)
- Python 3 (recommended for better terminal support)
Platform-Specific Setup
Android/Termux
For best experience on Android/Termux, install Python:
pkg install python
npm install -g khaled-code
macOS/Linux
Python is usually pre-installed. If not:
- macOS: Python 3 comes pre-installed
- Ubuntu/Debian:
sudo apt install python3
- Fedora/RHEL:
sudo dnf install python3
- Arch:
sudo pacman -S python
Windows
Works out of the box with ConPTY (no Python needed)
Authentication
Sign in with Google
khaled login
This opens your browser for Google authentication. Your account starts with a free subscription.
Check authentication status
khaled status
Pro Account
New accounts start with free subscription. To upgrade to Pro:
Contact: kbaq.work@gmail.com
Include your registered email address when requesting an upgrade.
Basic Usage
Start interactive session
khaled
Run one-off commands
khaled "explain this code"
khaled -p "write a function to calculate fibonacci"
Continue previous session
khaled -c
Common Commands
khaled login
- Sign in with Google
khaled logout
- Sign out
khaled status
- Check auth status
khaled --help
- Show help
khaled --version
- Show version
Troubleshooting
Not authenticated?
Run khaled login
to sign in with Google
Need Pro features?
Contact kbaq.work@gmail.com for upgrade
Double character typing on Android/Termux?
Install Python for better terminal support:
pkg install python
Then restart khaled. This fixes the terminal echo issue.
Interactive mode not working properly?
Enable debug mode to see which PTY strategy is being used:
DEBUG_PTY=1 khaled
Terminal output looks garbled?
Ensure your terminal supports UTF-8 and ANSI colors:
export TERM=xterm-256color
export LANG=en_US.UTF-8
Powered by FSSoft