https://github.com/eeriemyxi/ergo
A simple shell language that is ergonomic for smartphone users.
https://github.com/eeriemyxi/ergo
ergonomics language python
Last synced: 2 months ago
JSON representation
A simple shell language that is ergonomic for smartphone users.
- Host: GitHub
- URL: https://github.com/eeriemyxi/ergo
- Owner: eeriemyxi
- License: mit
- Created: 2024-12-12T18:18:28.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-17T19:22:10.000Z (6 months ago)
- Last Synced: 2025-02-12T00:44:51.273Z (4 months ago)
- Topics: ergonomics, language, python
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ergo
> [!IMPORTANT]
> A work in progress.Ergo is an attempt at a shell language that is designed with ease of use in mind
for smartphone users. Please have a look under [`samples/`](samples/) for
examples. For now the implementation will be done in Python, however if the
attempt succeeds, it will eventually will be ported to Kotlin for use with
Android SDK.## Demo
[`samples/hello-world.ergo`](samples/hello-world.ergo) should generate an AST
like this:```py
[Token(type=, literal='cmd-here', children=[]),
Token(type=, literal='arg without key here', children=[]),
Token(type=,
literal='another arg without key here .. \\ "with quotes" and 1 2 4 '
'numbers, and so on.',
children=[]),
Token(type=,
literal='arg1',
children=[Token(type=,
literal='arg1 value',
children=[])]),
Token(type=,
literal='arg2',
children=[Token(type=,
literal='arg2 value',
children=[]),
Token(type=,
literal="arg2's another value here",
children=[]),
Token(type=,
literal="arg2's third value is here",
children=[])]),
Token(type=,
literal='arg3',
children=[Token(type=,
literal="arg3's value",
children=[])])]
```
## Building
After cloning the repo, you can do the following with `uv` (a package manager)
from the source tree's root:```
uv sync
uv run ergo samples/hello-world.ergo
```You may use any build backend you desire as long it understands a
`pyproject.toml` file.