A beautiful CLI application for managing Firebase users with a modern terminal interface.
- π Search Users: Search by name or email
- π View All Users: Display all users in a formatted table
- π Reset Passwords: Update user passwords securely
- π€ Update Names: Change user display names
- π¨ Beautiful UI: Modern terminal interface with colors and formatting
- β‘ Fast Loading: Efficient user loading and caching
The easiest way to get started is using our setup script:
# Clone the repository
git clone <your-repo-url>
cd firebase_auth_python_console
# Run the setup script (handles everything automatically)
./setup.sh
The setup script will:
- β Check Python version compatibility
- β Create and activate virtual environment
- β Install all dependencies (fixes externally-managed-environment error)
- β Guide you through Firebase configuration
- β Validate your Firebase admin key
- β Launch the application
If you prefer manual setup:
git clone <your-repo-url>
cd firebase_auth_python_console
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Create a config directory for your Firebase admin key
mkdir config
# Move your Firebase admin JSON file to the config directory
mv your-firebase-admin-key.json config/firebase-admin-key.json
python app.py config/firebase-admin-key.json
- Clone or download this repository
- Install dependencies:
pip install -r requirements.txt
-
Get Firebase Admin Key:
- Go to your Firebase Console
- Navigate to Project Settings > Service Accounts
- Click "Generate new private key"
- Download the JSON file
-
Run the Application:
python app.py path/to/your/firebase-admin-key.json
python app.py ./firebase-admin-key.json
- π Search Users - Search users by name or email
- π Refresh Users - Reload all users from Firebase
- ποΈ View User Details - View detailed user info with full UID display
- π Update User Password - Reset a user's password
- π€ Update User Display Name - Change a user's display name
- π§ͺ Generate Tokens - Generate custom tokens or test login
- π Show All Users - Display all users in a table
- β Exit - Close the application
- Full UID Display: UIDs are shown completely without truncation
- Easy Selection: UIDs are displayed in bold cyan for easy identification
- Copy Instructions: Detailed view includes copy instructions
- Table Selection: You can select and copy UIDs directly from the user table
- Custom Token Generation: Generate Firebase custom tokens using Admin SDK (no API key needed)
- Password Login Testing: Test user authentication with email/password (requires Web API key)
- Token Display: View and copy both custom tokens and ID tokens
- Multiple Methods: Choose between Admin SDK or REST API approaches
- Error Handling: Clear error messages for failed token generation
- User Verification: Shows user details before token generation
- Start the app with your Firebase admin JSON
- The app will automatically load all users
- Use the search function to find specific users
- Select a user by UID to update their information
- Confirm changes before applying them
- Python 3.7+
- Firebase project with Authentication enabled
- Firebase Admin SDK service account key
firebase-admin
- Firebase Admin SDKrich
- Beautiful terminal formattingclick
- Command line interfacecolorama
- Cross-platform colored terminal text
firebase_auth_python_console/
βββ app.py # Main application entry point
βββ firebase_service.py # Firebase service layer
βββ cli_interface.py # Terminal UI interface
βββ example.py # Example usage script
βββ setup.sh # Automated setup script
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ .gitignore # Git ignore rules
βββ assets/ # Screenshots and images
β βββ screenshot_3x_postspark_2025-09-20_21-58-18.png
βββ venv/ # Virtual environment (created by setup.sh)
βββ config/ # Configuration folder (ignored by Git)
βββ firebase-admin-key.json # Your Firebase admin key
- Keep your Firebase admin JSON file secure
- Never commit the admin JSON file to version control
- The application handles password input securely (hidden input)
- The
config/
folder is automatically ignored by Git
The setup.sh
script provides several options:
# Show help
./setup.sh --help
# Only setup environment, don't run the app
./setup.sh --setup-only
# Skip setup and run the app directly (if already set up)
./setup.sh --run-only
# Force recreate virtual environment
./setup.sh --recreate-venv
Externally-managed-environment Error:
- β Fixed automatically by the setup script using virtual environments
- The script creates an isolated Python environment to avoid system conflicts
Missing Dependencies:
- β Handled automatically by the setup script
- All required packages are installed in the virtual environment
Firebase Configuration:
- β Guided setup - the script will prompt you for your Firebase admin key
- β Validation - checks that your key file is valid JSON with required fields
This project is already initialized as a Git repository. Here's how to set it up:
# The repository is already initialized
git status
# Add all files (config folder will be ignored)
git add .
# Commit your changes
git commit -m "Initial commit: Firebase Admin Console"
# Add your remote repository
git remote add origin <your-repo-url>
# Push to remote
git push -u origin main
- The
config/
folder is automatically ignored by Git - Firebase admin JSON files are ignored for security
- Python cache files and virtual environments are ignored
- IDE and OS-specific files are ignored
This project is open source and available under the MIT License.