{"id":18033701,"url":"https://github.com/rbren/lucy","last_synced_at":"2025-12-31T14:39:23.282Z","repository":{"id":21159729,"uuid":"24462547","full_name":"rbren/lucy","owner":"rbren","description":"A tool for sharing, coordinating, and automating code in any language","archived":false,"fork":false,"pushed_at":"2014-10-28T21:02:58.000Z","size":618,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T22:29:34.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbren.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}},"created_at":"2014-09-25T14:55:53.000Z","updated_at":"2020-07-31T14:39:42.000Z","dependencies_parsed_at":"2022-07-29T18:40:00.207Z","dependency_job_id":null,"html_url":"https://github.com/rbren/lucy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbren/lucy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbren%2Flucy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbren%2Flucy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbren%2Flucy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbren%2Flucy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbren","download_url":"https://codeload.github.com/rbren/lucy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbren%2Flucy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265820066,"owners_count":23833558,"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":[],"created_at":"2024-10-30T11:08:15.757Z","updated_at":"2025-12-31T14:39:23.255Z","avatar_url":"https://github.com/rbren.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lucy\n====\nLucy is a tool for sharing, coordinating, and automating code in any language. Lucy works by feeding JSON into code templates, producing customized code that compiles and runs.\n\u003cbr\u003e\u003cbr\u003e\nLucy is just getting started, but you can keep up with the latest news and learn about what lucy can do here:\u003cbr\u003e\nhttp://lucybot.github.io/blog/\n\u003cbr\u003e\u003cbr\u003e\nWant to get an early peek at everything lucy can do? \u003ca href=\"http://lucybot.github.io/blog/\"\u003eJoin the beta\u003c/a\u003e!\n\n\u003cbr\u003e\u003cbr\u003e\n## Installation\nYou'll need nodejs to run lucy:\u003cbr\u003e\nhttps://github.com/joyent/node/wiki/installing-node.js-via-package-manager\n\n```bash\nsudo npm install -g lucy\nlucy adduser\n```\n\u003cbr\u003e\u003cbr\u003e\n## Usage\n### Build an existing package\n```bash\nlucy build definition:package config.json\n```\n\n### Push a new definition\n\u003ci\u003eNote: define is currently only open to beta testers.  \u003ca href=\"http://lucybot.github.io/blog/\"\u003eJoin the beta\u003c/a\u003e for access\u003c/i\u003e\n```bash\nlucy define definition.json\n```\n\n### Add a package to an existing definition\n\u003ci\u003eNote: publish is currently only open to beta testers. \u003ca href=\"http://lucybot.github.io/blog/\"\u003eJoin the beta\u003c/a\u003e for access\u003c/i\u003e\n```bash\nlucy publish /path/to/directory/containing/package.json\n```\n\u003cbr\u003e\u003cbr\u003e\n## About\nThere are two main components to a lucy module:\u003cbr\u003e\n* DEFINITION - this is JSON that describes what kind of code is being generated, and provides a sample configuration.\u003cbr\u003e\n* PACKAGE - this is a set of code templates, scripts, and files that will be used to generate code. There can be multiple packages per definition.\u003cbr\u003e\n\nMost users will simply run ```lucy build``` to generate code from an existing lucy package. However, you can also create your own definitions and packages to share with others. Let's walk through a \"hello world\" example.\n\n\u003ci\u003eNote that while we're in beta, the ```define``` and ```publish``` commands won't work unless you're signed up. Feel free to jump ahead to ```build``` though!\u003c/i\u003e\n\n### Quickstart\nTo download all the files described in this tutorial, enter a new directory and run\n```bash\nlucy build hello-world-starter '{\"username\": \"SOME_UNIQUE_ID\"}'\n```\nchoosing a unique id that won't collide with other hello-world-* definitions.\n\nyou can then run\n```bash\nlucy define def.json\n\nlucy publish pkg\nlucy build hello-world-YOUR_UNIQUE_ID:js config.json\n\nlucy publish javapkg\nlucy build hello-world-YOUR_UNIQUE_ID:java config.json\n```\n\n### The Definition\nWe start with a definition:\n\u003cbr\u003e\u003cbr\u003e\u003ci\u003edef.json\u003c/i\u003e\n```js\n{\n  \"name\": \"hello-world\",\n  \"description\": \"A hello world example for lucy\",\n  \"sample_input\": {\n    \"greeting\": \"Hello\",\n    \"person\": \"world\"\n  }\n}\n```\n(you'll need to replace \"hello-world\" with something unique)\n\nand run:\n```bash\nlucy define def.json\n```\nwhich pushes the definition to lucy's servers.\n\u003cbr\u003e\n### The Package\nNow we create a package by starting a new directory 'pkg'\n\u003cbr\u003e\u003cbr\u003e\u003ci\u003epkg/hello.js\u003c/i\u003e\n```js\nconsole.log('\u003c%- greeting %\u003e \u003c%- person %\u003e');\n```\n\n\u003cbr\u003e\u003ci\u003epkg/package.json\u003c/i\u003e\n```js\n{\n  \"lucy_def\": \"hello-world\",\n  \"package_name\": \"js\",\n  \"files\": [{\n    \"from\": \"hello.js\"\n  }]\n}\n```\n\nand run\n```bash\nlucy publish pkg\n```\nwhich will zip up the directory and upload the resulting tarball.\n\u003cbr\u003e\n### Build!\nNow anyone can create a config.json like\n\u003cbr\u003e\u003cbr\u003e\u003ci\u003econfig.json\u003c/i\u003e\n```js\n{\n  \"greeting\": \"Yo\",\n  \"person\": \"lucy\"\n}\n```\n\nand run\n```bash\nlucy build hello-world:js config.json\n```\n\nwhich will generate this file in the working directory:\n\u003cbr\u003e\u003cbr\u003e\u003ci\u003ehello.js\u003c/i\u003e\n```js\nconsole.log(\"Yo lucy\");\n```\n\u003cbr\u003e\n### Extend!\nWhat's more, you (or anyone else) can add other packages to the hello-world definition, for example:\n\u003cbr\u003e\u003cbr\u003e\u003ci\u003eHello.java\u003c/i\u003e\n```java\npublic class Hello {\n  public static void main(String[] args) {\n    System.out.println(\"\u003c%- greeting %\u003e \u003c%- person %\u003e\");\n  }\n}\n```\n\n\u003cbr\u003e\u003ci\u003epackage.json\u003c/i\u003e\n```js\n{\n  \"lucy_def\": \"hello-world\",\n  \"package_name\": \"java\",\n  \"files\": [{\n    \"from\": \"Hello.java\"\n  }]\n}\n```\n\u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"http://lucybot.github.io/blog/\"\u003eJoin the beta\u003c/a\u003e if you're intersted in giving it a shot!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbren%2Flucy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbren%2Flucy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbren%2Flucy/lists"}