[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80505":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":13,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":15,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":9,"pushedAt":9,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":14,"starSnapshotCount":14,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},80505,"sandboxed-lit","run-llama\u002Fsandboxed-lit","run-llama","Sandboxed shell agent with access to LiteParse",null,"Rust",86,9,1,0,3,false,"main",true,[],"2026-06-12 02:04:03","# sandboxed-lit\n\nA small Rust CLI that runs an LLM agent inside a [microsandbox](https:\u002F\u002Fmicrosandbox.dev) VM. The agent uses OpenAI's GPT models via [`agent-sdk`](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fagent-sdk) and has tools to list files, read files (parsing PDFs \u002F images \u002F Office docs through [`liteparse`](https:\u002F\u002Fgithub.com\u002Frun-llama\u002Fliteparse)), and run bash commands, all confined to the sandbox.\n\n## How it works\n\n- **`src\u002Fsandbox.rs`** — Creates (or reuses) a microsandbox named `lit-sandbox` from the `ghcr.io\u002Frun-llama\u002Fliteparse:main` image with 2 CPUs and 1 GB of RAM, working dir `\u002Fapp\u002F`, and a bind mount at `\u002Fapp\u002Fdata`. Exposes:\n  - `create_or_get_sandbox(volume)` — boots \u002F attaches to the sandbox.\n  - `list_files(sandbox, dir)` — recursively lists files under `\u002Fapp\u002Fdata`.\n  - `read_file(sandbox, path)` — reads a file; routes PDFs, images and Office docs through `lit parse` for structured extraction.\n  - `run_bash_command(sandbox, cmd, args)` — runs an arbitrary command inside the sandbox and returns `{stdout, stderr}`.\n- **`src\u002Fagent.rs`** — Wraps those functions as three `agent-sdk` tools (`list_files`, `read_file`, `bash`), registers them, builds an OpenAI-backed agent, streams events to the terminal with colored output, and runs until completion.\n- **`src\u002Fmain.rs`** — A `clap` CLI that parses the prompt and optional mount path and calls `agent::run_agent`.\n\n## Requirements\n\n- Rust (edition 2024)\n- A running microsandbox host (see the [microsandbox docs](https:\u002F\u002Fgithub.com\u002Fmicrosandbox\u002Fmicrosandbox))\n- An `OPENAI_API_KEY` environment variable\n\n## Build\n\n```sh\ncargo build --release\n```\n\n## Usage\n\n```sh\nsandboxed-lit --prompt \"\u003Cyour prompt>\" [--volume \u003Chost-path>]\n```\n\nOptions:\n\n| Flag | Short | Description |\n| --- | --- | --- |\n| `--prompt` | `-p` | Prompt to send to the agent (required). |\n| `--volume` | `-v` | Host directory to mount at `\u002Fapp\u002Fdata` inside the sandbox. Defaults to the current directory. |\n\n### Examples\n\nRun with the current directory mounted:\n\n```sh\nexport OPENAI_API_KEY=sk-...\nsandboxed-lit -p \"Summarize every PDF in the working directory.\"\n```\n\nMount a specific folder:\n\n```sh\nsandboxed-lit \\\n  -p \"List the files, then read report.pdf and extract the key findings.\" \\\n  -v \u002FUsers\u002Fme\u002Fdocuments\n```\n\nFiles in the mounted directory are visible to the agent at `\u002Fapp\u002Fdata\u002F...`.\n","该项目是一个基于Rust的命令行工具，用于在microsandbox虚拟机中运行一个受限的LLM代理。该代理通过`agent-sdk`利用OpenAI的GPT模型执行文件列表、文件读取（支持PDF、图片及Office文档解析）和bash命令执行等操作，所有活动均限制在沙箱环境中。项目采用微沙箱技术隔离环境，确保安全性和可控性，同时提供强大的文件处理能力。适用于需要对敏感数据进行安全处理且要求较高灵活性的场景，如自动化文档分析、代码审查等任务。",2,"2026-06-11 04:01:01","CREATED_QUERY"]