[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76168":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":13,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":15,"starSnapshotCount":15,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},76168,"nano","pnegahdar\u002Fnano","pnegahdar","One file. Under 200 lines. Zero dependencies. It's a coding agent.","",null,"Python",165,5,87,0,6,58,15,2.33,false,"main",true,[24,25,26,27,28,29,30,31,32,33],"ai","automation","cli","coding-agent","developer-tools","gpt","llm","openai","python","shell","2026-06-12 02:03:40","# nano.py\n\n**The models got good enough that the harness doesn't matter anymore.**\n**So we made the smallest one that proves it. One file. under 200 lines. Zero dependencies.**\n\n```sh\npython3 \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fpnegahdar\u002Fnano\u002Fmain\u002Fnano.py)\n```\n\nThat's the whole thing. No, really.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"demo.gif\" alt=\"nano.py finding, running, and fixing tests in one session\" width=\"720\" \u002F>\n\u003C\u002Fp>\n\n---\n\n### Everything below ships in under 200 lines. We counted.\n\n> 📂 **Reads CLAUDE.md, AGENT.md, AGENTS.md, README.md** — automatic repo context, same files the real agents use\n>\n> 🧩 **Discovers skill files** — finds SKILL.md from `.claude\u002Fskills`, `~\u002F.claude\u002Fskills`, `~\u002F.codex\u002Fskills`, `~\u002F.codex\u002Fplugins`\n>\n> 🛡️ **Human-in-the-loop approvals** — every command shows what and why before it runs\n>\n> 🔁 **200-step agentic loop** — keeps going until the job is done, not until it gets bored\n>\n> 💬 **Interactive REPL** — multi-turn sessions with persistent memory across turns\n>\n> ⚡ **Non-interactive CLI** — `.\u002Fnano.py \"fix the tests\"` and walk away\n>\n> 🔄 **Session resume** — `.\u002Fnano.py -c` picks up where you left off, zero local state (OpenAI stores the conversation)\n\nPlus: interactive REPL · one-shot mode · session resume (`-c`) · session picker (`-s`) · GPT-5.5 by default · any model via env var · multi-step tool chaining · approve-one \u002F approve-all \u002F deny · auto-approve mode · per-command cwd, timeout, and env · platform-aware system prompt · output capped at 12KB · forced 5-10 word command descriptions · session reset · zero dependencies · pure stdlib Python · one file you can read in 5 minutes\n\n---\n\nMost coding agents are built on top of serious infrastructure — frameworks,\nruntimes, graph orchestrators, thousands of lines of glue.\n\nIt turns out you can get surprisingly far with a while loop, one shell tool,\nand a model that's good enough.\n\n`nano.py` is that loop. It sends context to GPT-5.5, lets it run shell commands,\nshows you what it wants to do, waits for your approval, and repeats until the job\nis done. Pure Python stdlib. Copy it into any repo and go.\n\n## Quick Start\n\n```sh\n# Run it straight from GitHub — no install, no clone, drops into a REPL\npython3 \u003C(curl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fpnegahdar\u002Fnano\u002Fmain\u002Fnano.py)\n\n# Or grab it\ncurl -O https:\u002F\u002Fraw.githubusercontent.com\u002Fpnegahdar\u002Fnano\u002Fmain\u002Fnano.py && chmod +x nano.py\n\n# One-shot\nOPENAI_API_KEY=sk-... .\u002Fnano.py \"find the bug in auth.py and fix it\"\n\n# Interactive REPL\nOPENAI_API_KEY=sk-... .\u002Fnano.py\n\n# Continue last session in this directory\nOPENAI_API_KEY=sk-... .\u002Fnano.py -c\n\n# Pick from recent sessions\nOPENAI_API_KEY=sk-... .\u002Fnano.py -s\n\n# YOLO mode (auto-approve everything, godspeed)\nNANO_APPROVE=all OPENAI_API_KEY=sk-... .\u002Fnano.py \"run the tests and fix whatever breaks\"\n```\n\n## What It Doesn't Do\n\n- Install packages\n- Require a config file\n- Need a Docker container\n- Have a plugin system\n\n## The Architecture\n\n```\nwhile not done:\n    response = ask_model(context)\n    if response.wants_to_run_command:\n        if human_approves(command):\n            result = subprocess.run(command)\n            context.append(result)\n    else:\n        print(response)\n        done = True\n```\n\nThat's the architecture diagram.\n\n## Safety\n\nThis gives a language model a shell on your computer.\n\n- **Approval is on by default.** Every command shows you what it wants to run and why.\n- **You can approve one at a time**, or press `a` to approve all for the session.\n- **`NANO_APPROVE=all` skips all prompts.** Only use this when you trust the workspace and the task.\n- **Output is capped at 12KB per command** so the model can't filibuster itself.\n\nRead the command before you press `y`. It's under 200 lines — you can audit the whole thing over lunch.\n\n## Configuration\n\n| Variable | Default | What it does |\n|---|---|---|\n| `OPENAI_API_KEY` | — | Required. |\n| `OPENAI_MODEL` | `gpt-5.5` | Any model the Responses API supports. |\n| `NANO_MAX_STEPS` | `200` | Max tool calls per task before it stops. |\n| `NANO_APPROVE` | — | Set to `all` to auto-approve commands. |\n\n## The SWE-bench Question\n\nNo score is claimed here. But the shape is right. Same loop every agent runs:\nread repo, form hypothesis, run command, observe, repeat.\n\nWrap it in a harness, give it a budget, collect patches, and find out.\n\n## FAQ\n\n**Is this a joke?**\u003Cbr>\nIt works. So no. But also a little bit yes.\n\n**Should I use this in production?**\u003Cbr>\nYes. Why not?\n\n**Why so small?**\u003Cbr>\nThe models got good enough that the harness just doesn't need to be big anymore.\n\n**Can I swap in Claude \u002F Gemini \u002F etc?**\u003Cbr>\nThe Responses API is OpenAI-specific, but the pattern is universal. Port it in an afternoon.\n\n**Why not just use Claude Code \u002F Codex?**\u003Cbr>\nYou should. They're great. This is for the mass of developers who want to understand\nwhat's actually happening inside the black box — and for anyone who looked at a\nlarge agent framework and thought *there has to be a simpler way*.\n\nThere was.\n\n## License\n\nMIT. Copy it, fork it, vendor it into your monorepo.\n\n---\n\n\u003Cp align=\"center\">\u003Csub>Written by agents, for agents, with agents. The humans just pressed approve.\u003C\u002Fsub>\u003C\u002Fp>\n","`nano.py` 是一个极简的编码代理工具，整个项目仅由一个不到200行的Python文件组成，且无任何外部依赖。它通过与GPT-5.5模型交互来执行代码相关的任务，如发现并修复测试错误，支持自动读取项目文档以获取上下文信息、发现技能文件以及实现多步骤工具链等特性。该工具提供了一个基于命令行的交互式REPL环境和非交互式的CLI模式，能够持续执行任务直到完成，并在每个命令执行前请求用户确认。适用于需要快速集成AI辅助开发功能但又希望保持系统轻量级的场景，比如小型项目的自动化测试修复、代码审查等。",2,"2026-06-11 03:54:43","CREATED_QUERY"]