Skip to main content

Prerequisites

TheTeleporter Scripts are built with bash and designed to work on any Unix-like system (Linux, macOS, WSL).
You’ll need bash 4.0 or higher and standard Unix utilities. Most systems have these pre-installed.

Clone the repository

First, clone the scripts collection to your local machine:
git clone https://github.com/theteleporter/scripts.git ~/scripts
cd ~/scripts

Core dependencies

These tools are required for most scripts in the collection:

Bash 4.0+

Check your bash version:
bash --version
If you need to upgrade:
sudo apt update
sudo apt install bash

Standard utilities

Most scripts require these common Unix tools:
  • find - File searching
  • grep - Pattern matching
  • sed - Text processing
  • awk - Text manipulation
These are typically pre-installed on all Unix systems.

GDrive Ingest dependencies

The GDrive Ingest script requires additional tools for cloud operations and media processing.

Required dependencies

Install these core dependencies to use GDrive Ingest:
sudo apt update
sudo apt install bash curl jq ffmpeg
Dependency details:
  • bash - Script runtime (4.0+)
  • curl - HTTP requests and file downloads
  • jq - JSON parsing for Google Drive API responses
  • ffmpeg - Includes ffprobe for music metadata extraction and cover art

Optional: Telegram support

Only install these if you plan to download files from Telegram channels:
Telegram support is optional. Skip this section if you don’t need to download from Telegram.
1

Install Python 3.7+

sudo apt install python3 python3-pip
2

Install Telethon library

pip3 install telethon
Or install for your user only:
pip3 install --user telethon
3

Get Telegram API credentials

  1. Visit https://my.telegram.org
  2. Log in with your phone number
  3. Go to “API development tools”
  4. Create a new application to get your api_id and api_hash
Save these for the configuration step.

Make scripts executable

After installation, make the scripts executable:
# GDrive Ingest and utilities
chmod +x cloud/gdrive-ingest/gdrive_ingest.sh
chmod +x cloud/gdrive-ingest/setup_telegram.sh
chmod +x cloud/gdrive-ingest/cleanup_temp.sh

# System tools
chmod +x system/*.sh

# Templates
chmod +x templates/*.sh

Add to PATH (optional)

For easier access, add the scripts to your PATH:
echo 'export PATH="$HOME/scripts/cloud/gdrive-ingest:$PATH"' >> ~/.bashrc
echo 'export PATH="$HOME/scripts/system:$PATH"' >> ~/.bashrc
source ~/.bashrc
Now you can run scripts from anywhere:
gdrive_ingest.sh --help
power_guard.sh

Configuration

GDrive Ingest setup

The GDrive Ingest script requires Google Drive API credentials:
1

Create environment file

cd ~/scripts/cloud/gdrive-ingest
cp .env.example .env
2

Configure Google Drive API

Follow the detailed setup guide to:
  • Create a Google Cloud project
  • Enable the Drive API
  • Generate OAuth credentials
  • Get a refresh token
Add your credentials to .env:
.env
CLIENT_ID="your-client-id.apps.googleusercontent.com"
CLIENT_SECRET="GOCSPX-your-secret-key"
REFRESH_TOKEN="1//04your-refresh-token"
See the Google Drive setup guide for step-by-step instructions.
3

Configure Telegram (optional)

If you installed Telegram support, add your API credentials to .env:
.env
TELEGRAM_API_ID="12345678"
TELEGRAM_API_HASH="your-api-hash-here"
On first run, you’ll be prompted to enter your phone number and verification code.

Verify installation

Test that everything is installed correctly:

Check dependencies

# Check bash version (should be 4.0+)
bash --version

# Check core tools
which curl && curl --version
which jq && jq --version
which ffprobe && ffprobe -version

# Check optional tools (if installed)
which python3 && python3 --version
pip3 list | grep telethon

Test a script

cd ~/scripts/cloud/gdrive-ingest
./gdrive_ingest.sh --help
You should see the help message with usage instructions.
If you see “Missing credentials in .env file”, that’s expected before configuration. The script is working correctly.

Troubleshooting

”command not found: bash”

Bash is not installed or not in your PATH. Install it using your system’s package manager.

”curl: command not found”

Install curl:
sudo apt install curl

“jq: command not found”

Install jq:
sudo apt install jq

“ffprobe: command not found”

Install ffmpeg (which includes ffprobe):
sudo apt install ffmpeg

Permission denied

Make sure scripts are executable:
chmod +x cloud/gdrive-ingest/*.sh
chmod +x system/*.sh

Telethon installation fails

If pip3 install telethon fails, try:
# Update pip first
pip3 install --upgrade pip

# Then install telethon
pip3 install --user telethon

Next steps

Now that you’ve installed the dependencies, you’re ready to run your first script:

Quick start guide

Follow the quick start tutorial to upload your first file to Google Drive

Build docs developers (and LLMs) love