Skip to content

Ability to interact with remote fbsim types from CLI #41

@whatsacomputertho

Description

@whatsacomputertho

Overview

The CLI currently operates only on local types that it either resolves imperatively (through CLI arguments) or declaratively (through local files). Looking forward, I plan to implement a full-fledged REST API in fbsim-api (which currently is fairly minimal)

Once this is complete, I would like for the CLI to authenticate against the REST API as a user and interact with that user's leagues, games, etc. For example, today I might run

fbsim league season get -l league.json -y 2026

But in the future, I might update the -l property to support local and remote leagues

# Both of these should work
fbsim league season get -l league.json -y 2026
fbsim league season get -l https://whatsacomputertho.com/v1/leagues/:id -y 2026

I might also look to implement a login command to authenticate to the target fbsim API server. Not sure if this will look like the below (in which a user and pass are given) or whether this should operate against API keys, or both.

fbsim login -u <user> -p <pass> # Or drop -u / -p and go through secure interactive prompt

Acceptance

  • It is possible to read information from remote fbsim types via fbsim-cli (such as reading and interacting with leagues, streaming games, etc.)
  • It is possible to modify remote fbsim types via fbsim-cli (things like simulating league matchups, creating new leagues, etc.)

Metadata

Metadata

Labels

v1.0.0A feature to be shipped with the v1.0.0 release

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions