{"id":20730646,"url":"https://github.com/moinsen-dev/moinsen_cli","last_synced_at":"2025-03-11T10:18:01.067Z","repository":{"id":273000860,"uuid":"908176675","full_name":"moinsen-dev/moinsen_cli","owner":"moinsen-dev","description":"Say Moinsen to your Flutter projects -  A helpful Command Line Interface for Flutter projects.","archived":false,"fork":false,"pushed_at":"2025-02-01T12:44:16.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-01T13:34:44.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moinsen-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T10:58:58.000Z","updated_at":"2025-02-01T12:44:13.000Z","dependencies_parsed_at":"2025-02-01T13:30:25.035Z","dependency_job_id":"071801ae-c3af-45f2-8043-0d12bdfdd69f","html_url":"https://github.com/moinsen-dev/moinsen_cli","commit_stats":null,"previous_names":["moinsen-dev/moinsen_cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moinsen-dev%2Fmoinsen_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moinsen-dev%2Fmoinsen_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moinsen-dev%2Fmoinsen_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moinsen-dev%2Fmoinsen_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moinsen-dev","download_url":"https://codeload.github.com/moinsen-dev/moinsen_cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243012696,"owners_count":20221605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","dart","flutter","kickstart"],"created_at":"2024-11-17T05:12:19.022Z","updated_at":"2025-03-11T10:18:01.059Z","avatar_url":"https://github.com/moinsen-dev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"## moinsen_cli\n\n![coverage][coverage_badge]\n[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]\n[![License: MIT][license_badge]][license_link]\n\nGenerated by the [Very Good CLI][very_good_cli_link] 🤖\n\nA powerful CLI tool to help you with your Flutter projects. Provides a gRPC server for executing commands with real-time feedback and interactive support.\n\n---\n\n## Getting Started 🚀\n\nIf the CLI application is available on [pub](https://pub.dev), activate globally via:\n\n```sh\ndart pub global activate moinsen_cli\n```\n\nOr locally via:\n\n```sh\ndart pub global activate --source=path \u003cpath to this package\u003e\n```\n\n## Usage\n\n```sh\n# Start the gRPC server (default port: 50051)\n$ moinsen serve\n\n# Start the gRPC server on a specific port\n$ moinsen serve --port 50052\n\n# Start the server with auto-generated secure access key\n$ moinsen serve --secret\n\n# Start the server with a specific secret key\n$ moinsen serve --secret-key your_secret_key\n\n# Start the server with command logging enabled\n$ moinsen serve --log\n\n# Update the CLI to the latest version\n$ moinsen update\n\n# Show CLI version\n$ moinsen --version\n\n# Show usage help\n$ moinsen --help\n```\n\n## Features\n\n- gRPC command service with bidirectional streaming\n- Interactive command support with prompt detection\n- Secure server access with auto-generated or custom secret keys\n- Command logging with timestamps and execution details\n- Automatic CLI updates via pub.dev\n- Graceful server shutdown handling\n- Real-time command execution with detailed responses\n- Cross-platform support\n\n## Command Service Protocol\n\nThe CLI provides a gRPC service for executing commands with the following features:\n\n- Bidirectional streaming for real-time command execution\n- Interactive command support (e.g., handling y/n prompts)\n- Response includes:\n  - Command output\n  - Current working directory\n  - Timestamp\n  - Interactive prompt detection\n- Error handling with stderr output\n\n### Protocol Messages\n\n```protobuf\nmessage CommandRequest {\n  string session_id = 1;\n  string input_data = 2;\n  bool is_interactive_answer = 3;\n}\n\nmessage CommandResponse {\n  string session_id = 1;\n  string output_data = 2;\n  bool is_prompt = 3;\n  int64 timestamp = 4;      // Unix timestamp in milliseconds\n  string current_folder = 5; // Current working directory\n}\n```\n\n## Available Commands\n\n### serve\nStarts the gRPC server for command execution.\n\nOptions:\n- `--port, -p`: Port to listen on (default: 50051)\n- `--secret`: Enable secure server access with an auto-generated secret key\n- `--secret-key`: Provide a specific secret key for server access\n- `--log`: Enable command logging to `.moinsen-command-log.json`\n\n### update\nUpdates the CLI to the latest version from pub.dev.\n\n## Development\n\n### Running Tests with Coverage 🧪\n\nTo run all unit tests use the following command:\n\n```sh\n$ dart pub global activate coverage 1.2.0\n$ dart test --coverage=coverage\n$ dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info\n```\n\nTo view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov):\n\n```sh\n# Generate Coverage Report\n$ genhtml coverage/lcov.info -o coverage/\n\n# Open Coverage Report\n$ open coverage/index.html\n```\n\n### Generating Protocol Buffers\n\nTo regenerate the gRPC code from protocol buffer definitions:\n\n```sh\n$ protoc --dart_out=grpc:lib/src/generated -Iprotos protos/command.proto\n```\n\n---\n\n[coverage_badge]: coverage_badge.svg\n[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[license_link]: https://opensource.org/licenses/MIT\n[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg\n[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis\n[very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoinsen-dev%2Fmoinsen_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoinsen-dev%2Fmoinsen_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoinsen-dev%2Fmoinsen_cli/lists"}