mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Update installer scripts and docs for Typer CLI
This commit is contained in:
19
README.md
19
README.md
@@ -152,6 +152,7 @@ When upgrading pip, use `python -m pip` inside the virtual environment so that p
|
|||||||
```bash
|
```bash
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install -r src/requirements.txt
|
python -m pip install -r src/requirements.txt
|
||||||
|
python -m pip install -e .
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Linux Clipboard Support
|
#### Linux Clipboard Support
|
||||||
@@ -166,8 +167,14 @@ sudo apt-get install xclip
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
After installing dependencies and activating your virtual environment, launch
|
After installing dependencies and activating your virtual environment, install
|
||||||
SeedPass and create a backup:
|
the package in editable mode so the `seedpass` command is available:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then launch SeedPass and create a backup:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start the application
|
# Start the application
|
||||||
@@ -219,7 +226,13 @@ The encrypted index file `seedpass_entries_db.json.enc` begins with `schema_vers
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
After successfully installing the dependencies, you can run SeedPass using the following command:
|
After successfully installing the dependencies, install the package with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
Once installed, you can run SeedPass using the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python src/main.py
|
python src/main.py
|
||||||
|
@@ -150,6 +150,7 @@ When upgrading pip, use `python -m pip` inside the virtual environment so that p
|
|||||||
```bash
|
```bash
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install -r src/requirements.txt
|
python -m pip install -r src/requirements.txt
|
||||||
|
python -m pip install -e .
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Linux Clipboard Support
|
#### Linux Clipboard Support
|
||||||
@@ -164,8 +165,9 @@ sudo apt-get install xclip
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
After installing dependencies and activating your virtual environment, launch
|
After installing dependencies, activate your virtual environment and install
|
||||||
SeedPass and create a backup:
|
the package so the `seedpass` command is available, then launch SeedPass and
|
||||||
|
create a backup:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start the application
|
# Start the application
|
||||||
@@ -223,7 +225,8 @@ After successfully installing the dependencies, you can run SeedPass using the f
|
|||||||
python src/main.py
|
python src/main.py
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use the new Typer-based CLI:
|
You can also use the Typer-based command line interface once the
|
||||||
|
package is installed:
|
||||||
```bash
|
```bash
|
||||||
seedpass --help
|
seedpass --help
|
||||||
```
|
```
|
||||||
|
@@ -255,6 +255,11 @@ if ($LASTEXITCODE -ne 0) {
|
|||||||
Write-Error "Dependency installation failed."
|
Write-Error "Dependency installation failed."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& "$VenvDir\Scripts\python.exe" -m pip install -e .
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "Failed to install SeedPass package"
|
||||||
|
}
|
||||||
|
|
||||||
# 5. Create launcher script
|
# 5. Create launcher script
|
||||||
Write-Info "Creating launcher script..."
|
Write-Info "Creating launcher script..."
|
||||||
if (-not (Test-Path $LauncherDir)) { New-Item -ItemType Directory -Path $LauncherDir | Out-Null }
|
if (-not (Test-Path $LauncherDir)) { New-Item -ItemType Directory -Path $LauncherDir | Out-Null }
|
||||||
@@ -263,7 +268,7 @@ $LauncherContent = @"
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal
|
setlocal
|
||||||
call "%~dp0..\venv\Scripts\activate.bat"
|
call "%~dp0..\venv\Scripts\activate.bat"
|
||||||
python "%~dp0..\src\main.py" %*
|
"%~dp0..\venv\Scripts\python.exe" -m seedpass.cli %*
|
||||||
endlocal
|
endlocal
|
||||||
"@
|
"@
|
||||||
Set-Content -Path $LauncherPath -Value $LauncherContent -Force
|
Set-Content -Path $LauncherPath -Value $LauncherContent -Force
|
||||||
|
@@ -119,6 +119,7 @@ main() {
|
|||||||
print_info "Installing/updating Python dependencies from src/requirements.txt..."
|
print_info "Installing/updating Python dependencies from src/requirements.txt..."
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
pip install -r src/requirements.txt
|
pip install -r src/requirements.txt
|
||||||
|
pip install -e .
|
||||||
deactivate
|
deactivate
|
||||||
|
|
||||||
# 7. Create launcher script
|
# 7. Create launcher script
|
||||||
@@ -127,7 +128,7 @@ main() {
|
|||||||
cat > "$LAUNCHER_PATH" << EOF2
|
cat > "$LAUNCHER_PATH" << EOF2
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source "$VENV_DIR/bin/activate"
|
source "$VENV_DIR/bin/activate"
|
||||||
exec python3 "$INSTALL_DIR/src/main.py" "\$@"
|
exec "$VENV_DIR/bin/python" -m seedpass.cli "\$@"
|
||||||
EOF2
|
EOF2
|
||||||
chmod +x "$LAUNCHER_PATH"
|
chmod +x "$LAUNCHER_PATH"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user