flavorcli 0.1.0-beta.1

A command line interface to interact with FlavorTown
flavorcli-0.1.0-beta.1 is not a library.

FlavorCLI

Made with Rust Licence Tracked on Hackatime Commit activity Last Commit Rust compile rust-clippy analyze

[!CAUTION] FlavorCLI only kinda works as of right now. I'm still working on writing some more commands and am still waiting on some more API routes to be added. Right now there's only read routes available.

FlavorCLI is a fully-featured implementation of the Flavortown API, allowing for easier and streamlined interaction with HackClub's Flavortown.

Installation

Prebuilt (Recommended)

At some point, FlavorCLI will be available on all[^1] major package managers. Right now, you can follow the instructions on the releases page to download and install the program. [^1]: What that constitutes is unknown to me, I'll figure it out when it's timeā„¢

Build it yourself

  1. Download the source code or git clone the repo[^2]
  2. Download and install rust if it is not already installed
  3. Run cargo build -r
  4. Run cargo install --path .
  5. Ensure you have your cargo's install directory (usually ~/.cargo/bin) in PATH
  6. Profit! [^2]: What you do is up to you, just get a copy of the code

Usage

Get your API key

  1. To get your Flavortown API key, go to https://flavortown.hackclub.com/kitchen and do all the things to get yourself signed in.
  2. Click the gear icon in the toolbar to open your settings

An image with a bunch of arrows pointing to a gear icon that you can find in the sidebar on the flavortown website where you see your nameplate.

  1. Copy your API Key

An image of the settings modal, the section you're looking for (The API key section btw) is at the bottom. That should be enough to help you find it, right?

  1. Get your User ID. Either hover over the link, and note down the number that shows, or click on the link and note the number in the URL bar. An image pointing to your name in the sidebar.

  2. Run ft auth set <USER_ID> <TOKEN>[^3] [^3]: You can use ft auth delete at any time to delete your API Key. Your API Key is stored on device with your device's keychain. If you want to set auth for each command, add the --auth <APIKEY> flag

Using the commands

Uhm, just use ft --help ig. (TODO: write proper guides on how to use the commands that definitely exist)

Features

  • Stores and verifies your API Key in your OS' keychain when using ft auth set <USER_ID> <TOKEN>.
  • Get and list projects
  • Get and list devlogs
  • Get and list store items
  • Get and list users

Planned Features

  • Actually have commands
  • Make those commands reflect what can be done with the API, add more
  • Authorization with Flavortown.
  • API Key storage with keychain.
  • Actually handle the commands lol.
  • API Implementation
  • The rest is dependant on what additions are made to the API
  • Also a few flags are planned, i've marked them in comments and cannot be bothered to write them here haha