Skip to content

Implement funURL – A Swiss Army Knife for URLs #1

Description

@dogancanbakir

funURL is a command-line tool designed as a Swiss Army knife for URL. It takes a URL as input (via stdin, command-line flags, or arguments) and provides a range of operations for parsing, validation, modification, encoding/decoding, and handling URLs efficiently.

Planned Features

  • Parsing: Extract protocol, domain, path, query parameters, and fragments.
    • Validation: Check if a URL is properly formed.
  • Modification: Add, remove, or update query parameters, change protocols, or modify paths.
  • Encoding/Decoding: URL-encode and decode strings.
  • Extraction: Get the hostname, subdomains, or TLD.

Usage Examples

echo "https://example.com/foo?bar=baz" | funURL --get-query
# Output: bar=baz

funURL "https://example.com/foo/bar" --replace-path "/new/path"
# Output: https://example.com/new/path

funURL "https://example.com?foo=1&bar=2" --remove-param "bar"
# Output: https://example.com?foo=1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions