Improve install scripts: auto-add to PATH and clear command instructions

setup.py:
- Automatically adds lbry-downloader to PATH in .bashrc/.zshrc
- Shows clear 'QUICK START' section with numbered steps
- Explicitly states the command to run: 'lbry-downloader'
- Shows config and download locations
- Better formatting with emojis and sections

remote-install.sh:
- Instructs user to 'source ~/.bashrc' to reload shell
- Shows numbered next steps clearly
- Explains what to do if command not found
- Shows config file location

Users now get clear instructions:
1. Reload shell: source ~/.bashrc
2. Start daemon: lbrynet start
3. Test: lbry-downloader --dry-run
4. Download: lbry-downloader
This commit is contained in:
thePR0M3TH3AN committed 2026-03-15 21:04:36 -04:00
1 parent 3dcb4ddc2a
commit bcf1edca7b
2 files changed
+67 -36

No files matched your search

+19 -4
View File
@@ -109,9 +109,24 @@ echo "=========================================="
print_status "Installation complete!"
echo "=========================================="
echo ""
echo "You can now run LBRY Downloader:"
echo " cd $INSTALL_DIR && ./bin/lbry-downloader"
echo "🎉 Setup finished! The command 'lbry-downloader' has been added to your PATH."
echo ""
echo "Or add to your PATH:"
echo " echo 'export PATH=\"$INSTALL_DIR/bin:\$PATH\"' >> ~/.bashrc"
echo "📋 NEXT STEPS:"
echo ""
echo "1️⃣ Reload your shell (IMPORTANT):"
echo " source ~/.bashrc"
echo ""
echo "2️⃣ Start the LBRY daemon:"
echo " lbrynet start"
echo ""
echo "3️⃣ Test the downloader:"
echo " lbry-downloader --dry-run"
echo ""
echo "4️⃣ Download content:"
echo " lbry-downloader"
echo ""
echo "💡 If 'lbry-downloader' command not found after reload, use:"
echo " ~/Documents/LBRY-Downloader/bin/lbry-downloader"
echo ""
echo "📁 Config file: ~/Documents/lbry-downloads/config.yaml"
echo ""
+48 -32
View File
@@ -442,16 +442,26 @@ python main.py --dry-run "$@"
test_script.chmod(0o755)
print_success(f"Created test script: {test_script}")
# Check if we should add to PATH
# Automatically add to PATH and reload shell
shell_rc = Path.home() / ".bashrc"
if not shell_rc.exists():
shell_rc = Path.home() / ".zshrc"
if shell_rc.exists():
print_info(
f"To use 'lbry-downloader' from anywhere, add this to your {shell_rc.name}:"
)
print(f' export PATH="{bin_dir}:$PATH"')
# Check if already in PATH
path_line = f'export PATH="{bin_dir}:$PATH"'
try:
rc_content = shell_rc.read_text()
if str(bin_dir) not in rc_content:
with open(shell_rc, "a") as f:
f.write(f"\n# LBRY Downloader\n{path_line}\n")
print_success(f"Added to PATH in {shell_rc.name}")
else:
print_info(f"Already in PATH ({shell_rc.name})")
except Exception as e:
print_warning(f"Could not update {shell_rc.name}: {e}")
print_info(f"Add this line manually to {shell_rc.name}:")
print(f" {path_line}")
def run_setup() -> None:
@@ -542,40 +552,46 @@ def run_setup() -> None:
║ Setup Complete! ║
╚══════════════════════════════════════════════════════════════╝{Colors.END}
Next steps:
🎉 LBRY Downloader is ready to use!
1. Start the LBRY daemon:
lbrynet start
(If lbrynet is not installed, see LINUX_SETUP.md)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 QUICK START (Run these commands):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2. Test the configuration:
cd {install_dir}
./bin/lbry-test
Or run directly:
source venv/bin/activate
python main.py --dry-run
1️⃣ Start the LBRY daemon:
lbrynet start
3. Run the downloader:
./bin/lbry-downloader
Or:
python main.py
2️⃣ Test your configuration:
lbry-downloader --dry-run
Configuration file:
{config_path}
3️⃣ Download content:
lbry-downloader
To add more channels later, edit the config file:
nano {config_path}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ️ IMPORTANT NOTES:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Documentation:
- README.md - Project overview
- LINUX_SETUP.md - Detailed Linux setup
- QUICKSTART.md - Quick start guide
- config.yaml.example - Configuration examples
• Command to run: {Colors.BOLD}lbry-downloader{Colors.END}
• Config file: {config_path}
• Download location: {download_location}
Happy downloading!
If {Colors.BOLD}lbry-downloader{Colors.END} command not found, run:
source ~/.bashrc
If lbrynet is not installed, see LINUX_SETUP.md for installation.
To add more channels later:
nano {config_path}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 Documentation:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• README.md - Project overview
• LINUX_SETUP.md - Detailed Linux setup
• QUICKSTART.md - Quick reference
• config.yaml.example - More examples
Happy downloading! 🚀
""")