Coder Social home page Coder Social logo

jon4hz / fztea Goto Github PK

View Code? Open in Web Editor NEW
286.0 7.0 10.0 3.6 MB

๐Ÿฌ๐Ÿง‹ Remote control your flipper from the local terminal or over SSH

License: MIT License

Go 99.12% Shell 0.88%
bubbletea flipper flipper-zero flipperzero ssh tui serial-communication

fztea's Introduction

๐Ÿฌ๐Ÿง‹ Fztea (flipperzero-tea)

lint goreleaser Go Report Card Powered by Dolphines

A bubbletea-bubble and TUI to interact with your flipper zero.
The flipper will be automatically detected, if multiple flippers are connected, the first one will be used.

๐Ÿš€ Installation

# using go directly
$ go install github.com/jon4hz/fztea@latest

# from aur (btw)
$ yay -S fztea-bin

# local pkg manager
## debian / ubuntu
$ dpkg -i fztea-v0.6.2-linux-amd64.deb

## rhel / fedora / suse
$ rpm -i fztea-v0.6.2-linux-amd64.rpm

## alpine
$ apk add --allow-untrusted fztea-v0.6.2-linux-amd64.apk

# homebrew (macOS & linux)
$ brew install jon4hz/homebrew-tap/fztea

# windows
# -> I'm sure you'll figure something out :)

โœจ Usage

# trying to autodetect that dolphin
$ fztea

# no flipper found automatically :(
$ fztea -p /dev/ttyACM0

โšก๏ธ SSH

fztea also allows you to start an ssh server, serving the flipper zero ui over a remote connection.
Why? - Why not!

# start the ssh server listening on localhost:2222 (default)
$ fztea server -l 127.0.0.1:2222

# connect to the server (from the same machine)
$ ssh localhost -p 2222

By default, fztea doesn't require any authentication but you can specify an authorized_keys file if you want to.

# use authorized_keys for authentication
$ fztea server -l 127.0.0.1:2222 -k ~/.ssh/authorized_keys

๐Ÿ“ธ Screenshots

You can take a screenshot of the flipper using ctrl+s at any time. Fztea will store the screenshot in the working directoy, by default in a 1024x512px resolution.
The size of the screenshot can be customized using the --screenshot-resolution flag.

$ fztea --screenshot-resolution=1920x1080

โŒจ๏ธ Button Mapping

Key Flipper Event Keypress Type
w, โ†‘ up short
d, โ†’ right short
s, โ†“ down short
a, โ† left short
o, enter, space ok short
b, back, esc back short
W, shift + โ†‘ up long
D, shift + โ†’ right long
S, shift + โ†“ down long
A, shift + โ† left long
O ok long
B back long

๐ŸŒˆ Custom colors

You can set custom fore- and background colors using the --bg-color and --fg-color flags.

$ fztea --bg-color="#8A0000" --fg-color="#000000"

Results in:

ColorScreenshot

๐ŸŽฌ Demo

Local

LocalDemo

SSH

flipper_ssh_demo.mp4

fztea's People

Contributors

aprosvetova avatar dependabot[bot] avatar jon4hz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fztea's Issues

Doesn't build with Go 1.21

Hey! Cool project. However I can't build it on Go 1.21 (or 1.22) on Darwin because of this: bugst/go-serial#162

# go.bug.st/serial/enumerator
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:142:11: cannot define new methods on non-local type C.CFStringRef
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:148:11: cannot define new methods on non-local type C.CFTypeRef
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:154:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:165:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:175:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:194:11: cannot define new methods on non-local type *C.io_registry_entry_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:214:11: cannot define new methods on non-local type *C.io_iterator_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:218:11: cannot define new methods on non-local type *C.io_iterator_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:222:11: cannot define new methods on non-local type *C.io_iterator_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:229:11: cannot define new methods on non-local type *C.io_object_t
../go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_darwin.go:233:11: cannot define new methods on non-local type *C.io_object_t

I think if you just bump the version of go.bug.st/serial, it should work fine.

[status] keyboard interaction

Hello, great repo. Very useful tool.
I wanted to know if there is interest for handling keyboard inputs for PC and forwarding them to the virtual keyboard of the filpper. I saw that using flipper-cli at the moment it's not possible to so. Is fztea relying on it ?

Thanks

Use with iterm2 on Mac

By default, it seems that iterm2 gets the data for the images but does not display them as images of the Flipper. Is it possible to use iterms2 for this purpose?

Long press dosn't work

Cannot long press "send" button from terminal in Sub-Ghz when emulating.
Sub-GHz/ Gate ( for example) / Emulate / Send
MacOs terminal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.