{"id":21771047,"url":"https://github.com/tomlin7/mono","last_synced_at":"2025-07-21T10:03:02.457Z","repository":{"id":233626662,"uuid":"779379837","full_name":"tomlin7/mono","owner":"tomlin7","description":"Terminal emulator that can be embedded in Python apps","archived":false,"fork":false,"pushed_at":"2025-05-19T17:54:16.000Z","size":669,"stargazers_count":9,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T18:47:23.571Z","etag":null,"topics":["bash","hacktoberfest","powershell","python","terminal","terminal-emulator","tkinter"],"latest_commit_sha":null,"homepage":"https://tomlin7.github.io/mono","language":"Python","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/tomlin7.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2024-03-29T17:47:27.000Z","updated_at":"2025-05-19T15:17:41.000Z","dependencies_parsed_at":"2025-04-13T16:51:41.018Z","dependency_job_id":null,"html_url":"https://github.com/tomlin7/mono","commit_stats":null,"previous_names":["billyeatcookies/mono","tomlin7/mono"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tomlin7/mono","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Fmono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Fmono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Fmono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Fmono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomlin7","download_url":"https://codeload.github.com/tomlin7/mono/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomlin7%2Fmono/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266278199,"owners_count":23904038,"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":["bash","hacktoberfest","powershell","python","terminal","terminal-emulator","tkinter"],"created_at":"2024-11-26T14:14:52.854Z","updated_at":"2025-07-21T10:03:02.430Z","avatar_url":"https://github.com/tomlin7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mono: Embeddable Terminal Emulator\n\n\u003e [!IMPORTANT]\n\u003e See [PR #4](https://github.com/tomlin7/mono/pull/4) on new output parser under development\n\n**Mono** is a terminal emulator that can be embedded in tkinter applications. See [examples](./examples) to see mono in action. The codebase was extracted from the [**Biscuit project**](https://github.com/billyeatcookies/biscuit) and published as an embeddable widget library.\n\n- Supports handling **multiple instances** of terminals of different shells running simultaneously.\n- Comes as a standalone terminal widget \u0026 a **tabbed widget** as well, for handling different terminal instances.\n- **Custom terminals** can be made; most shells available on the platform are detected by mono. \n- Themes are fully customizable by the user.\n\n![monopreview](https://github.com/user-attachments/assets/365babe3-0ffd-4095-a8b8-ff98d0e615a7)\n\n```py\nimport tkinter as tk\n\nfrom mono import Terminals, get_available_shells, get_shell_from_name\n\nroot = tk.Tk()\nroot.geometry('800x300')\n\nterminals = Terminals(root)\nterminals.add_default_terminal()\nterminals.pack(fill='both', expand=True)\n\n# A menu for opening terminals\nmbtn = tk.Menubutton(root, text=\"Open Terminal\", relief=tk.RAISED)\nmenu = tk.Menu(mbtn)\nfor i in get_available_shells():\n    menu.add_command(label=i, command=lambda i=i: terminals.open_shell(get_shell_from_name(i)))\n\nmbtn.config(menu=menu)\nmbtn.pack()\nroot.mainloop()\n```\n\n`Terminals` is a container for multiple terminals. It provides a simple interface for managing multiple terminals in a tabbed interface.\n\nAll the shells detected for the platform can be accessed with `get_available_shells()`. The `get_shell_from_name()` function returns a shell object from the name of the shell.\n\n### Custom Terminals\n\nFollowing example demonstrates how to create a NodeJS standalone terminal with mono.\n```py\n# NOTE: Due to the missing additional ANSI handling, NodeJS shell \n# might not work as expected. The issue is being fixed, see pr #4\n\nimport tkinter as tk\nfrom mono import Terminal\n\nclass NodeJS(Terminal):\n    name = \"NodeJS\"\n    shell = \"node\"\n\nroot = tk.Tk()\nterminal = NodeJS(root)\nterminal.start_service()\nterminal.pack(fill='both', expand=True)\n\nroot.mainloop()\n```\n\n### Custom Theming\n\nFollowing example implements a custom light theme for mono terminals\n\n```py\nimport tkinter as tk\nfrom mono import Terminals, Theme\n\nclass Light(Theme):\n    bg = \"#FFFFFF\"\n    fg = \"#000000\"\n    abg = \"#CCCCCC\"\n    afg = \"#000000\"\n    border = \"#DDDDDD\"\n\n    # further overriding the __init__ will give more control over specific widgets:\n    #\n    #    def __init__(self, master=None, **kwargs):\n    #        super().__init__(master, **kwargs)\n    #        self.tabs = (self.bg, 'red')\n\n\nroot = tk.Tk()\nroot.geometry(\"800x300\")\n\nterminals = Terminals(root, theme=Light())\nterminals.pack(fill=\"both\", expand=True)\n\nterminals.open_python()             # open a python console\nterminals.open_another_terminal()   # open another instance of active\n\nroot.mainloop()\n\n```\n\n## Installation\n```py\npip install mono-term\n```\n\n\nFurther...\n\n- Shells can be run standalone or in a tabbed interface, see [examples/standalone](./examples/standalone.py).\n- Custom terminals can be made by subclassing the `Terminal` class, see [examples/customshell](./examples/customshell.py).\n- Custom themes can be passed to the `Terminal`, `Terminals` classes, see [examples/customtheme](./examples/customtheme.py).\n- High resolution text rendering can be enabled for windows, see [examples/highres](./examples/highres.py).\n\nFor more examples, see the [examples](./examples) directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomlin7%2Fmono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomlin7%2Fmono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomlin7%2Fmono/lists"}