@santi_padi/anita-cli
v0.1.1
Published
ANITA - Developer CLI for automating workflows
Maintainers
Readme
_ _ _ ___ _____ _
/ \ | \ | |_ _|_ _|/ \
/ _ \ | \| || | | | / _ \
/ ___ \| |\ || | | |/ ___ \
/_/ \_\_| \_|___| |_/_/ \_\ANITA CLI
ANITA is an internal developer CLI tool built with Node.js + Ink (React for the terminal) that automates developer workflows: deployments, repository management, auth setup, GitHub operations, code validation, bug fixes, Slack monitoring, and more.
Quick Start
# Install globally
npm install -g @internal/ANITA
# Set up authentication
bd auth setup
# See all commands
bd --helpCommands
| Command | Description |
|---|---|
| bd deploy | Deploy a service to target environment |
| bd repos | List and manage organization repositories |
| bd auth setup | Set up authentication tokens |
| bd github | GitHub operations: PRs, issues, actions |
| bd validate | Run code validation: type-check, lint, tests |
| bd fix | LLM-powered bug fixer |
| bd slack | Slack operations: resume, watch, send |
| bd logs | Live-tail logs from a service |
| bd ai | Interactive AI chat powered by Claude |
Examples
# Deploy to staging
bd deploy --env staging --service api
# List repos for an org
bd repos --org myorg
# Summarize missed Slack messages
bd slack --action resume --channel general
# Watch Slack for keywords
bd slack --action watch
# Run validation with auto-fix
bd validate --fix
# AI-powered bug fix
bd fix --file src/broken.ts
# Interactive AI chat
bd ai "explain this error"
# Live log tailing
bd logs --service api --env stagingConfiguration
Create a .ANITArc.json in your project root:
{
"githubOrg": "your-org",
"defaultEnv": "staging",
"slackWatchChannels": ["C01XXXXXX"],
"slackKeywords": ["urgent", "blocker", "outage"],
"llmModel": "claude-sonnet-4-20250514",
"llmMaxTokens": 4096,
"validatePaths": ["src/"],
"deployTargets": {
"api": {
"url": "https://deploy.example.com/api",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
},
"logs": {
"endpoint": "https://logs.example.com/tail",
"filters": ["level:error"],
"maxLines": 1000
}
}Supported config file formats: .ANITArc, .ANITArc.json, .ANITArc.yaml, ANITA.config.ts, ANITA.config.js
Contributing: Adding a New Command
ANITA is designed to be infinitely extensible. To add a new command:
- Create a folder:
src/commands/<your-command>/ - Create files:
command.ts— Clipanion command classindex.tsx— Ink UI component<name>.service.ts— Business logic<name>.types.ts— TypeScript types<name>.test.ts— Tests
- Register in
src/commands/registry.ts— import and add to theCOMMANDSarray
Architecture
src/
├── bin.tsx # Entry point
├── commands/ # Each command = 1 folder
│ └── <name>/
│ ├── command.ts # Clipanion definition
│ ├── index.tsx # Ink UI
│ └── *.service.ts # Business logic
├── components/ # Reusable Ink components
├── hooks/ # React hooks for services
├── services/ # Shared API clients
├── config/ # Configuration loading
├── types/ # Shared type definitions
└── utils/ # Utilities (env, errors, logger)Key patterns:
- Services are plain functions, framework-agnostic, throw domain errors
- Hooks bridge services and UI, manage loading/error/data state
- Components are pure presentational, never call services directly
- Commands wire everything together with Clipanion + Ink
Development
# Install dependencies
npm install
# Development mode (watch)
npm run dev
# Build
npm run build
# Run tests
npm test
# Type-check
npm run typecheck
# Lint
npm run lintTech Stack
- CLI Framework: Ink 5 + Clipanion 4
- Language: TypeScript 5.5+
- Runtime: Node.js >= 20
- Build: tsup
- HTTP: ky
- GitHub: Octokit
- Slack: @slack/web-api + @slack/socket-mode
- LLM: Anthropic Claude SDK
- Secrets: keytar (OS keychain)
- Testing: Vitest
- Validation: Zod
