{"id":15177531,"url":"https://github.com/azkadev/terminal_library","last_synced_at":"2025-04-21T07:32:20.012Z","repository":{"id":254252331,"uuid":"845976366","full_name":"azkadev/terminal_library","owner":"azkadev","description":"Terminal Library Cross Platform Support ","archived":false,"fork":false,"pushed_at":"2024-10-01T17:06:06.000Z","size":2874,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T05:40:55.520Z","etag":null,"topics":["dart","flutter","pty","xterm"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azkadev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["azkadev"],"custom":["https://t.me/azkadevbot?start=donate_user_menu_{repository_name}"]}},"created_at":"2024-08-22T09:47:51.000Z","updated_at":"2024-10-11T01:13:56.000Z","dependencies_parsed_at":"2024-09-23T09:01:47.761Z","dependency_job_id":"efdda5dc-cf21-4603-a61a-0917903ce160","html_url":"https://github.com/azkadev/terminal_library","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"6a706307402e54be4337b016caf254a22d26be74"},"previous_names":["azkadev/terminal_library"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkadev%2Fterminal_library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkadev%2Fterminal_library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkadev%2Fterminal_library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azkadev%2Fterminal_library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azkadev","download_url":"https://codeload.github.com/azkadev/terminal_library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223855860,"owners_count":17214908,"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":["dart","flutter","pty","xterm"],"created_at":"2024-09-27T14:40:19.845Z","updated_at":"2024-11-09T16:41:54.918Z","avatar_url":"https://github.com/azkadev.png","language":"Dart","readme":"# Terminal Library\n \n**Terminal Library** for dart and flutter support cross platform with user friendly, so this will help you to integrated terminal to your app without any hastle\n\n## Demo\n \n\n## 📚️ Docs\n\n1. [Documentation]({url_documentation})\n2. [Youtube](https://youtube.com/azkadev)\n3. [Telegram Support Group](https://t.me/{telegram_support_username})\n4. [Contact Developer](https://github.com/azkadev) (check social media or readme profile github)\n\n## 🔖️ Features\n\n1. [x] 📱️ **Cross Platform** support (Device)\n2. [x] 📜️ **Standarization** Style Code\n3. [x] ⌨️ **Cli** (Terminal for help you use this library or create project)\n4. [x] 🔥️ **Api** (If you developer bot / userbot you can use this library without interact cli just add library and use 🚀️)\n5. [x] 🧩️ **Customizable Extension** (if you want add extension so you can more speed up on development)\n6. [x] ✨️ **Pretty Information** (user friendly for newbie)\n7. [x] 🔥️ **Multi Function** One library with multi function (INCLUDE SSH CLIENT) so you can connect ssh terminal or acces file using SFTP without any hastle\n\n## ❔️ Fun Fact\n\nThis library work on everywhere platform (cli, server, web, gui) ignore flutter flag only pub.dev\n\n## Support\n\nI Really need energy for make this library easy to use please help me like\n\n1. [Sponsor / Donate Me On Github](https://github.com/azkadev)\n2. [Follow My Youtube Account](https://youtube.com/@azkadev)\n3. [Buy Services On Telegram Bot](https://t.me/azkadevbot?start=buy_services)\n\n### 📥️ Install Library\n\n1. **Dart**\n\n```bash\ndart pub add terminal_library\n```\n\n2. **Flutter**\n\n```bash\nflutter pub add terminal_library\n```\n \n## ? Who use this project / EXAMPLE PROJECT USE THIS LIBRARY\n\n\n1. General Studio Developer App\n\nGeneral Studio Developer App Is Application code editor with cross platform support with extra feature native (SSH CLIENT, CHROOT LINUX, HTTP CLIENT, NETWORK PROXY) so this app is can help you to develop without use more one app so you will significant decrease ram usage\n \n\u003cimg src=\"assets/general_studio_developer_development.png\" height=100% width=100%\u003e\n\u003cimg src=\"assets/general_studio_developer_mobile_terminal.png\" height=50% width=50%\u003e\n\n1. General Bot App / General Automation App\n   \n\n2. General Application\n\n\n## 🚀️ Quick Start\n\nExample Quickstart script minimal for insight you or make you use this library because very simple \n\n```dart\n// ignore_for_file: empty_catches, non_constant_identifier_names\nimport 'dart:convert';\nimport 'package:flutter/material.dart';\nimport 'package:general_lib/general_lib.dart';\nimport 'package:general_lib_flutter/extension/build_context.dart';\nimport 'package:general_lib_flutter/widget/widget.dart';\nimport 'package:terminal_library/pty_library/pty_library.dart';\nimport 'package:terminal_library/xterm_library/xterm.dart';\n\nvoid main(List\u003cString\u003e args) {\n  WidgetsFlutterBinding.ensureInitialized();\n  runApp(const App());\n}\n\nclass App extends StatelessWidget {\n  static GeneralLibFlutterApp generalLibFlutterApp = GeneralLibFlutterApp();\n  const App({super.key});\n  @override\n  Widget build(BuildContext context) {\n    return GeneralLibFlutterAppMain(\n      generalLibFlutterApp: generalLibFlutterApp,\n      builder: (themeMode, lightTheme, darkTheme, widget) {\n        Widget child = MaterialApp(\n          theme: lightTheme,\n          darkTheme: darkTheme,\n          themeMode: themeMode,\n          debugShowCheckedModeBanner: false,\n          home: const MyApp(),\n        );\n        return child;\n      },\n    );\n  }\n}\n\nclass MyApp extends StatefulWidget {\n  const MyApp({super.key});\n  @override\n  State\u003cMyApp\u003e createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  TerminalLibraryFlutterController terminalLibraryFlutterController = TerminalLibraryFlutterController();\n  final TerminalLibraryFlutter terminalLibraryFlutter = TerminalLibraryFlutter(\n    maxLines: 1000,\n    // inputHandler:\n  );\n  late final TerminalPtyLibrary ptyLibrary;\n  @override\n  void initState() {\n    super.initState();\n    WidgetsBinding.instance.addPostFrameCallback((_) async {\n      await refresh();\n    });\n  }\n\n  @override\n  void dispose() {\n    ptyLibrary.kill();\n    terminalLibraryFlutterController.dispose();\n    super.dispose();\n  }\n\n  bool is_loading = false;\n  Future\u003cvoid\u003e refresh() async {\n    if (is_loading) {\n      return;\n    }\n    setState(() {\n      is_loading = true;\n    });\n    await Future(() async {\n      await Future.delayed(Durations.short1);\n      ptyLibrary = TerminalPtyLibrary(\n        executable: TerminalPtyLibraryBase.defaultShell,\n        columns: terminalLibraryFlutter.viewWidth,\n        rows: terminalLibraryFlutter.viewHeight,\n      );\n      ptyLibrary.output.listen((event) {\n        if (event.isNotEmpty) {\n          try {\n            terminalLibraryFlutter.write(utf8.decode(event, allowMalformed: true));\n          } catch (e) {}\n        }\n      });\n      terminalLibraryFlutter.onOutput = (String value) {\n        if (value.isNotEmpty) {\n          try {\n            ptyLibrary.write(utf8.encode(value));\n          } catch (e) {}\n        }\n      };\n      terminalLibraryFlutter.onResize = (w, h, pw, ph) {\n        ptyLibrary.resize(h, w);\n      };\n      terminalLibraryFlutter.buffer.clear();\n      terminalLibraryFlutter.buffer.setCursor(0, 0);\n      terminalLibraryFlutter.textInput(\"clear\");\n      terminalLibraryFlutter.keyInput(TerminalLibraryFlutterKey.enter);\n      setState(() {});\n    });\n    setState(() {\n      is_loading = false;\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (is_loading) {\n      return Scaffold(\n        body: Center(\n          child: CircularProgressIndicator(\n            color: context.theme.indicatorColor,\n          ),\n        ),\n      );\n    }\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text(\"Terminal Library:\"),\n      ),\n      body: TerminalLibraryFlutterViewWidget(\n        terminalLibraryFlutter,\n        controller: terminalLibraryFlutterController,\n        autofocus: true,\n        backgroundOpacity: 0,\n        simulateScroll: true,\n        padding: const EdgeInsets.all(5),\n        alwaysShowCursor: true,\n        deleteDetection: Dart.isMobile,\n      ),\n    );\n  }\n}\n```","funding_links":["https://github.com/sponsors/azkadev","https://t.me/azkadevbot?start=donate_user_menu_{repository_name}"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazkadev%2Fterminal_library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazkadev%2Fterminal_library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazkadev%2Fterminal_library/lists"}