{"id":20566303,"url":"https://github.com/trimorphdev/rubikscube","last_synced_at":"2025-06-30T23:05:57.071Z","repository":{"id":143748595,"uuid":"365028710","full_name":"trimorphdev/rubikscube","owner":"trimorphdev","description":"A Rubik's Cube simulator for the terminal made with JavaScript.","archived":false,"fork":false,"pushed_at":"2021-05-06T21:00:34.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T21:42:21.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/trimorphdev.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":"2021-05-06T20:24:04.000Z","updated_at":"2021-05-06T20:59:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"1167210a-5465-4151-a0a0-70517d089344","html_url":"https://github.com/trimorphdev/rubikscube","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/trimorphdev/rubikscube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimorphdev%2Frubikscube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimorphdev%2Frubikscube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimorphdev%2Frubikscube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimorphdev%2Frubikscube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trimorphdev","download_url":"https://codeload.github.com/trimorphdev/rubikscube/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trimorphdev%2Frubikscube/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262864131,"owners_count":23376455,"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-16T04:41:02.198Z","updated_at":"2025-06-30T23:05:57.044Z","avatar_url":"https://github.com/trimorphdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rubik's Cube\nA Rubik's Cube simulator written in TypeScript (Node.js) for the terminal.\n\n```sh\nnpm i --save @faztasio/rubikscube\n```\n\n![A quick preview of the simulator.](assets/preview.png)\n```js\nconst cubelib = require('rubikscube');\n\nconst cube = cubelib.createCube();\ncubelib.exec(cube, 'R2 L2 F2 B2 D2 U2');\ncubelib.render(cube);\n```\n\n**Currently only supports the 3x3 Rubik's Cube.**  Support for larger and smaller cubes may or may not be added in the future.\n\n## API\n### Import\n```ts\n// TypeScript\nimport * as cubelib from 'rubikscube';\n```\n\n```js\n// Plain JavaScript\nconst cubelib = require('rubikscube');\n```\n\n### Create a Cube\n```ts\nconst mainCube = cubelib.createCube();\n```\n\n### Execute an Algorithm\n```ts\ncubelib.exec(mainCube, `R U R' U'`);\n```\n\n### Render to Terminal\n```ts\ncubelib.render(mainCube);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrimorphdev%2Frubikscube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrimorphdev%2Frubikscube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrimorphdev%2Frubikscube/lists"}