{"id":15042407,"url":"https://github.com/hanoglu/termic","last_synced_at":"2025-04-12T18:53:45.417Z","repository":{"id":62071956,"uuid":"554462344","full_name":"hanoglu/TermiC","owner":"hanoglu","description":"GCC powered interactive C/C++ REPL terminal created with BASH","archived":false,"fork":false,"pushed_at":"2024-12-04T11:07:24.000Z","size":98,"stargazers_count":281,"open_issues_count":5,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T22:08:28.696Z","etag":null,"topics":["bash-script","gcc","interactive-c","interactive-shell","repl","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanoglu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-10-19T21:19:45.000Z","updated_at":"2025-03-29T18:46:10.000Z","dependencies_parsed_at":"2024-09-25T01:41:13.341Z","dependency_job_id":"c73472a7-b10e-4181-9c03-a12aaed4a80a","html_url":"https://github.com/hanoglu/TermiC","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":"0.16393442622950816","last_synced_commit":"6085df90e69adc7f5fc7b8ba28878c3c7969a933"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanoglu%2FTermiC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanoglu%2FTermiC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanoglu%2FTermiC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanoglu%2FTermiC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanoglu","download_url":"https://codeload.github.com/hanoglu/TermiC/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618262,"owners_count":21134200,"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-script","gcc","interactive-c","interactive-shell","repl","shell"],"created_at":"2024-09-24T20:47:15.253Z","updated_at":"2025-04-12T18:53:45.390Z","avatar_url":"https://github.com/hanoglu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TermiC: Terminal C\nInteractive C/C++ REPL shell created with BASH.\n## How to Use\nA simple function in TermiC:\n```c\n[user@FEDORA ~]$ termic\nTermiC 1.3.0V\nLanguage: c\nCompiler: gcc\nType 'help' for additional information\n\u003e\u003e double divide(double a, double b) {\n   ...if(b==0) {\n   ......return 0;\n   ......}\n   ...return a/b;\n   ...}\n\u003e\u003e printf(\"Division 25/2 is equal %f\", divide(25,2))\nDivision 25/2 is equal 12.500000\n\u003e\u003e \n```\nImplementing classes in TermiC++:\n```cpp\n[user@FEDORA ~]$ termic++\nTermiC 1.3.0V\nLanguage: c++\nCompiler: g++ -fpermissive\nType 'help' for additional information\n\u003e\u003e class Student {\n   ...public:\n   ...Student(int age) {\n   ......this-\u003eage = age;\n   ......}\n   ...int getAge() {\n   ......return age;\n   ......}\n   ...private:\n   ...int age;\n   ...}\n\u003e\u003e Student a(15)\n\u003e\u003e cout \u003c\u003c \"Age of student 'a' \" \u003c\u003c a.getAge()\nAge of student 'a' 15\n\u003e\u003e \n```\nUsing vectors in TermiC++:\n```cpp\n[user@FEDORA ~]$ termic++\nTermiC 1.3.0V\nLanguage: c++\nCompiler: g++ -fpermissive\nType 'help' for additional information\n\u003e\u003e #include \u003cvector\u003e\n\u003e\u003e vector\u003cint\u003e a\n\u003e\u003e a.push_back(10)\n\u003e\u003e a.push_back(11)\n\u003e\u003e a.push_back(12)\n\u003e\u003e short counter = 0\n\u003e\u003e for(auto v:a) {\n   ...cout \u003c\u003c ++counter \u003c\u003c \". element of a is \" \u003c\u003c v \u003c\u003c endl;\n   ...}\n1. element of a is 10\n2. element of a is 11\n3. element of a is 12\n\u003e\u003e \n```\nNote: _stdio.h, stdlib.h and iostream(in TermiC++)_ are included automatically. Prompt will be inside scope of _int main()_ function but all declared functions/namespaces/classes/structs will be declared before _int main()_ automatically.\n## How it Works\nAll inputs given to TermiC are append to text file in /tmp directory. Then TermiC compiles that file and runs it. It simply takes the last line back if an output detected as all outputs should be seen once. TermiC nearly fully supports C and C++ as it basically use GCC and G++ compilers. All curly braces starts an inline prompt so nested functions, if/else statements, while/for loops, classes etc. can be used efficiently. I don't know if there is such a concept, but I hope it will be useful.\n#### Prompt Commands\n|Commands|Explanation|\n|--------|-----------|\n|help|Shows the help menu|\n|abort|Aborts inline prompt mode which are entered by curly bracket|\n|show|Prints last successfully compiled source file|\n|showtmp|Prints last compiled source file with deleted edits|\n|save|Saves source file to working directory|\n|savebin|Saves binary file to working directory|\n|clear|Deletes all declared functions,classes etc. and resets shell|\n|exit|Deletes created temp files and exits program|\n\n## How to Install\nTermiC uses following packages:\n```bash\ngcc\ng++\n```\nTo install dependencies:\n```bash\napt install gcc g++ # Debian based distros\ndnf install gcc gcc-c++ # Fedora based distros\n```\nTo run TermiC:\n```bash\nwget \"https://raw.githubusercontent.com/hanoglu/TermiC/main/TermiC.sh\"\nchmod +x TermiC.sh\nbash TermiC.sh\n```\nTo install TermiC system wide:\n```bash\nwget \"https://raw.githubusercontent.com/hanoglu/TermiC/main/TermiC.sh\"\nsudo cp TermiC.sh /bin/termic\nsudo ln -sf /usr/bin/termic /usr/bin/termic++\nsudo chmod +x /bin/termic\nrm -f TermiC.sh\n```\nNote: [_DEB_](https://github.com/hanoglu/TermiC/releases/download/V1.2.2/termic-1.2.2.deb) and [_RPM_](https://github.com/hanoglu/TermiC/releases/download/V1.3.0/termic-1.3.0.noarch.rpm) files in [releases](https://github.com/hanoglu/TermiC/releases/tag/V1.3.0) page can be used to install TermiC in Debian/Fedora based systems. Also _COPR repository_ can be used to install TermiC in Fedora based distros.\u003cbr\u003e\u003cbr\u003e\nInstall with COPR:\n```bash\nsudo dnf copr enable hanoglu/termic\nsudo dnf install termic\n```\nTo start TermiC:\n```bash\ntermic # For C shell\ntermic++ # For C++ shell\ntermic tcc # For C shell using the tcc compiler\n```\nTo remove TermiC system wide:\n```bash\nsudo rm -f /bin/termic\nsudo rm -f /bin/termic++\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanoglu%2Ftermic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanoglu%2Ftermic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanoglu%2Ftermic/lists"}