SkillAgentSearch skills...

Godex

godex is a cli file manager for searching , zipping ,cloud backup,versioning and so much more

Install / Use

/learn @inodinwetrust10/Godex
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

godex

godex is a powerful command-line file manager that simplifies file operations with features for searching, compression, cloud backup integration, and file versioning.

Features

  • File Search: Fast and flexible file search functionality
  • Compression Tools: Zip and unzip files with ease
  • Google Drive Backup: Seamless cloud backup integration
  • File Versioning: Create, list, compare, restore and remove file versions
  • Shell Completion: Built-in shell completion script generation

Quick Install

For a quick installation on Linux or macOS systems, you can use our install script:

# Download the install script
curl -O https://raw.githubusercontent.com/inodinwetrust10/godex/main/install.sh

# Make it executable
chmod +x install.sh

# Run the installer
./install.sh

The installer will:

  • Automatically detect your system architecture and OS
  • Download the latest release from GitHub
  • Install the binary to /usr/local/bin
  • Set up shell completion for bash, zsh, or fish
  • Create necessary config directories

The installation script features a user-friendly interface with progress tracking and colored output. If an existing installation is detected, the script will ask for confirmation before replacing it.

After installation, you can run godex --help to verify the installation was successful.

Build from Source

1️⃣ Install Go (1.21 or later)

Linux (Debian/Ubuntu)

sudo apt update
sudo apt install -y golang

Linux (Arch Linux)

sudo pacman -S go

macOS

brew install go

Verify the installation:

go version

2️⃣ Clone the Repository

git clone https://github.com/inodinwetrust10/godex
cd godex

3️⃣ Build the Binary

go build -o godex

This will generate an executable named godex in the same directory.

To install it system-wide, move it to /usr/local/bin:

sudo mv godex /usr/local/bin/

Now you can run:

godex --help

4️⃣ Cross-Compile for Different Systems

If you need to build for multiple platforms:

# Linux (x86_64)
GOOS=linux GOARCH=amd64 go build -o godex-linux

# macOS (x86_64)
GOOS=darwin GOARCH=amd64 go build -o godex-macos

# macOS (Apple Silicon - M1/M2)
GOOS=darwin GOARCH=arm64 go build -o godex-macos-arm

5️⃣ Install Dependencies (If Any)

If your project has missing dependencies, run:

go mod tidy

To fetch dependencies:

go get -u ./...

6️⃣ Running godex

Once built, run:

./godex

Or if installed system-wide:

godex

Usage

Command Structure

godex [flags]
godex [command]

Available Commands

  • search: Search files with various criteria
  • zip: Zip one or more files into a .zip archive
  • unzip: Unzip a .zip archive to a destination directory
  • backup: Backup file to Google Drive
  • version: File versioning operations
  • completion: Generate the autocompletion script for the specified shell
  • help: Help about any command

Global Flags

-h, --help      Help for godex
-t, --toggle    Help message for toggle
-v, --verbose   Enable verbose output

Search Command

Search for files in the specified root directory using various criteria including exact name match, file size range, and modification date range.

godex search [flags]

Search Flags

-h, --help                     Help for search
-M, --max-size int            Maximum file size in bytes
-m, --min-size int            Minimum file size in bytes
-a, --modified-after string   Find files modified after this date (YYYY-MM-DD)
-b, --modified-before string  Find files modified before this date (YYYY-MM-DD)
-n, --name string             Search by exact file name
-p, --path string             Root path for the search (default is current directory)

Search Examples

Search by exact filename:

godex search --name "document.pdf"

Search by file size range:

godex search --min-size 1000000 --max-size 5000000

Search by modification date:

godex search --modified-after "2024-01-01" --modified-before "2024-01-31"

Combined search:

godex search --path "/documents" --name "report.pdf" --modified-after "2024-01-01"

Zip Command

Zip one or more files into a .zip archive. The command accepts an output zip filename followed by one or more input files.

godex zip [output.zip] [files...]

Zip Flags

-d, --dir    Zipping directory
-h, --help   Help for zip

Zip Examples

Zip a single file:

godex zip archive.zip document.pdf

Zip multiple files:

godex zip documents.zip file1.txt file2.pdf file3.docx

Zip a directory:

godex zip project-backup.zip -d ./myproject/

