snapp_cli 0.4.0 snapp_cli: ^0.4.0 copied to clipboard
snapp_cli is a Dart command-line tool designed to simplify the process of adding custom devices to the Flutter SDK.
snapp_cli #
snapp_cli
is a powerful command-line interface tool designed to simplify the integration of embedded devices (like Raspberry Pi) with Flutter applications. Effortlessly manage your embedded devices, establish secure SSH connections, and streamline the development process by installing Flutter directly onto your custom devices from your PC.
Features #
- π οΈ Single Command Setup: Prepare your custom device completely by adding it to Flutter, establishing SSH connection, installing Flutter, and running your appβall with a single command.
- π± Device Management: Add, list, and remove custom(embedded) devices effortlessly.
- π Automatic SSH Connection: Configure and establish SSH connections to devices with ease.
- π Flutter Installation: Install Flutter directly onto your custom devices from your PC.
- π₯ Run & Debug Flutter Apps: Utilize hot reload, hot restart, and Dart DevTools for efficient app development.
- ποΈ User-Friendly Interface: Intuitive CLI for seamless navigation and usage.
Installation #
Before using snapp_cli
, ensure that you have Dart and Flutter installed. You can install the tool using the Dart package manager:
dart pub global activate snapp_cli
Make sure that system cache bin directory is added to your system's PATH to use snapp_cli globally. follow this link for more information: Running a script from your PATH
Usage #
Single Command Setup - Bootstrap
Bootstrap command is a way to setup a device from scratch. It will add a new device to custom devices, create a ssh connection to the device, install flutter on the device and finally help you to run your app on the device.
$ snapp_cli bootstrap
Device Management
- List Devices: Display all connected/embedded devices.
$ snapp_cli devices list
- Add a Device: Add a new device to the Flutter SDK.
$ snapp_cli devices add
- Delete a Device: Remove a device from the Flutter SDK.
$ snapp_cli devices delete
- Update Device IP: Update the IP address of a device.
$ snapp_cli devices update-ip
- Install Flutter: Install Flutter directly onto a device.
$ snapp_cli devices install-flutter
SSH Connection
- Create SSH Connection: Create a passwordless SSH connection to a device.
$ snapp_cli ssh create-connection
- Test SSH Connection: Test a passwordless SSH connection to a device.
$ snapp_cli ssh test-connection
Each command has specific options and usage, which you can explore further by running snapp_cli --help
or snapp_cli <command> --help
.
Troubleshooting #
Manually Editing flutter_custom_devices.json
#
In some cases, you may need to manually edit the flutter_custom_devices.json
file, which stores the configurations for custom devices. Here are the steps to follow if you encounter this situation:
-
Locate the
flutter_custom_devices.json
File:- The location of the
flutter_custom_devices.json
file can vary depending on the operating system you are using. You can find it with thesnapp_cli list
command.
- The location of the
-
Backup the File:
- Before making any manual changes, it's a good practice to create a backup of the
flutter_custom_devices.json
file in case something goes wrong.
- Before making any manual changes, it's a good practice to create a backup of the
-
Edit the JSON File:
- Use a text editor to open the
flutter_custom_devices.json
file. You can make changes to the device configurations as needed. Ensure that the JSON structure is valid; any syntax errors can cause issues.
- Use a text editor to open the
-
Test the Configuration:
- To test the changed configuration you need to run your app again.
Keep in mind that manually editing the flutter_custom_devices.json
file should be done with caution, as incorrect changes can lead to configuration issues. It's recommended to use the CLI tool to add, update, or delete custom devices whenever possible.
Contributing #
If you encounter any issues with this package or have suggestions for improvements, please open an issue. You are welcome to contribute to the development of this project by forking the repository and submitting pull requests.
License #
This project is licensed under the MIT License