Waypoint
dynamic YAML-driven URL shortener and command mapper with real-time config updates
Install / Use
/learn @NishantJoshi00/WaypointREADME
WayPoint
A fast, lightweight URL mapping and redirection system that dynamically manages URL shortcuts through YAML configuration files. Perfect for creating and managing custom URL shorteners for internal tools, documentation, or any web resources.
Features
- 🔗 Human-readable Shortcuts - Create memorable shortcuts for complex URLs
- 🌲 Hierarchical Organization - Support for nested URL structures through YAML
- 🔄 Real-time Updates - Configuration changes detected automatically without restart
- 🧩 Flexible Deployment - Use as a server or integrate with your shell
- 📊 Multiple Access Methods - Server mode for web access, CLI mode for shell integration
- 🐚 Shell Integration - Native support for zsh and fish shells
Installation
Prerequisites
- Go 1.22.4 or higher
- Make (optional, for using Makefile commands)
Build from Source
# Clone the repository
git clone https://github.com/NishantJoshi00/waypoint
cd waypoint
# Build the binaries
go build ./cmd/waypoint # Server component
go build ./cmd/wayshell # CLI component
Install System-wide
# Move binaries to system path
sudo mv waypoint /usr/local/bin/
sudo mv wayshell /usr/local/bin/
Usage
Server Mode (waypoint)
-
Create Configuration Files
# config.yaml host: localhost port: 8080 map_file: map.yaml refresh_interval: 5 # seconds# map.yaml github: profile: https://github.com/NishantJoshi00 docs: - https://docs.example.com -
Start the Server
CONFIG_FILE=config.yaml ./waypoint -
Access URLs
- Visit
http://localhost:8080/github/profile - Visit
http://localhost:8080/docs/0
- Visit
CLI Mode (wayshell)
-
Set up Configuration
# ~/.wayshell.yaml gs: git status gp: git push -
Use in Shell
# For ZSH source scripts/init.zsh /path/to/wayshell ~/.wayshell.yaml # For Fish source scripts/init.fish /path/to/wayshell ~/.wayshell.yaml -
Use Shortcuts
s/gs # Expands to 'git status' s/gp # Expands to 'git push'
Detailed Configuration
Server Configuration Options
| Option | Description | Default | |------------------|------------------------------------------------|-------------| | host | Hostname or IP to bind the server | localhost | | port | Port to listen on | 8080 | | map_file | Path to YAML file with URL mappings | map.yaml | | refresh_interval | Seconds between checking for config updates | 5 |
URL Mapping Structure
WayPoint supports a nested URL structure with up to 3 levels of depth:
# Simple key-value mapping
docs: https://docs.example.com
# Nested mapping
github:
profile: https://github.com/NishantJoshi00
repo: https://github.com/NishantJoshi00/waypoint
# Array mapping
tutorials:
- https://tutorial1.example.com
- https://tutorial2.example.com
Contributing Guidelines
- Issue First: Create or find an issue before starting work
- Issue Tags: Use descriptive tags:
- [BUG] for bug reports
- [FEATURE] for feature requests
- [DOCS] for documentation improvements
- Work Assignment: Don't work on issues already assigned to others
- Testing: Ensure all tests pass by running
make test - Code Style: Follow Go standard formatting guidelines
License
This project is licensed under the MIT License - see the LICENSE file for details.
<div align="center">
Built by Human, Documented by LLM.
</div>