Limo CLI is an AI-powered code analysis tool built with the Deity framework and GitHub Copilot SDK.
Limo uses a 4-phase analysis pipeline defined as a declarative TSX workflow:
<Workflow name="limo-analysis-workflow" defaultModel={{ adapter: llmAdapter }}>
<Sequence>
<PlannerAgent promptsDir={promptsDir} createTools={createPlannerTools} />
<ForEach items={getTasks} itemMode="property" itemKey="task" errorMode="continue">
<AnalystAgent promptsDir={promptsDir} createTools={createAnalystTools} />
</ForEach>
<ForEach items={getTasks} itemMode="property" itemKey="task" errorMode="continue">
<WriterAgent promptsDir={promptsDir} createTools={createWriterTools} />
</ForEach>
<EditorAgent promptsDir={promptsDir} createTools={createEditorTools} />
</Sequence>
</Workflow>- Create a new Copilot SDK session for each
generate()call - Destroy session immediately after request completes via
finallyblock - Deity is stateless by design, using intelligent memory instead of session history
- Deity passes tools to LLM adapter; adapter decides implementation
- Copilot SDK uses
defineTool()and handles the tool invocation loop onPostToolUsehook tracks tool call history for Deity compatibilityexcludedToolsblocks all environment tools (bash, powershell, view, etc.)
- Generic tools (file_list, file_read, web_search): shared across agents
- Specialized tools (planning_create, memory_store, report_write): agent-specific
- Each agent gets a filtered subset via Tool Factory Pattern:
createTools: (ctx: ExecutionContext) => Tool[]
- Deity's
Validatorinterface separates tool execution from task completion validation - SDK handles execution, Deity controls the LLM loop, validators check completion criteria
- Validators provide feedback to guide LLM convergence across multiple rounds
Since SDK handles tools internally, extractOutput extracts results from the final LLM response (JSON in markdown code blocks) or from tool call history tracked via hooks.
@limo-labs/deity@^0.2.2
@limo-labs/deity-adapter-copilot@^0.2.2
@limo-labs/deity-tools@^0.2.1
@github/copilot-sdk@^0.1.29
zod@^4.3.6
src/
├── index.ts # CLI entry point
├── commands/
│ ├── analyze.tsx # Main analyze command (orchestration + TUI)
│ ├── analyze-init.ts # Initialization logic
│ ├── analyze-workflow.tsx # Workflow definition
│ └── analyze-save.ts # Result saving logic
├── agents/
│ ├── planner.tsx # Planner agent (JSX component)
│ ├── analyst.tsx # Analyst agent (JSX component)
│ ├── writer.tsx # Writer agent (JSX component)
│ ├── editor.tsx # Editor agent (JSX component)
│ └── planner-validator.ts # Planner validation logic
├── tools/
│ ├── index.ts # Tool registry and factory
│ ├── planning.tsx # Planning tools
│ ├── report.tsx # Report writing tools
│ ├── task.tsx # Task management tools
│ └── code-analysis.tsx # Code analysis tools
├── tui/ # Terminal UI (Ink/React)
│ ├── app.tsx # Main TUI application
│ ├── renderer.ts # Ink renderer
│ ├── console-fallback.ts # Non-TUI fallback
│ ├── progress-tracker.ts # Progress tracking
│ ├── types.ts # TUI type definitions
│ └── components/
│ ├── header.tsx
│ ├── task-log.tsx
│ ├── status-panel.tsx
│ └── stream-preview.tsx
├── report/
│ ├── diagrams.ts # Diagram generation
│ ├── graphCompiler.ts # Graph compilation
│ └── markdownGenerator.ts # Markdown report generation
├── types/
│ └── graphSemantics.ts # Graph semantic types
└── utils/
├── debug.ts # Debug logging (LIMO_DEBUG env var)
├── limoConfigParser.ts # LIMO.md config parser
└── reviewMonitor.ts # Review monitoring
prompts/
├── planner.md # Planner system prompt
├── analyst.md # Analyst system prompt
├── writer.md # Writer system prompt
└── editor.md # Editor system prompt
npm run build # TypeScript compilation
npm run dev # Build + run
npm run analyze # Build + run analyze command
# Example usage
node dist/index.js analyze . --modules architecture --output .limo
node dist/index.js analyze . --modules architecture,code-quality --lang English- Set
LIMO_DEBUG=1environment variable for debug logging - Use
--debug-apiflag to see Copilot SDK adapter debug output - Use
--verboseflag for detailed progress output