Skip to main content

quicktools

A practical Python CLI toolkit for developers — file, text, time, network, and data utilities at your fingertips.

Installation

pip install quicktools

Or from source:

git clone https://github.com/quicktools/quicktools.git
cd quicktools
pip install -e .

Quick Start

quicktools --help
quicktools file --help
quicktools text --help
quicktools time --help
quicktools network --help
quicktools data --help

Modules

1. File Tools (quicktools file)

Command Description
rename Batch rename files with find/replace or regex
search Search and replace text across files
split Split large files by lines or size
encoding Convert file encoding (UTF-8, GBK, etc.)

Examples:

# Batch rename: replace "old" with "new" in all .txt files
quicktools file rename "*.txt" --find "old" --replace "new"

# Regex rename: add prefix
quicktools file rename "*.jpg" --find "^(.*)$" --replace "photo_\1" --regex --dry-run

# Search and replace in Python files
quicktools file search "src/**/*.py" --find "deprecated_func" --replace "new_func"

# Split a 10GB log file into 100MB chunks
quicktools file split bigfile.log --size 100M --output-dir ./chunks/

# Convert GBK to UTF-8
quicktools file encoding data.csv --from gbk --to utf-8 --output data_utf8.csv

2. Text Tools (quicktools text)

Command Description
json Format or validate JSON
base64 Base64 encode/decode
regex Test regular expressions
stats Text statistics (chars, words, lines)

Examples:

# Format JSON from file
quicktools text json data.json --indent 4 --sort-keys

# Validate JSON from stdin
cat response.json | quicktools text json - --validate

# Base64 encode
quicktools text base64 encode "Hello World"

# Base64 decode
echo "SGVsbG8gV29ybGQ=" | quicktools text base64 decode -

# Test regex
quicktools text regex "\d{4}-\d{2}-\d{2}" "Date: 2024-01-15"

# Text statistics
quicktools text stats README.md

3. Time Tools (quicktools time)

Command Description
ts Convert between timestamp and datetime
calc Date calculations (add/subtract days, diff)
tz Timezone conversion
now Show current time

Examples:

# Convert timestamp to datetime
quicktools time ts 1704067200

# Convert datetime to timestamp
quicktools time ts "2024-01-01 00:00:00"

# Current timestamp
quicktools time ts

# Add 30 days to a date
quicktools time calc 2024-01-01 --add 30

# Days between two dates
quicktools time calc 2024-01-01 --diff 2024-12-31

# Convert UTC to Asia/Shanghai
quicktools time tz "2024-01-01 12:00" --from UTC --to Asia/Shanghai

# Current time in UTC
quicktools time now --utc

4. Network Tools (quicktools network)

Command Description
url URL encode/decode
portscan TCP port scanner
http Quick HTTP request test

Examples:

# URL encode
quicktools network url encode "hello world & more"

# URL decode
quicktools network url decode "hello%20world%20%26%20more"

# Scan common ports
quicktools network portscan example.com

# Scan specific ports
quicktools network portscan 192.168.1.1 --ports 80,443,3000-4000

# HTTP GET request
quicktools network http https://httpbin.org/json

# HTTP POST with data
quicktools network http https://httpbin.org/post --method POST --data '{"key":"value"}' -H "Content-Type:application/json"

5. Data Tools (quicktools data)

Command Description
convert Convert between CSV and JSON
dedup Remove duplicate lines
generate Generate random test data

Examples:

# CSV to JSON
quicktools data convert data.csv --to json --output data.json

# JSON to CSV
quicktools data convert data.json --to csv --output data.csv

# Remove duplicate lines
quicktools data dedup logs.txt --output clean.txt

# Generate random CSV
quicktools data generate csv --count 100 --columns "id,name,email,age,city"

# Generate random JSON
quicktools data generate json --count 50

# Generate random names
quicktools data generate names --count 20

# Generate random numbers
quicktools data generate numbers --count 100

# Generate random dates
quicktools data generate dates --count 30

Requirements

  • Python 3.8+

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

License

MIT

Release files for quicktoolbelt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quicktoolbelt 0.1.0
File Size Uploaded
quicktoolbelt-0.1.0.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quicktoolbelt 0.1.0
File Interpreter ABI Platform
quicktoolbelt-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / quicktoolbelt-0.1.0.tar.gz

Download URL quicktoolbelt-0.1.0.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
170e72db31695eee8edcb61a8b4ba0f053f4f2ab02412fd075b5474f08364e41
BLAKE2b-256 checksum
How to use checksums
583969dfbb3fcf44aa740ab525cb7fd0d0f0d26141881d972df5562532aed4b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / quicktoolbelt-0.1.0-py3-none-any.whl

Download URL quicktoolbelt-0.1.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c9f51d66d77e10564a0f04e42e4598793403db3264070591efd176dc79f377d
BLAKE2b-256 checksum
How to use checksums
478a1f4906aed2eccf8df4cf026435f87a62e0c9b114c3b42572f96f845b14c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page