[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75890":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":10,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":13,"stars30d":14,"stars90d":12,"forks30d":12,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":8,"pushedAt":8,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":12,"starSnapshotCount":12,"syncStatus":11,"lastSyncTime":24,"discoverSource":25},75890,"simulang","simular-ai\u002Fsimulang","simular-ai",null,"TypeScript",128,2,0,4,8,1.43,"MIT License",false,"main",true,[],"2026-06-12 02:03:37","# `@simular-ai\u002Fsimulang`\n\nCLI for running Simulang scripts written in JavaScript or TypeScript, with full access to [`@simular-ai\u002Fsimulang-js`](https:\u002F\u002Fgithub.com\u002Fsimular-ai\u002Fsimulang-js) and the standard Node runtime.\n\nRequires Node.js **22.18+**.\n\n## Install\n\n```bash\nnpm install -g @simular-ai\u002Fsimulang\n```\n\nA copy of `@simular-ai\u002Fsimulang-js` is bundled, so nothing else is needed.\n\n## First run on macOS\n\nmacOS gates the APIs simulang-js drives behind three permissions, granted **per host app** — the terminal or IDE you launch `simulang` from (Terminal, iTerm, Cursor, VS Code, …):\n\n- **Screen Recording** — for `Screen.screenshot()` and any vision-grounded action.\n- **Accessibility** — for the AX tree, AX actions, and window control.\n- **Input Monitoring** — for synthesized mouse and keyboard events to actually reach the foreground app.\n\nRun this once, from the terminal\u002FIDE you'll use:\n\n```bash\nsimulang setup\n```\n\nIt triggers each permission's system prompt one at a time. macOS will pop up a dialog for each, automatically add the requesting host to the corresponding System Settings pane, and offer an **Open System Settings** button — just toggle the entry on. The `setup` command then re-checks and reports what's still pending.\n\nRe-run `simulang setup` any time you switch terminals, upgrade Node, or want to confirm everything is still granted. If a script silently does nothing (clicks not landing, screenshots all-black), missing permissions are almost always the cause — re-run setup.\n\n## First run on Windows\n\nWindows has no system-wide accessibility prompt, but two things can bite on the first run:\n\n- The bundled native `.node` binary may be marked as downloaded and blocked by SmartScreen. If `simulang run` fails with a load error, run PowerShell `Get-ChildItem -Recurse \u003Cnode_modules path> | Unblock-File` against the simulang install directory.\n- If your script targets an elevated app, launch your terminal **as Administrator**.\n\n## Usage\n\n```bash\nsimulang run hello.ts           # run a script\nsimulang run --interactive      # Node REPL with simulang-js pre-imported (alias: -i)\nsimulang which hello.ts         # show which simulang-js a script would resolve\nsimulang --version              # prints the CLI version + the bundled simulang-js version\n```\n\nScripts can be `.ts`, `.mts`, `.js`, `.mjs`, or `.simulang` — TypeScript is stripped natively by Node, no build step. The `.simulang` suffix is supported for clarity in workflows that mix shell scripts with simulang scripts, but `.ts` \u002F `.mts` are recommended since editors and `tsc` recognize them out of the box. Example:\n\n```js\nimport { App, FocusPolicy, Visibility } from '@simular-ai\u002Fsimulang-js'\n\nApp.defaultBrowser().open('https:\u002F\u002Fexample.com', FocusPolicy.Steal, Visibility.Show, true)\n```\n\nIn the REPL, every `simulang-js` export (`App`, `Key`, `FocusPolicy`, …) is pre-loaded as a global, and the full namespace is also available as `simulang`.\n\n### Using with Claude Code\n\nRun once to install a Claude Code skill that teaches Claude how to use `simulang`:\n\n```bash\nsimulang init-claude              # user-level, into ~\u002F.claude\u002Fskills\u002Fsimulang\u002F\nsimulang init-claude --project    # project-local, into \u003Ccwd>\u002F.claude\u002Fskills\u002Fsimulang\u002F\nsimulang init-claude --check      # report whether the installed skill is up to date\n```\n\nSafe to re-run.\n\n### Picking a `simulang-js` version\n\nThe bundled copy is used by default. To override:\n\n```bash\nsimulang run --simulang-js=0.2.1 \u003Cscript>        # specific version (cached after first install)\nsimulang run --simulang-js=latest \u003Cscript>       # latest from the registry\nsimulang run --simulang-js=\u002Fpath\u002Fto\u002Fsimulang-js \u003Cscript>   # local checkout\n```\n\nYou can also set `SIMULANG_JS` in the environment, or `npm install @simular-ai\u002Fsimulang-js` next to your script for a per-project pin. If none of the above is set, the CLI's own bundled copy is used.\n\nUse `simulang which` to see which copy a script resolves to.\n\n## Authentication\n\nScripts that hit hosted services need an OpenRouter API key. Set `OPENROUTER_API_KEY` in your environment before running a script:\n\n```bash\nexport OPENROUTER_API_KEY=...\nsimulang run \u003Cscript>\n```\n\n`simulang run` prints a warning to stderr when `OPENROUTER_API_KEY` is unset, but does not refuse to run — scripts that don't hit hosted services work without it.\n\n## Development\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fsimular-ai\u002Fsimulang\ncd simulang\nnpm install\nnpm run build          # tsc → dist\u002F\nnpm link               # exposes `simulang` on PATH\nsimulang run examples\u002Fhello.ts\n```\n\nOther scripts: `npm run typecheck`, `npm run lint`, `npm run format`.\n\nTo test against a local `simulang-js` checkout:\n\n```bash\nsimulang run --simulang-js=\u002Fpath\u002Fto\u002Fsimulang-js examples\u002Fhello.ts\n```\n\n## License\n\nMIT — see [LICENSE](.\u002FLICENSE).\n","`@simular-ai\u002Fsimulang` 是一个用于运行用 JavaScript 或 TypeScript 编写的 Simulang 脚本的命令行工具，支持访问 `@simular-ai\u002Fsimulang-js` 库和标准 Node.js 运行时。其核心功能包括屏幕截图、自动化操作（如鼠标点击和键盘输入）以及窗口控制等，这些都依赖于特定的操作系统权限。在 macOS 上需要授予屏幕录制、辅助功能和输入监控权限，在 Windows 上则需要注意解除文件锁定和以管理员身份运行。适用于需要自动化用户界面交互的场景，例如自动化测试、UI 自动化任务或开发辅助脚本。","2026-06-11 03:53:37","CREATED_QUERY"]