Skip to content

This CLI allows to fetch ready to use raw text files for LLMs

License

Notifications You must be signed in to change notification settings

Davis-3450/context7-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uv-cli-template

A modern template for creating installable CLI tools with Python using UV package manager.

This provides with some basic structure, tools and conventions to get you started.

It also works as a cheat-sheet!

Features

  • 🚀 Modern Python packaging with UV
  • 🎯 Multiple CLI framework examples (Typer, Click, Fire, etc.)
  • [] 🔍 Code quality with ruff and pre-commit
  • 📦 Ready-to-install package structure
  • 🔧 Development tools configured

Quick Start

we will often refer to the app as uv-cli-template change it to your own name.

click use this template to create a new repo.

  1. Customize your project:

    • Change name in pyproject.toml to your CLI tool name
    • Update the package name in src/ directory (optional)
  2. Install dependencies:

    uv sync
  3. Develop!

  4. Install your CLI tool locally:

    uv tool install .
    uv uninstall your-cli-name # remove the tool

Development

# Install with development dependencies
uv sync --group dev

CLI Framework Examples

The template includes examples for popular CLI frameworks in src/package/main.py:

  • Typer (recommended) - Modern, intuitive CLI framework
  • Click - Composable command line toolkit
  • Argparse - Built-in argument parser
  • Fire - Generate CLIs automatically
  • Rich - Rich text and beautiful formatting
  • Docopt - Command-line interface from docstrings

Choose one and uncomment the relevant code block, links to the docs are provided.

Configuration

Update pyproject.toml:

[project]
name = "your-cli-name"  # Change this to your name
# ... other settings

[project.scripts]
your-cli-name = "package.main:app"  # Change entry point

To-Dos

  • [] Build system
  • [] Tests
  • [] Dev tools
  • [] Pre-commit hooks
  • [] PyPI publishing
  • [] Linting and formatting

Resources

Contributing

Contributions are welcome! Please feel free to submit a pull request :3

About

This CLI allows to fetch ready to use raw text files for LLMs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages