{"id":15425100,"url":"https://github.com/msoeken/alice","last_synced_at":"2025-04-13T04:20:26.948Z","repository":{"id":52462854,"uuid":"112010856","full_name":"msoeken/alice","owner":"msoeken","description":"C++ command shell library","archived":false,"fork":false,"pushed_at":"2024-09-30T07:28:48.000Z","size":844,"stargazers_count":51,"open_issues_count":4,"forks_count":11,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T09:44:41.492Z","etag":null,"topics":["c-plus-plus","cli","cli-utility","pybind11","python"],"latest_commit_sha":null,"homepage":"","language":"C++","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/msoeken.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}},"created_at":"2017-11-25T14:44:06.000Z","updated_at":"2024-09-30T07:28:52.000Z","dependencies_parsed_at":"2024-10-21T17:37:55.357Z","dependency_job_id":null,"html_url":"https://github.com/msoeken/alice","commit_stats":{"total_commits":181,"total_committers":8,"mean_commits":22.625,"dds":0.09392265193370164,"last_synced_commit":"9b21e3f54ffb5b95e96886aa41908f80b43017ee"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoeken%2Falice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoeken%2Falice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoeken%2Falice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msoeken%2Falice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msoeken","download_url":"https://codeload.github.com/msoeken/alice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248662229,"owners_count":21141534,"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":["c-plus-plus","cli","cli-utility","pybind11","python"],"created_at":"2024-10-01T17:49:52.499Z","updated_at":"2025-04-13T04:20:26.917Z","avatar_url":"https://github.com/msoeken.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/msoeken/alice.svg?branch=master)](https://travis-ci.org/msoeken/alice)\n[![Build Status](https://ci.appveyor.com/api/projects/status/qc2kuc85jaxqu5gh?svg=true)](https://ci.appveyor.com/project/msoeken/alice)\n[![Documentation Status](https://readthedocs.org/projects/libalice/badge/?version=latest)](http://libalice.readthedocs.io/en/latest/?badge=latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# alice\n\n\u003cimg src=\"https://cdn.rawgit.com/msoeken/alice/master/alice.svg\" width=\"64\" height=\"64\" align=\"left\" style=\"margin-right: 12pt\" /\u003e\nalice is a C++-14 command shell library that supports automatic Python bindings.  It offers a simple yet feature-rich embedded DSL to create shell interfaces with user-defined commands that access and manipulate arbitrary user-defined data types.  Here is a small example for a shell to manipulate `string` objects.\n\n[Read the full documentation.](http://libalice.readthedocs.io/en/latest/?badge=latest)\n\n```c++\n#include \u003calice/alice.hpp\u003e\n\n#include \u003calgorithm\u003e\n#include \u003ciostream\u003e\n#include \u003cstring\u003e\n\nnamespace alice\n{\n\nALICE_ADD_STORE(std::string, \"str\", \"s\", \"String\", \"Strings\")\n\nALICE_PRINT_STORE(std::string, os, element)\n{\n  os \u003c\u003c element \u003c\u003c std::endl;\n}\n\nALICE_COMMAND(hello, \"Generation\", \"adds a welcome string to the store\")\n{\n  auto\u0026 strings = store\u003cstd::string\u003e();\n  strings.extend() = \"hello world\";\n}\n\nALICE_COMMAND(upper, \"Manipulation\", \"changes string to upper bound\")\n{\n  auto\u0026 str = store\u003cstd::string\u003e().current();\n  std::transform( str.begin(), str.end(), str.begin(), ::toupper );\n}\n\n}\n\nALICE_MAIN(demo)\n```\n\nAfter compiling we obtain a shell program with commands that allow us to do the following:\n\n```\ndemo\u003e hello\ndemo\u003e print -s\nhello world\ndemo\u003e hello\ndemo\u003e upper\ndemo\u003e print -s\nHELLO WORLD\ndemo\u003e current -s 0\ndemo\u003e print -s\nhello world\ndemo\u003e quit\n```\n\nWe can use the very same code to compile it into a Python library instead of an executable, allowing us to call the commands as Python methods.  For example:\n\n```python\nimport demo\n\ndemo.hello()\ndemo.upper()\ndemo.print(str = True)\n```\n\n## EPFL logic sythesis libraries\n\nalice is part of the [EPFL logic synthesis](https://lsi.epfl.ch/page-138455-en.html) libraries.  The other libraries and several examples on how to use and integrate the libraries can be found in the [logic synthesis tool showcase](https://github.com/lsils/lstools-showcase).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsoeken%2Falice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsoeken%2Falice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsoeken%2Falice/lists"}