Skip to content

52617365/goute

Repository files navigation

goute

A Go-based CLI tool that provides enhanced versions of Linux networking commands with better visualization and testing capabilities.

Features

  • Enhanced Route Management: Improved ip route commands with tree visualization and efficient route lookup
  • Network Interface Display: Enhanced ip link commands with hierarchical display options
  • Tree Visualization: Hierarchical display of routes and network interfaces
  • Cross-Platform: Builds for Linux and Darwin (macOS)

Installation

Build from Source

git clone https://github.com/your-username/goute.git
cd goute
make build

The binary will be available in the bin/ directory.

Usage

Route Commands

# Show routing table
goute ip route show

# Show routing table in tree format
goute ip route show --tree

# Find route for specific IP
goute ip route get 8.8.8.8

Link Commands

# Show network interfaces
goute ip link show

# Show network interfaces in tree format
goute ip link show --tree

Global Options

  • --tree: Display output in hierarchical tree format
  • -o <format>: Output format (available for some commands)

Development

Prerequisites

  • Go 1.21 or later
  • Make

Project Structure

goute/
├── cmd/                 # Command definitions (Cobra CLI)
│   ├── ip/
│   │   ├── route/      # Route command implementations
│   │   └── link/       # Link command implementations
├── internal/
│   ├── commands/       # Command execution abstraction
│   ├── route/          # Route parsing and management
│   ├── link/           # Link parsing and management
│   └── errors/         # Custom error types
├── testing/            # Test data files
└── bin/               # Built binaries

Key Features

  • Command Abstraction: Swappable command runners for testing vs. production
  • Efficient Route Lookup: Trie data structure for fast route resolution
  • Rich Parsing: Handles complex route attributes (scope, protocol, metrics)
  • Quality Assurance: Comprehensive linting, security scanning, and testing

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run quality checks with make check
  5. Submit a pull request

Architecture

The CLI uses the Cobra framework with a hierarchical command structure:

  • goute (root command)
    • ip (IP utilities)
      • route (routing table commands)
        • show/list - Display routing tables
        • get <ip> - Find route for specific IP
      • link (network interface commands)
        • show/list - Display network interfaces

The tool enhances standard Linux networking commands with improved visualization and better data organization.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors