codenano
Health Uyari
- No license — Repository has no license file
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Uyari
- process.env — Environment variable access in docs/engine-reference/04-tool-orchestration.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
This SDK provides a lightweight TypeScript library for developers to build custom AI coding agents capable of reading, writing, and editing files, as well as executing bash commands.
Security Assessment
Overall risk: Medium. The core functionality grants the AI agent highly sensitive capabilities, most notably direct shell execution (Bash) and file system modification. While no hardcoded secrets were found and no dangerous OS-level permissions are requested, the tool accesses environment variables to retrieve API keys. A warning was identified for environment variable access in the documentation, which is standard for LLM API authentication but requires you to ensure your local environment is secure. Because the agent can execute system commands based on AI prompts, it inherently requires strict oversight and sandboxing during use.
Quality Assessment
The project is actively maintained, with its most recent push occurring today. However, it currently has extremely low community visibility (5 stars), indicating that it has not been broadly tested or vetted by the open-source community. Additionally, the repository lacks a license file. The marketing claims to be "extracted from Claude Code" and to use the MIT license, but the absence of an actual license file in the repository means there are no formal terms granting you the legal right to use, modify, or distribute the code.
Verdict
Use with caution: the active maintenance is promising, but zero formal licensing, unproven community trust, and built-in shell execution capabilities require strict operational sandboxing.
Lightweight AI coding agent SDK extracted from Claude Code. 5,500 lines vs 150,000+. Same power, 97% less complexity. Build custom AI coding agents in 1 minutes
codenano
The lightweight AI coding agent SDK extracted from Claude Code.
Built by extracting Claude Code's production architecture. All the power, none of the bloat. Open source, fully customizable, production-ready.
💡 Based on Claude Code — The same battle-tested engine that powers Anthropic's official coding assistant, now available as a standalone SDK.
Why codenano?
🚀 Claude Code's Core, 97% Lighter
- 5,500 lines of pure, focused code
- Claude Code: 150,000+ lines (IDE integration, UI, etc.)
- Same agent engine, zero overhead
⚡ What Claude Code Does, You Can Do
npm install codenano
Build your own Claude Code in 60 seconds. No IDE required. No restrictions.
🎯 Battle-Tested Architecture
Extracted from Claude Code's production engine. Proven at scale, optimized for developers.
Quick Start
Get your first agent running in 3 lines:
import { createAgent, coreTools } from 'codenano'
const agent = createAgent({
model: 'claude-sonnet-4-6',
tools: coreTools(), // Read, Edit, Write, Glob, Grep, Bash
})
const result = await agent.ask('Read package.json and summarize it')
console.log(result.text)
That's it. No complex setup. No configuration hell. Just pure productivity.
Streaming? Built-in.
for await (const event of agent.stream('What files are here?')) {
if (event.type === 'text') process.stdout.write(event.text)
}
Multi-turn conversations? Easy.
const session = agent.session()
await session.send('Read main.ts')
await session.send('Now explain what it does')
Custom Tools
import { defineTool } from 'codenano'
import { z } from 'zod'
const readFile = defineTool({
name: 'ReadFile',
description: 'Read a file from disk',
input: z.object({ path: z.string() }),
execute: async ({ path }) => fs.readFileSync(path, 'utf-8'),
isReadOnly: true,
})
const agent = createAgent({
model: 'claude-sonnet-4-6',
tools: [readFile],
})
codenano vs Claude Code
Same engine. Different philosophy.
| Feature | codenano | Claude Code |
|---|---|---|
| Based On | Claude Code core | Official Anthropic product |
| Lines of Code | 5,500 (core only) | 150,000+ (full app) |
| What's Included | Agent engine | Engine + IDE + UI |
| Setup Time | < 1 minute | Install IDE extension |
| Use Case | Build custom agents | Use as-is in IDE |
| Customizable | ✅ Fully open | ⚠️ Closed source |
| Standalone | ✅ Yes | ❌ Requires IDE |
| Production Ready | ✅ Yes | ✅ Yes |
| Open Source | ✅ MIT License | ❌ Proprietary |
Think of it this way:
- Claude Code = Complete car (engine + body + interior)
- codenano = Just the engine (build your own car)
When to use codenano:
- Building custom AI coding tools
- Integrating agents into your product
- Need full control over behavior
- Want to understand how it works
When to use Claude Code:
- Just want to code with AI assistance
- Prefer official Anthropic support
- Happy with IDE integration
What You Get
🛠️ 17 Built-in Tools
Ready to use, zero configuration:
- File Operations: Read, Edit, Write
- Code Search: Glob (pattern matching), Grep (regex search)
- Execution: Bash commands
- Advanced: Web search, web fetch, notebooks, LSP, and more
🎨 Three Tool Presets
coreTools() // Essential 6 tools
extendedTools() // Core + 5 more
allTools() // All 17 tools
🔧 Production Features
- ✅ Auto-compact (handles context overflow)
- ✅ Retry & fallback (resilient API calls)
- ✅ Token budgeting (cost control)
- ✅ Permission system (security)
- ✅ Hook system (lifecycle events)
- ✅ Streaming support (real-time output)
System Structure
Clean, modular architecture:
codenano/
src/
agent.ts # Core agent loop
session.ts # Multi-turn conversations
tools/ # 17 built-in tools
prompt/ # System prompt builder
provider.ts # Anthropic SDK + Bedrock
compact.ts # Auto-compact logic
tests/ # 191 tests
examples/ # Ready-to-run demos
docs/ # Comprehensive guides
191 tests. 100% production-ready.
Documentation
| Doc | What You'll Learn |
|---|---|
| Architecture | Agent loop, interaction modes, stream events |
| Tools | Built-in tools, custom tools, permissions |
| Configuration | Full config reference, CLAUDE.md support |
| Reliability | Auto-compact, retry, fallback, budgeting |
| Prompt System | System prompt architecture |
| Gap Analysis | SDK vs Claude Code comparison |
Testing
# Unit tests (191 tests)
npm test
# With coverage
npx vitest run --coverage
# Integration tests (requires API key)
ANTHROPIC_API_KEY=sk-xxx npm run test:integration
Roadmap
Coming Soon:
- Hook system (16 event types)
- Sub-agent spawning
- Memory system (cross-session persistence)
- MCP protocol support
- Session persistence
- Git integration
- Cost tracking
Why Choose codenano?
For Startups
Ship your AI coding product faster. Stop wrestling with bloated frameworks. Get to market in days, not months.
For Enterprises
Production-ready from day one. Battle-tested architecture, comprehensive testing, full control over your stack.
For Developers
Actually enjoyable to use. Clean APIs, great docs, zero magic. Build what you want, how you want.
License
MIT License.
Get Started Now
npm install codenano
Questions? Check the docs or open an issue.
Ready to build? See examples/ for inspiration.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi