A versatile command-line toolkit written in Go that provides utilities for whatever I occasionally need.
Decode JWT tokens without signature verification and display claims in a formatted JSON output.
Parse and display X.509 certificate information including subject, issuer, serial number, validity period, and DNS names. Supports both PEM-formatted certificates and raw certificate data.
OAuth 2.0 client credentials flow implementation with automatic token refresh and caching. Supports custom scopes and token endpoint configuration.
Migrate Maven artifacts between repositories with support for:
- Version filtering (min/max range)
- Multiple artifact types (JAR, POM, sources, javadoc)
- Dry-run mode for preview
- Authentication for both source and target repositories
- Batch migration of all versions
- Go 1.23.0 or later
- Make (optional, for building)
# Clone the repository
git clone <repository-url>
cd toolitka
# Build for current platform
go build -o toolitka *.go
# Or use Make to build for both Linux and Windows
make buildThe Makefile builds binaries for:
- Linux (AMD64):
out/toolitka - Windows (AMD64):
out/toolitka.exe
make deployThis copies the built binaries to:
- WSL/Linux:
~/.local/bin/toolitka - Windows:
C:\Users\<username>\AppData\Local\MyApps\toolitka.exe
toolitka -jwtdecode <token>Example:
toolitka -jwtdecode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...toolitka -x509 <certificate-pem>Example:
toolitka -x509 "-----BEGIN CERTIFICATE-----
MIIDXTCCAkWgAwIBAgIJAKZ...
-----END CERTIFICATE-----"Or with raw certificate data (PEM headers will be added automatically):
toolitka -x509 "MIIDXTCCAkWgAwIBAgIJAKZ..."toolitka -oidc -clientid <id> -secret <secret> -tokenUrl <url> [-scopes <scopes>] [-nodecode]Parameters:
-clientid: OAuth client ID (required)-secret: OAuth client secret (required)-tokenUrl: Token endpoint URL (required)-scopes: Comma-separated list of scopes (optional)-nodecode: Skip JWT decoding and return raw token (optional)
Example:
toolitka -oidc \
-clientid my-client \
-secret my-secret \
-tokenUrl https://idp.example.com/oauth/token \
-scopes "read,write"toolitka -maven \
-sourceUrl <url> \
-groupId <groupId> \
-artifactId <artifactId> \
[-sourceUser <username>] \
[-sourcePassword <password>] \
[-targetUrl <url>] \
[-targetUser <username>] \
[-targetPassword <password>] \
[-versionMin <version>] \
[-versionMax <version>] \
[-dryrun]Parameters:
-sourceUrl: Source Maven repository URL (required)-groupId: Maven artifact groupId (required)-artifactId: Maven artifact artifactId (required)-sourceUser: Source repository username (optional)-sourcePassword: Source repository password (optional)-targetUrl: Target Maven repository URL (required unless -dryrun)-targetUser: Target repository username (optional)-targetPassword: Target repository password (optional)-versionMin: Minimum version to migrate, inclusive (optional)-versionMax: Maximum version to migrate, inclusive (optional)-dryrun: Preview artifacts without downloading/uploading (optional)
Example - Dry Run:
toolitka -maven \
-sourceUrl https://repo1.maven.org/maven2 \
-groupId org.apache.commons \
-artifactId commons-lang3 \
-dryrunExample - Full Migration:
toolitka -maven \
-sourceUrl https://source-repo.example.com/maven2 \
-sourceUser myuser \
-sourcePassword mypass \
-targetUrl https://target-repo.example.com/maven2 \
-targetUser admin \
-targetPassword admin123 \
-groupId com.example \
-artifactId my-library \
-versionMin 1.0.0 \
-versionMax 2.0.0Migrated Artifacts: For each version, the tool attempts to migrate:
- Main JAR file (optional)
- POM file (required)
- Sources JAR (optional)
- Javadoc JAR (optional)
- github.com/golang-jwt/jwt/v5 - JWT parsing and validation
- golang.org/x/oauth2 - OAuth 2.0 client implementation
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit issues and pull requests.