Skip to content

scandora/traefik-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traefik CLI

Traefik CLI is a lightweight command-line interface for interacting with a running Traefik instance over its HTTP API.
It supports listing routers, services, middlewares, and more, with output available in JSON or human-readable table formats.
Designed for self-hosters, DevOps engineers, and anyone who manages Traefik deployments.


Major Libraries Used

  • Typer — CLI building
  • Requests — HTTP API communication
  • Rich — Pretty printing tables and output

Installation

  1. Clone this repository:
git clone https://github.com/scandora/traefik-cli.git
cd traefik-cli
  1. Create a virtual environment and activate it:
python3 -m venv .venv
source .venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
pip install -e .

Usage

Make sure you have your Traefik API accessible (usually on port 8080 or 8081 depending on configuration).

You can pass the Traefik API URL at runtime:

traefik-cli --url http://localhost:8081 http list-routers

Or set the environment variable:

export TRAEFIK_API_URL=http://localhost:8081
traefik-cli http list-routers

Output Formats

You can choose between:

  • JSON (--output json)
  • Table (--output table)

Example:

traefik-cli --url http://localhost:8081 http list-routers --output table

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages