Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CLI): add command line client interface #270

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

ShadowApex
Copy link
Contributor

@ShadowApex ShadowApex commented Jan 27, 2025

This change adds a simple command-line interface to InputPlumber to expose some basic functionality that we can expand on in the future. The new interface allows inputplumber to run as a client to execute dbus methods to provide a more user-friendly way to interact with the InputPlumber service.

Examples

$ ./inputplumber help
Open source input manager for Linux

Usage: inputplumber [COMMAND]

Commands:
  run      Start the InputPlumber daemon (default)
  sources  Manage source input devices
  device   Manage a composite device
  devices  Manage composite devices
  targets  Manage target input devices
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
$ ./inputplumber devices list
╭────┬─────────────────────────╮
│ Composite Devices            │
├────┼─────────────────────────┤
│ Id │ Name                    │
├────┼─────────────────────────┤
│ 0  │ Microsoft X-Box 360 pad │
╰────┴─────────────────────────╯
Found 1 composite device(s)
$ ./inputplumber device 0 load-profile ~/Projects/InputPlumber/rootfs/usr/share/inputplumber/profiles/default.yaml
Successfully loaded profile: ~/Projects/InputPlumber/rootfs/usr/share/inputplumber/profiles/default.yaml

@ShadowApex ShadowApex requested a review from pastaq January 30, 2025 21:26
@ShadowApex ShadowApex marked this pull request as ready for review January 30, 2025 21:27
@ShadowApex ShadowApex merged commit d31ca80 into main Feb 4, 2025
2 checks passed
@ShadowApex ShadowApex deleted the shadowapex/cli branch February 4, 2025 17:43
Copy link

github-actions bot commented Feb 4, 2025

🎉 This PR is included in version 0.43.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants