{"id":43076559,"url":"https://github.com/ella-to/ella","last_synced_at":"2026-01-31T14:10:03.459Z","repository":{"id":248280816,"uuid":"787645796","full_name":"ella-to/ella","owner":"ella-to","description":"a compiler to generate golang and typescript http client and server","archived":false,"fork":false,"pushed_at":"2025-12-14T01:50:50.000Z","size":217,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-16T00:18:30.055Z","etag":null,"topics":["compiler","golang","rpc","typescript"],"latest_commit_sha":null,"homepage":"https://ella.to/ella","language":"Go","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/ella-to.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-16T23:11:27.000Z","updated_at":"2025-12-14T01:50:53.000Z","dependencies_parsed_at":"2024-07-13T17:26:28.853Z","dependency_job_id":"8d96268d-3cf7-47c2-b812-3e20e3897c0a","html_url":"https://github.com/ella-to/ella","commit_stats":null,"previous_names":["ella-to/ella"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/ella-to/ella","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ella-to%2Fella","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ella-to%2Fella/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ella-to%2Fella/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ella-to%2Fella/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ella-to","download_url":"https://codeload.github.com/ella-to/ella/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ella-to%2Fella/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28944800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T13:02:32.153Z","status":"ssl_error","status_checked_at":"2026-01-31T13:00:07.528Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["compiler","golang","rpc","typescript"],"created_at":"2026-01-31T14:10:03.368Z","updated_at":"2026-01-31T14:10:03.441Z","avatar_url":"https://github.com/ella-to.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"```\n███████╗██╗░░░░░██╗░░░░░░█████╗░\n██╔════╝██║░░░░░██║░░░░░██╔══██╗\n█████╗░░██║░░░░░██║░░░░░███████║\n██╔══╝░░██║░░░░░██║░░░░░██╔══██║\n███████╗███████╗███████╗██║░░██║\n╚══════╝╚══════╝╚══════╝╚═╝░░╚═╝ v0.2.7\n```\n\nElla, is yet another compiler to produce Go and Typescript code based on simple and easy-to-read schema IDL. There are many tools like gRPC, Twirp or event WebRPC to generate codes, but this little compiler is designed based on my views of 12+ years of developing backends and APIs. I wanted to simplify the tooling and produce almost perfect optimized, handcrafted code that can be read and understood.\n\nElla's schema went through several iterations to make it easier for extension and backward compatibility in future releases.\n\n\u003e **NOTE:**\n\u003e\n\u003e Ella's code generated has been used in couple of production projects, it has some designs that might not fit your needs, but I think it might solve a large number of projects. Also Ella's only emit `Go`, as a server and client, and `Typescript` as only client. This is intentinal as it serves my needs. However it can be easily extetended to produce other languages code by traversing the generated AST. For getting some examples about that, please refer to `generate-golang.go` and `generate-typescript.go`\n\n# Installation\n\nto install Ella's compiler, simply use the go install command\n\n```bash\ngo install ella.to/ella@v0.2.7\n```\n\n# Usage\n\nSimplicity applies to the CLI command as well, it looks for all files that need to be compiled and outputs the result to the designated file. The extension of the output file tells the compiler whether you want to produce the typescript or golang code. That's pretty much of it.\n\nFor example, the following command, will generate `api.gen.go` in `/api` folder with the package name `api` and will read all the ella files inside `./schema` folder.\n\n```bash\nella gen api /api/api.gen.go ./schema/*.ella\n```\n\nAlso, we can format the schema as well to have a consistent look by running the following command\n\n```bash\nella fmt ./schema/*.ella\n```\n\nThe full CLI documentation can be accessed by running Ella command without any arguments\n\n```\n███████╗██╗░░░░░██╗░░░░░░█████╗░\n██╔════╝██║░░░░░██║░░░░░██╔══██╗\n█████╗░░██║░░░░░██║░░░░░███████║\n██╔══╝░░██║░░░░░██║░░░░░██╔══██║\n███████╗███████╗███████╗██║░░██║\n╚══════╝╚══════╝╚══════╝╚═╝░░╚═╝ v0.2.6\n\nUsage: ella [command]\n\nCommands:\n  - fmt Format one or many files in place using glob pattern\n        ella fmt \u003cglob path\u003e\n\n  - gen Generate code from a folder to a file and currently\n        supports .go and .ts extensions\n        ella gen \u003cpkg\u003e \u003coutput path to file\u003e \u003csearch glob paths...\u003e\n\n  - ver Print the version of ella\n\nexample:\n  ella fmt ./path/to/*.ella\n  ella gen rpc ./path/to/output.go ./path/to/*.ella\n  ella gen rpc ./path/to/output.ts ./path/to/*.ella ./path/to/other/*.ella\n```\n\n# Schema\n\n## Comment\n\ncomment can be created using `#`\n\nfor example\n\n```\n# this is a comment\n```\n\n## Constant\n\n```\nconst \u003cidentifier\u003e = \u003cidentifier\u003e | \u003cvalue\u003e\n```\n\nfor example\n\n```\nconst A = 1\nconst B = 1_000_000\nconst C = 1.23\nconst D = \"hello world\"\nconst E = 'hello world'\nconst F = `hello\nworld\n`\nconst FileSize = 10gb\nconst Timeout = 2s\n\nconst RefFileSize = FileSize\n```\n\n## Enum\n\n```\nenum \u003cidentifier\u003e {\n    \u003cidentifier\u003e = \u003cinteger number\u003e\n    \u003cidentifier\u003e\n}\n```\n\nfor example\n\n```\nenum UserRole {\n    # _ skip the generation but keeps the order\n    _ = 1\n    Root\n    Normal\n}\n```\n\n## Model\n\n```\nmodel \u003cidentifer\u003e {\n    # for extending the model\n    ...\u003cmodel's identifer\u003e\n    \u003cidentifier\u003e: \u003ctype\u003e {\n        \u003cidentifier\u003e = \u003cvalue\u003e | \u003cconst identifer\u003e\n    }\n}\n```\n\n## Service\n\n```\nservice \u003cHttp | Rpc\u003e\u003cidentifer\u003e {\n    \u003cidentifier\u003e (\u003cidentifer\u003e: \u003ctype\u003e) =\u003e (\u003cidentifer\u003e: \u003ctype\u003e) {\n        \u003cidentifider\u003e = \u003cvalue\u003e | \u003cconst identifer\u003e\n    }\n}\n\n# for example:\n\nservice HttpUserService {\n    GetById(id: string) =\u003e (user: User)\n    Create(name: string) =\u003e (user: User)\n}\n```\n\n## HTTP Service Methods\n\nElla supports 6 powerful communication patterns for HTTP services:\n\n| Method Type         | Input       | Output             | Use Case                                    |\n| ------------------- | ----------- | ------------------ | ------------------------------------------- |\n| 🔄 **JSON-JSON**    | JSON        | JSON               | Standard API calls                          |\n| 📦 **JSON-Binary**  | JSON        | Binary             | File downloads, media streaming             |\n| 📡 **JSON-SSE**     | JSON        | Server-Sent Events | Real-time updates, notifications            |\n| 📤 **Files-JSON**   | File Upload | JSON               | Upload processing with metadata return      |\n| 📥 **Files-Binary** | File Upload | Binary             | Process uploads and return binary data      |\n| 📊 **Files-SSE**    | File Upload | Server-Sent Events | Upload progress tracking, processing events |\n\n## RPC Service Methods\n\nRPC services focus on simplicity with a single communication pattern:\n\n| Method Type      | Input | Output | Use Case                       |\n| ---------------- | ----- | ------ | ------------------------------ |\n| 🔌 **JSON-JSON** | JSON  | JSON   | Internal service communication |\n\n\u003e For more examples of these method types, check the e2e folder\n\n\u003e For more examples, please look into e2e folder\n\n## Identifier\n\nthere are 2 types of identifiers, camelCase and PascalCase. Basically all the args and returns names must be camelCase (first char must be lowercase) and all other identifer must be PascalCase (first char must be uppercase)\n\n## Custom Error\n\ndefining a custom error that can be safely used over the network. Code is optional. Code has to be unique. If Code is not defined, the compiler will assign a unique Id.\n\n```\nerror \u003cidentifer\u003e { Code = \u003cInteger\u003e Msg = \"\" }\n```\n\n## Type\n\ntype can be either the following list or refer to Model's identifer\n\n```\nint8, int16, int32, int64\nuint8, uint16, uint32, uint64\nfloat32, float64\nstring\nbool\ntimestamp\nany\nfile\n[]\u003ctype\u003e\nmap\u003ctype, type\u003e\n```\n\n## Value\n\nLiteral values for constants and defaults:\nNumbers: 1, 1.2\n\n- Strings: \"hello\", 'hello', `hello`\n- Booleans: true, false\n- Durations: 1ns, 1us, 1ms, 1s, 1m, 1h\n- Sizes: 1b, 1kb, 1mb, 1gb, 1tb, 1pb, 1eb\n- Null: null\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fella-to%2Fella","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fella-to%2Fella","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fella-to%2Fella/lists"}