gogolf-cli

Crates.iogogolf-cli
lib.rsgogolf-cli
version0.0.1-rc-charlie
created_at2026-01-16 22:57:47.891892+00
updated_at2026-01-16 23:25:31.890253+00
descriptionCLI tool for interacting with the gogolf API
homepage
repository
max_upload_size
id2049445
size56,834
Sam Wild (SamW94)

documentation

README

gogolf-cli

⛳ Welcome to the code repository for gogolf's CLI tool! gogolf is a toy project I've created to demonstrate understanding of full-stack software development, DevOps and having a crazy high handicap. Having said that, I will hopefully get it up-and-running as a useable app at some point.

You're currently looking at the code for the CLI tool - that's the command line tool that is developed in parallel with the API which will hopefully at some point be able to:

  • create unique golfers in the gogolf database
  • add clubs to a golfer's bag and their yardages for that golfer
  • add courses to the gogolf database, including their course ratings, slope, yardages and total par.
  • calculate a golfer's handicap index, and their playing handicap for any course in the database
  • do any other things I can dream up as I mindlessly top balls down the driving range

🏌️ Related Repositories (More Coming Soon™)

🛺 What's in the box?

gogolf's CLI tool is written in Rust 🦀 - I just think it's cool. The asyncronous runtime used is tokio while the HTTP client stuff is handled by reqwest. A command reference can be found below.

🚩 How do I run it?

Pre-requisites

N.B. the source code currently isn't compiled and packaged neatly for you to install. It will be in future.

  • These instructions are for Linux/Unix/WSL. I'm not writing a Windows guide, and you can't make me.
  • You must have the Rust toolchain installed.
  • You can run the CLI indepdently from the API, but it's a bit pointless, so you should have the gogolf API running.

Using cargo run

  1. From the root of this repository, run cargo run which will compile the application and run it. If successful, you'll see something like this:

    ❯ cargo run
    Compiling gogolf-cli v0.0.1 (/home/sam/github.com/SamW94/gogolf-cli)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.76s
     Running `target/debug/gogolf-cli`
    Starting gogolf-cli...
    gogolf> 
    
  2. Run commands (see the reference below) to do cool stuff.

❓ Command Reference

Usage:

  • help: Displays this help message
  • golfer: Commands for creating/finding/updating and deleting golfers

help

Displays the help message on the command line, showing the above command reference.

gogolf> help
help - Displays this help message
golfer - Commands for creating/finding/updating and deleting golfers

golfer

Commands for creating/finding/updating and deleting golfers

gogolf> golfer
No arguments supplied with the 'golfer' command. The 'gogolf golfer' command takes the following arguments:
create - Creates a golfer in the gogolf database

golfer create [username] [email address]

Creates a golfer in the gogolf database. Prompts the user for a password before sending the HTTP request to the API.

gogolf> golfer create test test@email.com
Type a password:
Golfer created successfully!
Server response: {"id":"62f1e229-e633-48e7-991c-5b8f7e345d00","created_at":"2025-11-23T10:09:34.448123Z","updated_at":"2025-11-23T10:09:34.448123Z","email":"test@email.com","username":"test"}
Commit count: 0

cargo fmt