{"_id":"@abra-evolve/cli","name":"@abra-evolve/cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@abra-evolve/cli","version":"0.1.0","description":"Abra Evolve CLI - Connect to your AI agent backend","main":"dist/cli.js","types":"dist/index.d.ts","bin":{"abra":"bin/abra.js"},"scripts":{"build":"tsc","dev":"tsc --watch","prepublishOnly":"npm run build"},"keywords":["cli","ai","agent","abra","abra-evolve","typescript"],"author":{"name":"Abra Evolve"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/AbraEvolve/abra-evolve.git","directory":"cli"},"homepage":"https://github.com/AbraEvolve/abra-evolve#readme","bugs":{"url":"https://github.com/AbraEvolve/abra-evolve/issues"},"dependencies":{"commander":"^12.0.0","axios":"^1.6.0","chalk":"^4.1.2","ora":"^5.4.1","dotenv":"^16.4.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.3.0"},"engines":{"node":">=18.0.0"},"_id":"@abra-evolve/cli@0.1.0","gitHead":"a50723d9d4ff4ba0aa96805efe9452bb954f8cd8","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-8386tTkmw4ZrKutk2OsUNPHIvTGPz1vAZEQQLvRG8PB5eo4TjHDCYhHzJStqja7jLMnsVwwDRfZcvzV+fTSvsQ==","shasum":"c38acfda9c1555ac2f333d54d7c0a6e817c64fba","tarball":"https://registry.npmjs.org/@abra-evolve/cli/-/cli-0.1.0.tgz","fileCount":39,"unpackedSize":22870,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH1mfQJbgsvXbzmX17OkQrxLPfbpL5fl4aI3mu5EIroeAiBK2OPzm0mUTOoTR3GpTutAURx4OQXr4EJxHAENM8lsCg=="}]},"_npmUser":{"name":"colin-abra","email":"colin@abralabs.co"},"directories":{},"maintainers":[{"name":"colin-abra","email":"colin@abralabs.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0_1759640028870_0.7863508671005974"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-05T04:53:48.773Z","0.1.0":"2025-10-05T04:53:49.074Z","modified":"2025-10-05T04:53:49.396Z"},"maintainers":[{"name":"colin-abra","email":"colin@abralabs.co"}],"description":"Abra Evolve CLI - Connect to your AI agent backend","homepage":"https://github.com/AbraEvolve/abra-evolve#readme","keywords":["cli","ai","agent","abra","abra-evolve","typescript"],"repository":{"type":"git","url":"git+https://github.com/AbraEvolve/abra-evolve.git","directory":"cli"},"author":{"name":"Abra Evolve"},"bugs":{"url":"https://github.com/AbraEvolve/abra-evolve/issues"},"license":"MIT","readme":"# Abra Evolve CLI\n\nA lightweight CLI tool to interact with the Abra Evolve AI agent backend.\n\n## Installation\n\n### Global Installation (Recommended)\n\n```bash\nnpm install -g @abra-evolve/cli\n```\n\n### Local Development\n\n```bash\ncd cli\nnpm install\nnpm run build\nnpm link  # Creates global symlink for testing\n```\n\n## Usage\n\n```bash\n# Check backend status\nabra status\n\n# Chat with the agent\nabra chat \"Hello, how are you?\"\n\n# Get help\nabra --help\nabra chat --help\n```\n\n## Configuration\n\nCreate a `.env` file in your home directory or project:\n\n```bash\nABRA_API_URL=http://localhost:8000\nABRA_API_KEY=your-api-key  # Optional\n```\n\nOr set environment variables:\n\n```bash\nexport ABRA_API_URL=https://your-backend.com\n```\n\n## Adding New Commands\n\nAdding a new command is dead simple - just 3 steps:\n\n### Step 1: Create your command file\n\nCreate `src/commands/yourcommand.ts`:\n\n```typescript\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { apiClient } from \"../api/client\";\nimport { handleError } from \"../utils/error-handler\";\nimport type { YourResponse } from \"../types\";\n\nexport const yourCommand = new Command(\"yourcommand\")\n  .description(\"What your command does\")\n  .argument(\"<input>\", \"What the user should provide\")\n  .option(\"-f, --flag\", \"Optional flag\")\n  .action(async (input: string, options): Promise<void> => {\n    try {\n      console.log(chalk.blue(\"🚀 Doing something cool...\"));\n      const response = await apiClient.post<YourResponse>(\"/your-endpoint\", {\n        input,\n      });\n      console.log(chalk.green(\"✅ Done!\"), response.data);\n    } catch (error) {\n      handleError(error);\n    }\n  });\n```\n\n### Step 2: Register it\n\nAdd one line to `src/commands/index.ts`:\n\n```typescript\nimport { yourCommand } from \"./yourcommand\";\n\nexport function registerCommands(program: Command): void {\n  program.addCommand(chatCommand);\n  program.addCommand(statusCommand);\n  program.addCommand(yourCommand); // ← Add this line\n}\n```\n\n### Step 3: Rebuild\n\n```bash\nnpm run build\nabra yourcommand \"test\"\n```\n\n**That's it!** Your new command is now available.\n\n## Development\n\n```bash\n# Watch mode (rebuilds on file changes)\nnpm run dev\n\n# Build\nnpm run build\n\n# Test locally\nnpm link\nabra status\n```\n\n## Project Structure\n\n```\ncli/\n├── bin/\n│   └── abra.js              # Executable shim (3 lines)\n├── src/                     # 100% TypeScript source\n│   ├── cli.ts               # CLI entry point\n│   ├── index.ts             # Public exports\n│   ├── commands/            # ONE FILE = ONE COMMAND\n│   │   ├── index.ts         # ← Register commands here (1 line each)\n│   │   ├── chat.ts          # ← Command: abra chat\n│   │   ├── status.ts        # ← Command: abra status\n│   │   └── help.ts          # ← Command: abra help\n│   ├── api/\n│   │   └── client.ts        # Axios client with auth & error handling\n│   ├── types/\n│   │   └── index.ts         # Shared TypeScript types\n│   └── utils/\n│       └── error-handler.ts # Centralized error handling\n├── dist/                    # Compiled output (auto-generated)\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n### Organization Principle\n\n**ONE FILE = ONE COMMAND**\n\nEvery command lives in its own file in `src/commands/`:\n\n- `chat.ts` → `abra chat`\n- `status.ts` → `abra status`\n- `help.ts` → `abra help`\n- `yourcommand.ts` → `abra yourcommand`\n\nThen register it in `src/commands/index.ts` with one line:\n\n```typescript\nprogram.addCommand(yourCommand);\n```\n\nThat's it! No magic, everything is explicit.\n\n## Publishing\n\n```bash\n# Update version in package.json\nnpm version patch  # or minor, major\n\n# Build and publish\nnpm run build\nnpm publish --access public\n```\n","readmeFilename":"README.md","_rev":"1-bb4c97c159910d4c0580d040eb5a4b54"}