One command, infinite possibilities.
A powerful AI-powered CLI tool that executes complex development tasks with a single command. Built on top of assistant-code
and designed for maximum developer productivity.
# Install globally
npm install -g 1shot
# Set up your API key
export ANTHROPIC_API_KEY="your-api-key"
# Run a command
npx 1shot readme
- 🎯 One-shot execution - Complex tasks completed with a single command
- 🤖 Pre-configured AI assistants - Purpose-built for common development workflows
- 📋 Interactive command selector - Browse and select from available commands
- 🔄 Git-aware - Warns about uncommitted changes before execution
- ⏸️ ESC to pause - Interrupt execution safely at any time
- 🎨 Beautiful CLI - Built with Ink and React for an exceptional terminal experience
- 📊 Task summaries - Clear completion reports for every execution
Command | Description |
---|---|
assistant-ui |
Integrate assistant-ui into your project |
bug |
Find and fix bugs in your codebase |
fix-next-build |
Resolve Next.js build issues |
readme |
Generate comprehensive README files |
prd |
Create Product Requirements Documents with JTBD, RICE, and MoSCoW methodologies |
frenchify |
Translate project summaries to French |
upgrade-next |
Upgrade to the latest version of Next.js |
upgrade-react |
Upgrade to the latest version of React |
upgrade-typescript |
Upgrade to the latest version of TypeScript |
hello-world |
Simple greeting command for testing |
# Run a specific command
npx 1shot <command-name>
# Run with custom instructions
npx 1shot <command-name> "custom instructions here"
# Interactive mode - browse available commands
npx 1shot
# Generate a README for your project
npx 1shot readme
# Fix build issues with custom context
npx 1shot fix-next-build "Focus on TypeScript errors"
# Create a comprehensive PRD
npx 1shot prd "Build a task management app"
- Node.js (with ESM support)
- Anthropic API key
Set your API key using one of these environment variables:
export ANTHROPIC_API_KEY="your-api-key"
# or
export ASSISTANT_CODE_API_KEY="your-api-key"
# Global installation (recommended)
npm install -g 1shot
# Or run without installing
npx 1shot
This is a monorepo built with modern tooling:
1shot/
├── packages/
│ ├── 1shot/ # Main CLI tool
│ ├── landing/ # Next.js landing page
│ ├── assistant-ui-react-core/ # Core React components
│ └── tap/ # Additional utilities
├── pnpm-workspace.yaml # Workspace configuration
└── turbo.json # Build orchestration
- TypeScript - Type-safe development
- Node.js ESM - Modern JavaScript modules
- Vite - Fast build tooling
- Ink + React - Beautiful terminal UIs
- pnpm - Efficient package management
- Turbo - Monorepo build system
# Clone the repository
git clone https://github.com/assistant-ui/1shot.git
cd 1shot
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Start development mode
pnpm dev
- Edit
packages/1shot/src/registry.ts
- Add your command with system prompt and user prompt
- Build and test:
pnpm build && npx 1shot your-command
- Commands are defined in
registry.ts
with system and user prompts - CLI interface is built with Ink and React components
- Build system uses Vite for fast compilation
- Versioning managed with Changeset
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-command
- Add your command to the registry
- Test thoroughly:
pnpm build && npx 1shot your-command
- Submit a pull request
- Commands should solve common development tasks
- Include clear, specific system prompts
- Test with various project types
- Follow existing naming conventions
MIT License - see LICENSE for details.
Made with ❤️ by the Assistant UI team