{"id":28092536,"url":"https://github.com/fbn776/assistscript","last_synced_at":"2025-05-13T13:19:31.778Z","repository":{"id":240202796,"uuid":"726570593","full_name":"fbn776/AssistScript","owner":"fbn776","description":"AssistScript: A simple and not very useful scripting language inspired by Lisp.","archived":false,"fork":false,"pushed_at":"2024-05-21T20:49:07.000Z","size":1241,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-13T13:19:31.437Z","etag":null,"topics":["interpreter","lisp","new-language","programming-language","scripting-language","typescript"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/assistscript","language":"TypeScript","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/fbn776.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":"2023-12-02T18:46:03.000Z","updated_at":"2024-07-24T17:14:51.000Z","dependencies_parsed_at":"2024-05-17T09:58:56.651Z","dependency_job_id":null,"html_url":"https://github.com/fbn776/AssistScript","commit_stats":null,"previous_names":["fbn776/assistscript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbn776%2FAssistScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbn776%2FAssistScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbn776%2FAssistScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbn776%2FAssistScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fbn776","download_url":"https://codeload.github.com/fbn776/AssistScript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948511,"owners_count":21988962,"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":["interpreter","lisp","new-language","programming-language","scripting-language","typescript"],"created_at":"2025-05-13T13:19:31.161Z","updated_at":"2025-05-13T13:19:31.761Z","avatar_url":"https://github.com/fbn776.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg height=\"40\" src=\"./docs/assets/AS.png\" width=\"40\" alt=\"AssistScript logo\"/\u003e AssistScript\n\n![NPM License](https://img.shields.io/npm/l/assistscript)\n![NPM Version](https://img.shields.io/npm/v/assistscript)\n\n## Table of Contents\n- [Introduction 📜](#introduction)\n- [Installation📲](#installation)\n- [Demos ▶️](#demos)\n  - [Sample Program - Bubble Sort 🔢](#sample-program---bubble-sort)\n- [Usage ✍](#usage)\n  - [Using terminal 💻](#using-terminal)\n    - [REPL mode ⌨️](#repl-mode)\n    - [File Mode 📂](#file-mode)\n  - [Using the API 💻](#using-the-api)\n- [Want to learn more? 🏫](#want-to-learn-more)\n- [License](#license)\n\n---\n\n## Introduction📜\n\nAssistScript is a simple scripting(?) language that I made for fun.\nNot very useful, but it's fun to play around with.\nInitially started as a joke, and as time passed it became a fun project to work on.\n\nThe language is a straightforward, all you have to do is to specify a command and its arguments.\nThe basic syntax is:\n\n```asrc\n\u003ccommand\u003e \u003carg1\u003e \u003carg2\u003e ... \u003cargN\u003e\n```\neg:\n```asrc\nadd 10 20 40\n```\nOutputs 70\n\n\n\u003e✨ Want to try out the language? Check out the [AssistScript Runner](https://asrc-online.vercel.app/)\n\n---\n\n## Installation📲\n\nYou can install AssistScript using npm.\n\n```bash\nnpm install -g assistscript\n```\n\nThis installs the AssistScript CLI globally on your system.\nIf you don't want AssistScript to be installed globally,\nyou can omit the `-g` flag or use `npx` to run AssistScript without installing it.\n\n---\n\n## Demos▶️\n\nWant to see what the language can do? Check out the [demos🧪](./demos) directory for some examples.\n\nThese demos are simple programs that demonstrate the language's features. You can run them using the CLI.\n\n### Sample Program - Bubble Sort🔢\n\nHere is bubble sort in AssistScript:\n```asrc\n(array arr 4 5 2 4 5 6 7 1)\n\n(for (set i 0) (lt (get i) (len arr)) (incr i) (\n    (for (set j 0) (lt (get j) (sub (len arr) (get i) 1)) (incr j) (\n        (if (gt\n                (index arr (get j))\n                (index arr (add (get j) 1))\n        ) (\n            (set temp (index arr (get j)))\n\n            (set-arr arr (get j) (index arr (add (get j) 1)))\n            (set-arr arr (add (get j) 1) (get temp))\n        ))\n    ))\n))\n\n(for (set i 0) (lt (get i) (len arr)) (incr i) (\n    (print (index arr (get i)))\n))\n```\n\nOutput:\n```text\n1\n2\n4\n4\n5\n5\n6\n7\n```\n\nVisit the [online AssistScript runner](https://asrc-online.vercel.app) to run assistscript programs online.\n\n---\n\n## Usage✍\n\nAssistScript can be used in multiple ways.\nYou can use it as a standalone program in the terminal using the AssistScript CLI,\nor you can use it inside your JavaScript code.\n\n### Using terminal💻\n\nYou can run AssistScript using the terminal. The AssistScript package comes with a command-line interface to run\nAssistScript files. It also has a REPL mode to run commands interactively.\n\n```bash\n# Without installing the package\nnpx assistscript\n```\n\nOR\n\n```bash\n# Once the package is installed\naslangc\n```\n\nThe above commands, once executed, will show the help menu for the CLI.\n\n\u003e 📝 You can interchangeably use `aslangc` and `assistscript` in the terminal.\n\n#### REPL mode⌨️\n\nYou can run the REPL mode by using the `-r` or `--repl` flag.\n\n```bash\naslangc -r\n```\n\n#### File Mode📂\n\nYou can run AssistScript(.asrc) files using the CLI by providing the path to the file.\n\n```bash\naslangc \u003cpath-to-file\u003e\n```\n\n### Using the API💻\n\nYou can also use AssistScript in your JavaScript code, for this AssistScript exposes a simple API.\nThe `AssistScript` class is the main class that you can use run AssistScript code.\n\n```ts\nimport {AssistScript} from 'assistscript';\n\nconst as = new AssistScript();\n\n// Prints 70\nconsole.log(as.run('add 10 20 30'));\n// Prints 50 \u003c- (100 - 20 - (10 + 20))\nconsole.log(as.run('sub 100 20 (add 10 20)'));\n``` \n\n---\n\n## Want to learn more?🏫\n\nCheck out the [documentation📃](./docs/README.md) for more information on the language and its features.\n\n- To learn more about the implementations, check out the [implementation](./docs/implementations/README.md).\n- For additional information, check out the [additional info](./docs/additionals/README.md).\n- To get started with creating custom commands, check out the [custom commands](./docs/additionals/Create-custom-commands.md).\n- To create custom context, check out the [custom context](./docs/additionals/Create-custom-context.md).\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n\n---\n\nMade with 💙 by [fbn776](https://febinnelson.me)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbn776%2Fassistscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbn776%2Fassistscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbn776%2Fassistscript/lists"}