mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-07 06:48:52 +00:00
Compare commits
4 Commits
45c112b26b
...
cfb861b60a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cfb861b60a | ||
![]() |
ca533a3518 | ||
![]() |
a7da9b8971 | ||
![]() |
a0ae414765 |
54
AGENTS.md
54
AGENTS.md
@@ -2,6 +2,60 @@
|
||||
|
||||
This project is written in **Python**. Follow these instructions when working with the code base.
|
||||
|
||||
## Installation Quickstart for AI Agents
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Ensure the system has the required build tools and Python headers. Examples:
|
||||
|
||||
```bash
|
||||
# Ubuntu/Debian
|
||||
sudo apt update && sudo apt install -y \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
pkg-config \
|
||||
python3.11-dev \
|
||||
curl \
|
||||
git
|
||||
|
||||
# CentOS/RHEL
|
||||
sudo yum install -y gcc gcc-c++ libffi-devel pkgconfig python3-devel curl git
|
||||
|
||||
# macOS
|
||||
brew install python@3.11 libffi pkg-config git
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
Run the installer script to fetch the latest release:
|
||||
|
||||
```bash
|
||||
# Stable release
|
||||
bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)"
|
||||
|
||||
# Beta branch
|
||||
bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)" _ -b beta
|
||||
```
|
||||
|
||||
### Environment Layout
|
||||
|
||||
- Virtual environment: `~/.seedpass/app/venv/`
|
||||
- Entry point: `~/.seedpass/app/src/main.py`
|
||||
|
||||
### Verification
|
||||
|
||||
```bash
|
||||
cd ~/.seedpass/app && source venv/bin/activate
|
||||
cd src && python main.py --version # Expected: SeedPass v[version]
|
||||
```
|
||||
|
||||
### Running SeedPass
|
||||
|
||||
```bash
|
||||
cd ~/.seedpass/app && source venv/bin/activate
|
||||
cd src && python main.py
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
1. Set up a virtual environment and install dependencies:
|
||||
|
10
README.md
10
README.md
@@ -123,9 +123,9 @@ See `docs/ARCHITECTURE.md` and [Nostr Setup](docs/nostr_setup.md) for details.
|
||||
### Quick Installer
|
||||
|
||||
Use the automated installer to download SeedPass and its dependencies in one step.
|
||||
The scripts can also install the BeeWare backend for your platform when requested (use `-IncludeGui` on Windows).
|
||||
The scripts can also install the BeeWare backend for your platform when requested (`--mode gui` or `--mode both` on Linux/macOS, `-IncludeGui` on Windows).
|
||||
If the GTK `gi` bindings are missing, the installer attempts to install the
|
||||
necessary system packages using `apt`, `yum`, `pacman`, or Homebrew.
|
||||
necessary system packages using `apt`, `yum`, `pacman`, or Homebrew. When no display server is detected, GUI components are skipped automatically.
|
||||
|
||||
**Linux and macOS:**
|
||||
```bash
|
||||
@@ -136,6 +136,10 @@ bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/
|
||||
bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)" _ -b beta
|
||||
```
|
||||
Make sure the command ends right after `-b beta` with **no trailing parenthesis**.
|
||||
*Install with GUI support:*
|
||||
```bash
|
||||
bash -c "$(curl -sSL https://raw.githubusercontent.com/PR0M3TH3AN/SeedPass/main/scripts/install.sh)" _ --mode gui
|
||||
```
|
||||
|
||||
**Windows (PowerShell):**
|
||||
```powershell
|
||||
@@ -152,7 +156,7 @@ The Windows installer will attempt to install Git automatically if it is not alr
|
||||
|
||||
#### Installer Dependency Checks
|
||||
|
||||
The installer verifies that core build tooling—C/C++ build tools, Rust, CMake, and the imaging/GTK libraries—are available before completing. Pass `--no-gui` to skip installing GUI packages. On Linux, ensure `xclip` or `wl-clipboard` is installed for clipboard support.
|
||||
The installer verifies that core build tooling—C/C++ build tools, Rust, CMake, and the imaging/GTK libraries—are available before completing. Use `--mode gui` to install only the graphical interface or `--mode both` to install both interfaces (default: `tui`). On Linux, ensure `xclip` or `wl-clipboard` is installed for clipboard support.
|
||||
|
||||
#### Windows Nostr Sync Troubleshooting
|
||||
|
||||
|
@@ -17,7 +17,8 @@ VENV_DIR="$INSTALL_DIR/venv"
|
||||
LAUNCHER_DIR="$HOME/.local/bin"
|
||||
LAUNCHER_PATH="$LAUNCHER_DIR/seedpass"
|
||||
BRANCH="main" # Default branch
|
||||
INSTALL_GUI=true
|
||||
MODE="tui"
|
||||
INSTALL_GUI=false
|
||||
|
||||
# --- Helper Functions ---
|
||||
print_info() { echo -e "\033[1;34m[INFO]\033[0m" "$1"; }
|
||||
@@ -59,9 +60,9 @@ install_dependencies() {
|
||||
fi
|
||||
}
|
||||
usage() {
|
||||
echo "Usage: $0 [-b | --branch <branch_name>] [--no-gui] [-h | --help]"
|
||||
echo "Usage: $0 [-b | --branch <branch_name>] [-m | --mode <tui|gui|both>] [-h | --help]"
|
||||
echo " -b, --branch Specify the git branch to install (default: main)"
|
||||
echo " --no-gui Skip graphical interface dependencies (default: include GUI)"
|
||||
echo " -m, --mode Installation mode: tui, gui, both (default: tui)"
|
||||
echo " -h, --help Display this help message"
|
||||
exit 0
|
||||
}
|
||||
@@ -82,9 +83,13 @@ main() {
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
--no-gui)
|
||||
INSTALL_GUI=false
|
||||
shift
|
||||
-m|--mode)
|
||||
if [ -n "$2" ]; then
|
||||
MODE="$2"
|
||||
shift 2
|
||||
else
|
||||
print_error "Error: --mode requires an argument (tui|gui|both)."
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
print_error "Unknown parameter passed: $1"; usage
|
||||
@@ -92,6 +97,26 @@ main() {
|
||||
esac
|
||||
done
|
||||
|
||||
case "$MODE" in
|
||||
tui|gui|both) ;;
|
||||
*)
|
||||
print_error "Invalid mode: $MODE. Use 'tui', 'gui', or 'both'."
|
||||
;;
|
||||
esac
|
||||
|
||||
DISPLAY_DETECTED=false
|
||||
if [ -n "${DISPLAY:-}" ] || [ -n "${WAYLAND_DISPLAY:-}" ]; then
|
||||
DISPLAY_DETECTED=true
|
||||
fi
|
||||
|
||||
if [[ "$MODE" == "gui" || "$MODE" == "both" ]]; then
|
||||
if [ "$DISPLAY_DETECTED" = true ]; then
|
||||
INSTALL_GUI=true
|
||||
else
|
||||
print_warning "No display detected. Skipping GUI installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# 1. Detect OS
|
||||
OS_NAME=$(uname -s)
|
||||
print_info "Installing SeedPass from branch: '$BRANCH'"
|
||||
|
Reference in New Issue
Block a user