Unzip Command

Unzip a .zip archive to a destination directory. The command requires an input zip file and a destination directory path.

godex unzip [input.zip] [destination]

Unzip Flags

-h, --help   Help for unzip

Unzip Examples

Unzip to current directory:

godex unzip archive.zip .

Unzip to specific directory:

godex unzip documents.zip ./extracted-files

Unzip to new directory:

godex unzip project-backup.zip ./project-restored

Version Command

The version command provides file versioning capabilities, allowing you to create, list, compare, restore, and remove versions of your files.

godex version [command]

Available Version Commands

  • create: Create a new version of a file
  • list: List all versions of a file
  • restore: Restore your file to a specific version
  • diff: Check differences between two files or between a file and its version
  • remove: Remove a specific version or all versions of a file

Create Command

Create a new version of a file with an optional commit message.

godex version create [filepath]
Create Flags
-m, --message string   Add a commit message (default "commit")
-h, --help            Help for create
Create Examples

Create a version with default commit message:

godex version create document.txt

Create a version with custom commit message:

godex version create document.txt -m "Added section 3"

List Command

List all versions of a file with their version IDs and commit messages.

godex version list [filepath]
List Flags
-h, --help   Help for list
List Examples
godex version list document.txt

Restore Command

Restore a file to a specific version using the version ID.

godex version restore [filepath] [versionID]
Restore Flags
-h, --help   Help for restore
Restore Examples
godex version restore document.txt v2

Diff Command

Check differences between two files or between a file and its last version.

godex version diff [filepath1] [filepath2]
Diff Flags
-d, --default   Compare with the last version
-h, --help      Help for diff
Diff Examples

Compare two specific files:

godex version diff document-v1.txt document-v2.txt

Compare a file with its last version:

godex version diff document.txt -d

Remove Command

Remove a specific version or all versions of a file.

godex version remove [filepath]
Remove Flags
-v, --version string   Remove a specific version
-h, --help            Help for remove
Remove Examples

Remove a specific version:

godex version remove document.txt -v v2

Remove all versions:

godex version remove document.txt

Backup Command

Backup a file to Google Drive. The command requires a file path to backup.

godex backup [file]

Backup Flags

-h, --help   Help for backup

Backup Examples

Backup a single file:

godex backup important-document.pdf

Google Drive Setup

Before using the backup command:

  1. Set up Google Cloud Project:

    • Create a project in Google Cloud Console
    • Enable Google Drive API
    • Create credentials (OAuth 2.0 Client ID (Desktop app))
    • Download the client configuration file and rename it credentials.json and place it in ~/.config/godex
  2. First-time configuration:

    • Run any backup command
    • Follow the authentication flow in your browser
    • Grant necessary permissions to godex
    • It will show cannot connect to the browser
    • Copy the the url -- http://localhost/?state=state-token&code=4/0IudJceGNktoKZlk-0K-_X_aCsib7868786pJzH71tR-mjyYEJy__MFw&scope=https://www.googleapis.com/auth/drive.file
    • Copy the code in between &code=xxxxxxxxxxxx&scope the xxxx will be your code
    • Paste it in the terminal

Configuration

  1. For Google Drive integration:
    • Create a Google Cloud project
    • Enable Google Drive API
    • Download credentials file
    • Configure your Google Drive settings

Dependencies

  • Go 1.16+ (for building from source)
  • Git (for building from source)

Autocompletion

The installation script automatically sets up shell completion for bash, zsh, and fish. If you need to manually set it up, you can use the following instructions.

Usage

godex completion [command]

Available Commands

  • bash Generate the autocompletion script for Bash
  • fish Generate the autocompletion script for Fish
  • powershell Generate the autocompletion script for PowerShell
  • zsh Generate the autocompletion script for Zsh

Flags

-h, --help   help for completion

Manual Installation

To enable autocompletion for your shell, run the appropriate command below:

Bash

echo 'source <(godex completion bash)' >> ~/.bashrc
source ~/.bashrc

Zsh

echo 'source <(godex completion zsh)' >> ~/.zshrc
source ~/.zshrc

Related Skills

View on GitHub
GitHub Stars32
CategoryDevelopment
Updated9mo ago
Forks0

Languages

Go

Security Score

82/100

Audited on Jun 17, 2025

No findings