{"id":46270030,"url":"https://github.com/raheesahmed/sajicode","last_synced_at":"2026-06-11T02:01:40.003Z","repository":{"id":311992339,"uuid":"1045849904","full_name":"RaheesAhmed/SajiCode","owner":"RaheesAhmed","description":"AI engineering team in your terminal | Builds production software, not prototypes.","archived":false,"fork":false,"pushed_at":"2026-06-07T19:43:01.000Z","size":1029,"stargazers_count":66,"open_issues_count":0,"forks_count":15,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-07T21:21:40.470Z","etag":null,"topics":["claudecode","sajicode"],"latest_commit_sha":null,"homepage":"","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/RaheesAhmed.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY_CHECKS.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":"raheesahmed"}},"created_at":"2025-08-27T20:00:24.000Z","updated_at":"2026-06-07T19:43:00.000Z","dependencies_parsed_at":"2026-05-17T17:02:36.920Z","dependency_job_id":null,"html_url":"https://github.com/RaheesAhmed/SajiCode","commit_stats":null,"previous_names":["raheesahmed/open-claude","raheesahmed/openclaude","raheesahmed/openagent","raheesahmed/sajicode"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/RaheesAhmed/SajiCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaheesAhmed%2FSajiCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaheesAhmed%2FSajiCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaheesAhmed%2FSajiCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaheesAhmed%2FSajiCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaheesAhmed","download_url":"https://codeload.github.com/RaheesAhmed/SajiCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaheesAhmed%2FSajiCode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34178819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["claudecode","sajicode"],"created_at":"2026-03-04T03:02:49.297Z","updated_at":"2026-06-11T02:01:39.997Z","avatar_url":"https://github.com/RaheesAhmed.png","language":"TypeScript","funding_links":["https://patreon.com/raheesahmed"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./logo.svg\" width=\"280\" alt=\"SajiCode\" /\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eAI engineering team in Your terminal.\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  Plan work, delegate to specialist agents, edit multiple files safely, recover from errors, and ship faster.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/sajicode\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/sajicode?style=flat\u0026color=FF6A00\u0026labelColor=1a1a1a\" alt=\"npm version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/RaheesAhmed/SajiCode\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/RaheesAhmed/SajiCode?style=flat\u0026color=FF6A00\u0026labelColor=1a1a1a\" alt=\"GitHub stars\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/RaheesAhmed/SajiCode/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/RaheesAhmed/SajiCode?style=flat\u0026color=666666\u0026labelColor=1a1a1a\" alt=\"License\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://nodejs.org\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/node-%3E%3D18-43853d?style=flat\u0026labelColor=1a1a1a\" alt=\"Node \u003e= 18\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#what-is-sajicode\"\u003eWhat is it?\u003c/a\u003e ·\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e ·\n  \u003ca href=\"#how-to-use-it\"\u003eHow to Use\u003c/a\u003e ·\n  \u003ca href=\"#whats-new-in-v110\"\u003ev1.1.0\u003c/a\u003e ·\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e ·\n  \u003ca href=\"#whatsapp-channel\"\u003eWhatsApp\u003c/a\u003e ·\n  \u003ca href=\"#mcp-integration\"\u003eMCP\u003c/a\u003e ·\n  \u003ca href=\"#safety\"\u003eSafety\u003c/a\u003e ·\n  \u003ca href=\"#memory\"\u003eMemory\u003c/a\u003e ·\n  \u003ca href=\"#configuration\"\u003eConfig\u003c/a\u003e ·\n  \u003ca href=\"#for-developers\"\u003eDevelopers\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## What Is SajiCode?\n\nSajiCode is an AI coding tool that works like a small engineering team.\n\nInstead of one assistant trying to do everything, SajiCode uses a **PM agent** and specialist lead agents:\n\n- **PM Agent** plans the work and creates context.\n- **Backend Lead** builds APIs, server logic, auth, and data handling.\n- **Frontend Lead** builds HTML, CSS, React, Next.js, and UI work.\n- **Full-Stack Lead** builds tightly connected frontend + backend features.\n- **QA Lead** writes and runs tests.\n- **Security Lead** reviews risky code, secrets, auth, and vulnerabilities.\n- **Deploy Lead** handles Docker, CI/CD, and deployment files.\n- **Review Agent** checks the final result.\n\nThe goal is simple:\n\n\u003e Tell SajiCode what you want. It plans, delegates, builds, checks, and explains what happened.\n\nYou can use it if you are:\n\n- a developer who wants a faster coding workflow\n- a founder building an MVP\n- a student learning software projects\n- a non-developer who wants to describe an app in plain English\n- a team that wants AI help with code, tests, review, and security\n\n---\n\n## Quick Start\n\n### 1. Install\n\n```bash\nnpm install -g sajicode\n```\n\nOr run without installing:\n\n```bash\nnpx sajicode\n```\n\n### 2. Open Your Project\n\n```bash\ncd my-project\nsajicode\n```\n\n### 3. Ask It To Build Something\n\n```text\nBuild a login and signup page with a Node backend.\nUse plain HTML, CSS, and JavaScript.\nDo not install any packages.\n```\n\nSajiCode will:\n\n1. inspect your project\n2. create or update project context\n3. plan the task\n4. delegate work to the right specialist agents\n5. write files safely\n6. run checks when possible\n7. summarize what changed\n\n---\n\n## How To Use It\n\nStart SajiCode:\n\n```bash\nsajicode\n```\n\nThen type what you want:\n\n```text\nCreate a simple expense tracker app in this folder.\nUse Node.js for the backend and plain HTML for the frontend.\nNo external packages.\n```\n\nOther useful prompts:\n\n```text\nFix the login bug and explain what caused it.\n```\n\n```text\nAdd tests for the user service.\n```\n\n```text\nReview this project for security issues.\n```\n\n```text\nCreate a Dockerfile and GitHub Actions workflow for this app.\n```\n\n### Built-In Commands\n\nInside the SajiCode terminal:\n\n| Command | What it does |\n|:--|:--|\n| `/init` | Scan the project and create `SAJICODE.md` |\n| `/status` | Show current model, project, thread, and approval status |\n| `/undo \u003cfile\u003e` | Restore a file from its latest SajiCode snapshot |\n| `/snapshots` | Show recent file snapshots |\n| `/help` | Show available commands |\n| `/clear` | Clear the terminal |\n| `/exit` | Quit SajiCode |\n\n---\n\n## What Makes It Different?\n\n### PM Plans, Specialists Build\n\nSajiCode's PM agent does **not** write app code directly.\n\nThe PM creates context and delegates implementation to the right lead agent. This makes the workflow easier to follow and safer for larger projects.\n\n### Parallel Task Graph\n\nSajiCode can plan work as a dependency graph.\n\nExample:\n\n```text\nBackend API and Frontend UI can start together.\nQA tests wait until both are complete.\n```\n\nThis helps agents work faster without stepping on each other.\n\n### Multi-File Writing And Editing\n\nSpecialist agents can write or edit many files in one structured batch.\n\nBatch edits include:\n\n- path validation\n- snapshots before changes\n- rollback if something fails\n- predictive code checks\n- progress events in the UI\n\nThis is faster than writing one file at a time and safer than loose bulk edits.\n\n### Error Recovery\n\nWhen something fails, SajiCode can classify the error and suggest the next move.\n\nExamples:\n\n- `require is not defined in ES module scope`\n- missing imports\n- TypeScript errors\n- permission errors\n- timeouts\n- invalid tool arguments\n\nIt can recommend:\n\n- retry with a fix\n- delegate to another agent\n- break the task into smaller pieces\n- ask for human guidance\n\n### Predictive Code Analysis\n\nBefore risky code is written or run, SajiCode can scan it for common problems:\n\n- CommonJS vs ES module mistakes\n- hardcoded secrets\n- unsafe `innerHTML`\n- plaintext password storage\n- empty catch blocks\n- placeholder code\n- risky dynamic execution\n\n---\n\n## Features\n\nSajiCode is built around practical coding work, not chat-only assistance.\n\n| Feature | What it means |\n|:--|:--|\n| Specialist agents | PM, backend, frontend, full-stack, QA, security, deploy, and review roles |\n| Task graph planning | Work can be split into dependency-aware parallel tasks |\n| Multi-file batch edits | Leads can write or edit many files safely in one structured operation |\n| Predictive analysis | Code can be checked for likely runtime/security issues before it runs |\n| Error recovery | Failures are classified with recommended next actions |\n| Intelligent cache | Expensive repo/context scans are cached and invalidated when files change |\n| Project memory | SajiCode remembers project decisions, progress, and lessons |\n| Security checks | Risk scoring and command/path safety checks protect the workspace |\n| WhatsApp channel | Send tasks from your phone |\n| MCP integration | Connect external tools and data sources |\n\n### Codebase Intelligence\n\nSajiCode uses `collect_repo_map` to build a compact symbol-level map of your project.\n\nIt helps agents understand:\n\n- important files\n- exported functions\n- classes and interfaces\n- project structure\n- likely tech stack\n\nThis avoids reading every file one-by-one and keeps context smaller.\n\n### Headless And CI Mode\n\nYou can run SajiCode without the interactive UI:\n\n```bash\nsajicode build \"Review this project and write missing tests\" --headless\n```\n\nUseful for:\n\n- CI checks\n- automated reviews\n- test generation\n- security audits\n- batch maintenance tasks\n\n### Expert Skills\n\nSajiCode agents can use skill files for specialized work.\n\nExamples of skill areas:\n\n- Node.js APIs\n- frontend design\n- Next.js\n- database design\n- testing\n- security\n- DevOps\n- AI/RAG systems\n- MCP servers\n- mobile apps\n- performance optimization\n\nAgents load only the skills they need for the current task.\n\n---\n\n## What's New In v1.1.0\n\nSajiCode v1.1.0 is a major foundation release.\n\nNew in this version:\n\n- dependency-aware task graph\n- smarter PM delegation workflow\n- cleaner multi-agent terminal UI\n- intelligent cache for repo and context scans\n- error recovery system\n- predictive code analysis\n- multi-file batch writing/editing\n- rollback-safe file changes\n- stronger PM guardrails\n\nThis release makes SajiCode faster, clearer, and safer.\n\n---\n\n## WhatsApp Channel\n\nSajiCode can receive tasks from WhatsApp, so you can ask it to work while away from your keyboard.\n\nStart with:\n\n```bash\nsajicode --channels whatsapp\n```\n\nOn first run, SajiCode shows a QR code in your terminal.\n\nScan it from WhatsApp:\n\n```text\nWhatsApp -\u003e Settings -\u003e Linked Devices -\u003e Link a Device\n```\n\nHow it works:\n\n```text\nPhone -\u003e WhatsApp WebSocket -\u003e SajiCode channel router -\u003e Agent team -\u003e WhatsApp reply\n```\n\nDetails:\n\n- uses `@whiskeysockets/baileys`\n- no browser automation\n- no Selenium\n- no extra WhatsApp API key\n- reconnects automatically\n- long replies are split into WhatsApp-safe chunks\n- terminal and WhatsApp can run side-by-side\n\n### WhatsApp Modes\n\n| Mode | Use case | Behavior |\n|:--|:--|:--|\n| `admin` | You send coding tasks from your phone | SajiCode treats your messages as project tasks |\n| `personal` | AI replies to contacts in your style | SajiCode acts as a personal WhatsApp bot |\n\nExample `.sajicode/config.json`:\n\n```json\n{\n  \"whatsapp\": {\n    \"enabled\": true,\n    \"mode\": \"admin\"\n  }\n}\n```\n\nPersonal bot mode:\n\n```json\n{\n  \"whatsapp\": {\n    \"enabled\": true,\n    \"mode\": \"personal\",\n    \"personalBotPrompt\": \"Reply in a friendly, direct style.\"\n  }\n}\n```\n\n---\n\n## MCP Integration\n\nSajiCode supports the Model Context Protocol, so agents can use external tools and data sources.\n\nFull guide:\n\n```text\nMCP_INTEGRATION.md\n```\n\nCreate:\n\n```text\n.sajicode/mcp.json\n```\n\nExample:\n\n```json\n{\n  \"mcpServers\": {\n    \"code-context\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@anthropic/code-context-server\", \"{{projectPath}}\"],\n      \"transport\": \"stdio\"\n    },\n    \"database\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@modelcontextprotocol/server-sqlite\", \"./data/app.db\"],\n      \"transport\": \"stdio\"\n    }\n  }\n}\n```\n\n`{{projectPath}}` is replaced automatically with the current project path.\n\nMCP can be used for:\n\n- database access\n- repo intelligence\n- design tools\n- documentation search\n- internal APIs\n- custom business tools\n\nWhen MCP servers are configured, their tools are loaded into the agent system automatically.\n\n---\n\n## Safety\n\nSajiCode is designed to be careful by default.\n\n### PM Guardrails\n\nThe PM agent can create planning and context files, but it cannot write implementation files directly.\n\nThat means the PM should not create:\n\n- `.js`\n- `.ts`\n- `.html`\n- `.css`\n- config files\n- backend files\n- frontend files\n- test files\n\nSpecialist agents do that work.\n\n### File Safety\n\nMulti-file edits:\n\n- stay inside your project folder\n- block protected paths like `.git`, `node_modules`, `dist`, and real `.env` files\n- snapshot existing files\n- roll back if the batch fails\n\n### Shell Safety\n\nSajiCode checks shell commands before running them.\n\nHigh-risk commands can be warned, blocked, or sent for approval depending on your config.\n\nThe security layer checks for patterns such as:\n\n- destructive deletion\n- dangerous chmod/chown\n- suspicious network exfiltration\n- shell chaining\n- secret paths\n- system-level commands\n- repeated risky commands\n\nSee:\n\n```text\nSECURITY_CHECKS.md\n```\n\n### Human Approval\n\nYou can enable human-in-the-loop approval for commands and risky actions.\n\nExample `.sajicode/config.json`:\n\n```json\n{\n  \"humanInTheLoop\": {\n    \"enabled\": true,\n    \"tools\": {\n      \"execute\": {\n        \"allowedDecisions\": [\"approve\", \"edit\", \"reject\"]\n      }\n    },\n    \"allowedCommands\": [\"npm run\", \"node \", \"mkdir\"]\n  }\n}\n```\n\n---\n\n## Memory\n\nSajiCode uses project memory so agents do not start from zero every time.\n\nMemory lives under:\n\n```text\n.sajicode/\n```\n\nImportant files and folders:\n\n```text\n.sajicode/\n├── config.json\n├── active_context.md\n├── Plan.md\n├── Architecture.md\n├── Whats_done.md\n├── experiences.json\n├── memories/\n├── transcripts/\n└── snapshots/\n```\n\n### Three-Layer Memory\n\n| Layer | Purpose |\n|:--|:--|\n| Pointer index | Small summaries that are always loaded |\n| Topic files | Detailed project knowledge loaded only when needed |\n| Transcripts | Searchable history for past work and decisions |\n\n### Experience Replay\n\nAgents can record lessons from successes and failures.\n\nExamples:\n\n- package quirks\n- build errors\n- module-system mistakes\n- security findings\n- useful implementation patterns\n\nLater agents can search those lessons before starting similar work.\n\n---\n\n## Configuration\n\nSajiCode stores project settings in:\n\n```text\n.sajicode/config.json\n```\n\n### Choose A Model\n\nRun with a model provider:\n\n```bash\nsajicode -p openai -m gpt-4.1\n```\n\n```bash\nsajicode -p google -m gemini-2.5-flash\n```\n\n```bash\nsajicode -p anthropic -m claude-sonnet-4-20250514\n```\n\n```bash\nsajicode -p ollama -m llama3.1:70b\n```\n\n### API Keys\n\nSet only the keys for the provider you use:\n\n```bash\nOPENAI_API_KEY=\"...\"\nGOOGLE_API_KEY=\"...\"\nGEMINI_API_KEY=\"...\"\nANTHROPIC_API_KEY=\"...\"\nTAVILY_API_KEY=\"...\"\n```\n\n`TAVILY_API_KEY` is optional and enables web search.\n\n---\n\n## For Non-Developers\n\nYou do not need to know exact file names.\n\nGood prompts:\n\n```text\nBuild a simple website for my dental clinic.\nIt should have home, services, booking, and contact sections.\nMake it mobile friendly.\n```\n\n```text\nCreate a small app where I can add customers and mark payments as paid.\nUse simple local storage. Make it easy to run.\n```\n\n```text\nExplain this project to me in simple language and tell me how to start it.\n```\n\nTips:\n\n- Tell SajiCode the folder where you want the app.\n- Say if you do not want packages installed.\n- Say if the app is for demo, learning, or production.\n- Ask it to explain the result at the end.\n\n---\n\n## For Developers\n\nClone and build locally:\n\n```bash\ngit clone https://github.com/RaheesAhmed/SajiCode.git\ncd SajiCode\nnpm install\nnpm run build\nnode dist/index.js\n```\n\nRun from source:\n\n```bash\nnpm run dev\n```\n\nRun checks:\n\n```bash\nnpm run build\nnpm test\n```\n\n### Useful Scripts\n\n| Script | What it does |\n|:--|:--|\n| `npm run build` | Compile TypeScript |\n| `npm run dev` | Run from `src/index.ts` |\n| `npm start` | Run compiled `dist/index.js` |\n| `npm test` | Run Jest |\n| `npm run version:patch` | Bump patch version, push commit and tag |\n| `npm run version:minor` | Bump minor version, push commit and tag |\n\n---\n\n## Project Structure\n\n```text\nsrc/\n├── agents/       # PM, specialist agents, task graph, recovery, prediction\n├── cache/        # intelligent cache for expensive scans\n├── channels/     # terminal, WhatsApp, future channels\n├── cli/          # terminal renderer and CLI\n├── config/       # project config loading\n├── llms/         # model provider support\n├── mcp/          # MCP integration\n├── memory/       # project memory and experience replay\n├── prompts/      # PM and specialist prompts\n├── tools/        # repo map, context, multi-file editor, git, search\n├── types/        # shared TypeScript types\n└── utils/        # platform and skill helpers\n```\n\n---\n\n## Roadmap\n\nPlanned improvements:\n\n- direct agent-to-agent message bus\n- richer visual progress dashboard\n- semantic memory search\n- code intelligence and test generation\n- visual architecture diagrams\n- VS Code extension\n- more channel integrations\n\n---\n\n## License\n\nMIT\n\n---\n\n\u003cp align=\"center\"\u003e\n  Built by \u003ca href=\"https://github.com/RaheesAhmed\"\u003eRahees Ahmed\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraheesahmed%2Fsajicode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraheesahmed%2Fsajicode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraheesahmed%2Fsajicode/lists"}