{"id":20852902,"url":"https://github.com/okturtles/chel","last_synced_at":"2025-10-30T22:21:43.702Z","repository":{"id":37683031,"uuid":"506099149","full_name":"okTurtles/chel","owner":"okTurtles","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-11T17:42:24.000Z","size":1293,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-18T04:48:50.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okTurtles.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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":"2022-06-22T04:40:27.000Z","updated_at":"2025-02-11T17:42:29.000Z","dependencies_parsed_at":"2024-01-13T02:58:20.037Z","dependency_job_id":"0c9c886f-498d-4cee-9de5-959ce0cf0322","html_url":"https://github.com/okTurtles/chel","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"fe0cec63d48f94d8b91b3a1c8572f5b9223ddb4b"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fchel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fchel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fchel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okTurtles%2Fchel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okTurtles","download_url":"https://codeload.github.com/okTurtles/chel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253681927,"owners_count":21946836,"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-11-18T03:19:14.447Z","updated_at":"2025-10-30T22:21:43.670Z","avatar_url":"https://github.com/okTurtles.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chel: Chelonia Command-line Interface\n\n🚧 Under construction! 🚧\n\n```\nchel\nchel help [command]\nchel version\nchel keygen [--out=\u003ckey.json\u003e]\nchel manifest [-k|--key \u003cpubkey1\u003e [-k|--key \u003cpubkey2\u003e ...]] [--out=\u003cmanifest.json\u003e] [-s|--slim \u003ccontract-slim.js\u003e] [-v|--version \u003cversion\u003e] \u003ckey.json\u003e \u003ccontract-bundle.js\u003e\nchel deploy \u003curl-or-dir-or-sqlitedb\u003e \u003ccontract-manifest.json\u003e [\u003cmanifest2.json\u003e [\u003cmanifest3.json\u003e ...]]\nchel upload \u003curl-or-dir-or-sqlitedb\u003e \u003cfile1\u003e [\u003cfile2\u003e [\u003cfile3\u003e ...]]\nchel serve [options] \u003cdirectory\u003e\nchel latestState \u003curl\u003e \u003ccontractID\u003e\nchel eventsAfter [--limit N] \u003curl\u003e \u003ccontractID\u003e \u003chash\u003e\nchel eventsBefore [--limit N] \u003curl\u003e \u003ccontractID\u003e \u003chash\u003e\nchel hash \u003cfile\u003e\nchel migrate --from \u003cbackend\u003e --to \u003cbackend\u003e --out \u003cdir-or-sqlitedb\u003e\n```\n\nNote: in many (if not all) instances, the `\u003curl\u003e` parameter can refer to a local folder path, in which case the command will operate without making a network connection, and will instead use the folder's contents to perform its operations.\n\n### `chel keygen`\n\n```\n{\n  \"version\": \"1.0.0\",\n  \"cipher\": \"algo\",\n  \"pubkey\": \"...\",\n  \"privkey\": \"...\",\n  \"encrypted\": \"algo\"\n}\n```\n\nIf `\"encrypted\"` doesn't exist - it means the `\"privkey\"` was saved in the clear.\n\n### `chel serve`\n\nStarts a local development server for Chelonia applications.\n\n```\nchel serve [options] \u003cdirectory\u003e\n\nOPTIONS\n\n--dp \u003cport\u003e        set dashboard port (default: 8888)\n--port \u003cport\u003e      set application port (default: 8000)\n--db-type \u003ctype\u003e   one of: files, sqlite, mem (default: mem)\n--db-location \u003cloc\u003e  for \"files\", a directory, for \"sqlite\", path to sqlite database\n```\n\n**Example:**\n```bash\n# Serve Group Income app from extracted directory\nchel serve ./gi-v2.0.0\n\n# Serve with custom ports and SQLite database\nchel serve --dp 8888 --port 8000 --db-type sqlite --db-location ./app.db ./my-app\n```\n\nThe serve command will:\n- Start a dashboard server (default: http://localhost:8888)\n- Start an application server (default: http://localhost:8000)\n- Serve static assets and handle API routes\n- Support different database backends (memory, filesystem, SQLite)\n\n### `chel manifest`\n\nLet's say you have the following files:\n\n- `contract-bundle.js`\n- `contract-slim.js`\n\nRunning `chel manifest --add-key alex.json --slim contract-slim.js deploy-key.json contract-bundle.js` will generate the following `contract-bundle.manifest.json`:\n\n```\n{\n  \"head\": {\n    \"manifestVersion\": \"1.0.0\"\n  },\n  \"body\": JSON.stringify({\n    \"version\": \"\u003ccontract version string, 'x'\u003e by default\",\n    \"contract\": { \"hash\": \"\u003chash of contract-bundle.js\u003e\", \"file\": \"contract-bundle.js\" },\n    \"contractSlim\": { \"hash\": \"\u003chash of contract-slim.js\u003e\", \"file\": \"contract-slim.js\" },\n    \"authors\": [\n      {\"cipher\": \"algo\", \"key\": \"\u003cpubkey from deploy-key.json\u003e\"},\n      {\"cipher\": \"algo\", \"key\": \"\u003cpubkey from alex.json\u003e\"}\n    ]\n  }),\n  \"signature\": {\n    \"key\": \"\u003cwhich of the 'authors' keys was used to sign 'body'\u003e\",\n    \"signature\": \"\u003csignature\u003e\"\n  }\n}\n```\n\nIt will upload both versions of the contracts, and this JSON.\n\nThis format makes it as efficient as possible for using the contract system from both in-app and from the commandline.\n\nThe CLI tool will always use the self-contained contract bundle, whereas apps can load less code by loading the slim version of the contract. You just need to make sure that none of the external dependencies that you're referencing ever change if you do this, as otherwise you will get different state between the two versions of the contracts.\n\nNote also that Chelonia is fundamentally language agnostic. We started out using Chelonia to build JS apps, but you can use this protocol with any programming language that supports source evaluation at runtime.\n\nSome commands of this CLI tool (like `latestState`), only support JavaScript, but that is a limitation of resources on our side, and not a fundamental limitation of the protocol.\n\n### `chel deploy`\n\nDeploys manifest(s) generated with `chel manifest`.\n\nAutomatically uploads any corresponding contract files.\n\nOutputs the hash(es) corresponding to the manifest(s).\n\nUseful command:\n\n```\ncp -r path/to/contracts/* test/assets/ \u0026\u0026 ls ./test/assets/*-slim.js | sed -En 's/.*\\/(.*)-slim.js/\\1/p' | xargs -I {} ./src/main.ts manifest --out=test/assets/{}.manifest.json --slim test/assets/{}-slim.js key.json test/assets/{}.js \u0026\u0026 ls ./test/assets/*.manifest.json | xargs ./src/main.ts deploy http://127.0.0.1:8888\n```\n\n### sha256sum\n\nCurrent release hashes will always be listed here.\n\n```\n8a267d23405085ac4b01e55fca235b68f07875d1f7898f711c07da5b1d384b80  dist/chel-v3.0.0-aarch64-apple-darwin.tar.gz\ne46f8b42bb8c2c1f0c0263ffa7b28d0b4030f0892f68e65541fe4e4dd7b2f7e4  dist/chel-v3.0.0-aarch64-unknown-linux-gnu.tar.gz\n497468d57887e2a922045d5f82200c99336fd807762f200621a8dc8a761032c1  dist/chel-v3.0.0-x86_64-apple-darwin.tar.gz\nf8fc1dba11045519d172868c54433a983de04248a1bb61edf206eacee6ad65fa  dist/chel-v3.0.0-x86_64-pc-windows-msvc.tar.gz\n301e5fd7fc483f40520090f810d0d463f092b50855e0259aa2dec8b15ee67029  dist/chel-v3.0.0-x86_64-unknown-linux-gnu.tar.gz\n```\n\n## History\n\nSee [HISTORY.md](HISTORY.md)\n\n## License\n\n[AGPL-3.0](LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokturtles%2Fchel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokturtles%2Fchel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokturtles%2Fchel/lists"}