Skip to content

feat(cli): add proof-of-concept command-line interface - #58

Draft
AlexanderLanin wants to merge 1 commit into
deviffyy:mainfrom
AlexanderLanin:cli-poc
Draft

feat(cli): add proof-of-concept command-line interface#58
AlexanderLanin wants to merge 1 commit into
deviffyy:mainfrom
AlexanderLanin:cli-poc

Conversation

@AlexanderLanin

Copy link
Copy Markdown

Summary

This draft PR adds a small command-line entry point to the existing OpenQuota Tauri binary.

Note: This draft PR originated accidentally while exploring the question, “Can this tool be extended with a CLI?” It is intentionally kept as a proof of concept for discussion and is not presented as production-ready.

The current POC supports:

  • openquota status to refresh and display enabled providers;
  • openquota status --cached to display cached values without refreshing;
  • openquota status --provider <id> to target one known provider;
  • --json output for status and provider listings;
  • openquota providers, --help, --version, and meaningful exit codes.

The implementation reuses the existing provider registry, settings, storage, credentials, and refresh service. When CLI arguments are present, the GUI startup path is skipped. This is related to #57.

The POC has the following limitations:

  • The CLI is embedded in the Tauri desktop executable; it is not a separate lightweight CLI binary.
  • No dedicated release artifact, installer integration, or PATH integration has been added. This does not yet establish an apt-free or dependency-free Linux CLI experience.
  • The default status command only refreshes providers that are already enabled in OpenQuota settings. It does not run the desktop startup credential-detection flow.
  • There are no configuration, authentication, watch, or other management commands yet.
  • The --json output currently serializes the internal usage view state and should not be considered a stable versioned API.
  • Cross-platform release behavior, especially Windows console output and Linux runtime dependencies, has not been validated.

Verification

  • git diff --check passed.
  • Added unit tests for CLI argument parsing, including status options and invalid arguments.
  • Not run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check and Rust tests; cargo is not installed in the creation environment.
  • Not run: corepack pnpm verify.
  • No platform-specific release binaries or installers were tested.

Checklist

  • This pull request is focused on one change.
  • I added or updated tests where behavior changed.
  • I ran the relevant checks, including corepack pnpm verify when possible.
  • I did not include credentials, personal data, build output, or unrelated changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant