Get from zero to analyzing neural data with Spyglass in just a few commands.
If you received database credentials from your lab admin, this is you! The installer will:
- Set up your development environment
- Connect you to your lab's existing database
- Prompt you to change your temporary password
- Configure all necessary directories
Time: ~5 minutes | Database: Connect to lab's existing database
Want to explore Spyglass features without joining a lab? The installer can:
- Set up a local trial database using Docker
- Create an isolated test environment
- Let you experiment with sample data
Time: ~10 minutes | Database: Local Docker container (requires Docker Desktop)
- Python: Version 3.10 or higher
- Disk Space: ~10GB for installation + data storage
- Operating System: macOS or Linux (Windows experimental)
- Package Manager: conda (23.10.0+ recommended) or mamba
If you don't have mamba/conda, install miniforge first.
# Clone the repository
git clone https://github.com/LorenFrankLab/spyglass.git
cd spyglass
# Run interactive installer
python scripts/install.pyThe installer will prompt you to choose:
- Installation type: Minimal (recommended) or Full
- Database setup:
- Remote (recommended for lab members) - Connect to lab's existing database
- Docker - Local trial database for testing
- Skip - Configure manually later
If joining a lab, you'll be prompted to change your password during installation.
# Activate the environment
conda activate spyglass
# Run validation
python scripts/validate.pyThat's it! Setup complete in ~5-10 minutes.
cd notebooks
jupyter notebook 01_Concepts.ipynb- Place NWB files in your configured
rawdirectory (default:$SPYGLASS_BASE_DIR/raw/) - See Data Import Guide for details
-
Documentation: lorenfranklab.github.io/spyglass
-
Discussions: GitHub Discussions
-
Report Issues: GitHub Issues
Need something different? The installer supports these options:
python scripts/install.py --minimal # Core dependencies only (~5 min)
python scripts/install.py --full # All optional dependencies (~15 min)
python scripts/install.py --docker # Set up local Docker database
python scripts/install.py --remote # Connect to existing database
python scripts/install.py --env-name myenv # Custom conda environment name
python scripts/install.py --help # See all optionsThe installer creates:
- Conda environment with Spyglass and core dependencies
- Database connection (remote lab database OR local Docker container)
- Data directories in
~/spyglass_data/ - Jupyter environment for running tutorials
# Remove environment and retry
conda env remove -n spyglass
python scripts/install.py- Check error messages for specific issues
- If using Docker database, ensure Docker Desktop is running
- If database connection fails, verify credentials with your lab admin
- Skip database setup and configure later: choose "Skip" when prompted
- Check Advanced Setup Guide for manual installation
- Ask questions in GitHub Discussions
If you're setting up Spyglass for your lab, you can pre-configure lab-wide settings so new members don't need to enter them manually.
| Setting | Lab-Wide | User-Specific |
|---|---|---|
| Database host | ✅ | |
| Database port | ✅ | |
| Base data directory | ✅ | |
| Kachery zone | ✅ | |
| Database username | ✅ | |
| Database password | ✅ |
Add to your shared machine's profile (e.g., /etc/profile.d/spyglass.sh):
# Lab-wide Spyglass configuration
export SPYGLASS_BASE_DIR="/your/lab/shared/data"New members run the installer and only need to enter their credentials:
python scripts/install.py --remote \
--db-host your-db-server.edu \
--db-user $USER
# Password prompted securelyCreate a wrapper script for your lab. See scripts/setup_franklab.sh for an
example that pre-configures Frank Lab settings.
# For Frank Lab members:
./scripts/setup_franklab.sh- SSH to your shared server
- Clone the repository:
git clone https://github.com/LorenFrankLab/spyglass.git - Run the installer (or your lab's setup script)
- Enter their database username and temporary password
- Change their password when prompted
Next tutorial: 01_Concepts.ipynb Full documentation: lorenfranklab.github.io/spyglass