bash-agent-example
v1.3.0
Published
Interactive AI agent for exploring the ag-bash codebase
Downloads
119
Readme
File Explorer Agent
An interactive AI agent that lets you explore files and directories using natural language.
Uses @ag-bash/bash for the AI SDK integration.
Files
main.ts- Entry pointagent.ts- Agent logic (@ag-bash/bash + AI SDK)shell.ts- Interactive readline shell
Setup
Install dependencies:
npm installSet your Anthropic API key:
export ANTHROPIC_API_KEY=your-key-hereRun:
npm start
Usage
# Explore a specific directory
npx tsx main.ts /path/to/directory
# Explore the @ag-bash/bash project (default)
npx tsx main.tsAsk questions like:
- "What files are in here?"
- "Show me the contents of config.json"
- "Find all CSV files"
- "How many lines are in each file?"
- "Search for 'TODO' in the code"
Type exit to quit.
Development
npm run typecheck