/go/github: github from the Command Line

/go/github does three different jobs, chosen by the arguments you pass: Download mode: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Download a repository into an empty site directory and keep it synced
/go/github https://github.com/justmarkham/pandas-videos /home/example.com/www 1

# Update all repositories registered for sync (run this from cron)
/go/github

Options

Download mode

Argument Required Default Notes
<url> Yes — Format https://github.com/<owner>/<repo>. No trailing slash and no .git suffix.
<directory> Yes — Must already exist and be empty. Use the form /home/<domain>/www, because the domain is read from the third path segment.
<sync> No Empty (not synced) Pass 1 to include the repository in sync mode. Any other value means no sync.
--progress No Off Prints progress markers (15 and 100) for the panel’s progress bar.

Script mode

Argument Required Default Notes
<url> Yes — Format https://github.com/<owner>/<repo>.
<category> No Empty Written to the $Category line in script.txt.
--script Yes — Selects script mode.

Sync mode

None. Sync mode runs only when /go/github has no arguments.

Examples

# Download into the site's www folder and keep it synced
/go/github https://github.com/justmarkham/pandas-videos /home/example.com/www 1

# Download once, without sync, with progress markers
/go/github https://github.com/justmarkham/pandas-videos /home/example.com/www 0 --progress

# Sync all registered repositories
/go/github

# Package a repository for the script catalog, with a category
/go/github https://github.com/owner/repo "CMS" --script

# Run the sync every hour from cron
0 * * * * /go/github >/dev/null 2>&1

[!NOTE]
Without a token, GitHub allows only 60 API requests per hour per IP address. Each registered repository uses two requests per sync run, so keep the schedule infrequent if you sync many repositories.

Output

Download mode

Last Updated: 2026-11-18T10:22:31Z
Email: 12345+user@users.noreply.github.com
Github files (pandas-videos) downloaded successfully

Last Updated and Email come from the latest commit on GitHub. With --progress, the progress lines Download in progress, Please wait... and 15 are printed first, then a completion message and 100.

Sync mode

For each repository that has changed, one line:

Syncing https://github.com/justmarkham/pandas-videos -> /home/example.com/www

Nothing is printed for repositories that are up to date.

Script mode

The command prints the following lines and appends them to script.txt in the current directory. The printed copy has an empty $Category. The copy in script.txt uses the category you passed.

$ScriptName="owner/repo";
$ScriptFile="owner-repo";
$ScriptLanguage="English";
$ScriptVersion="1.2.3";
$Category="";
$Description="Repository description";
$URL="https://script.goadmio.com/owner-repo.tar.gz";
$GithubURL="https://github.com/owner/repo";
$Sql = "INSERT INTO Script (ScriptName,ScriptFile,ScriptLanguage,ScriptVersion,Category,Description,URL) VALUES ('$ScriptName','$ScriptFile','$ScriptLanguage','$ScriptVersion','$Category','$Description','$URL')";
SQL($Sql);

The archive owner-repo.tar.gz (lowercase) is created in the current directory.

Messages and exit status

Outcome What you get
Download completed The three lines above. Exit status 0.
Directory missing Directory <directory> not Exists. Nothing is changed.
Archive already exists (script mode) File <name>.tar.gz Already Exists. Nothing is changed.
Sync or script mode finished Exit status 1, even on success. Don’t use the exit status to detect errors.

Every run is logged to /var/log/go/github.log with a timestamp and the arguments used.

See the full reference at /go/github and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *