Qwak 🦆
A command-line tool for creating shortcuts to AI agent prompts. Store agentic prompts as simple aliases and execute them with your preferred AI agent.
You can create a shortcut like fastapi and provide one-time instructions on what it should do. From then on you can just run:
# Claude starts installing FastAPI, create your custom boilerplate, etc.
Overview
Qwak allows you to save frequently used AI prompts as shortcuts and execute them quickly. Instead of retyping long prompts or searching through your history, create an alias once and run it with a simple command.
Installation
Or build from source:
Quick Start
-
Set an alias for a prompt:
-
Configure your AI agent (defaults to 'claude'):
-
Run your shortcut:
-
Enjoy autocompletion:
- Autocompletion is set up automatically on first run
- Tab-complete shortcuts:
qwk <TAB>shows all available shortcuts - Tab-complete commands:
qwk --<TAB>shows all available commands
Usage
Examples
Create Vite app with bun and clean up starter code.
with this prompt mapped to vite-react-swc:
Run `bun create vite . --template react-swc`
Run `bun install`.
Delete `src/assets/react.svg`, `public/vite.svg`, `App.css`
Run `bun add styled-components`.
Replace `src/index.css` with a very simple css reset containing just:
```css
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
```
Replace `src/App.jsx` with a simple component that creates a styled-components `Container` styled div and returns just `<Contianer>App</Container>`.
Have `Container` in `src/App.jsx` take up 100vw and 100vh.
Creating Shortcuts
Set a shortcut with an inline prompt:
Set a shortcut by piping from a file:
|
Set a shortcut interactively (paste your prompt):
# Paste your prompt and press Ctrl+D (Unix) or Ctrl+Z (Windows)
Running Shortcuts
Execute a shortcut:
Execute with additional agent arguments:
Configuration
Set the AI agent command (default: claude):
Set an agent with default arguments that will be passed on every call:
List all available shortcuts:
Remove a specific shortcut:
Set up autocompletion manually (usually automatic):
Reset all shortcuts (creates backup):
Configuration Files
Qwk stores its configuration in ~/.config/qwk/:
aliases.json- Your shortcuts and promptsagent- Your configured AI agent commandaliases_backup_YYYYMMDD_HHMMSS.json- Automatic backups when resetting
Examples
Web development:
Code review:
Documentation:
Managing shortcuts:
# List all available shortcuts
# Remove a shortcut you no longer need
# Reset all shortcuts (creates backup first)
Using agent with default arguments:
# Set agent with default args that apply to every call
# This will execute: claude --dangerously-skip-permissions --max-tokens=2000 "your prompt"
# This will execute: claude --dangerously-skip-permissions --max-tokens=2000 --temperature=0.7 "your prompt"
Autocompletion
Qwk automatically sets up shell autocompletion on first run for bash, zsh, and fish. This provides:
- Dynamic shortcut completion: Tab-complete any shortcut name
- Command completion: Tab-complete all
--commands - Always up-to-date: Completions automatically sync with your shortcuts
Supported Shells
- Bash: Adds completion to
~/.bashrcor~/.bash_profile - Zsh: Adds completion to
~/.zshrc - Fish: Adds completion to
~/.config/fish/config.fish
Manual Setup
If autocompletion wasn't set up automatically:
Then restart your shell or source your configuration file.
Commands
| Command | Description |
|---|---|
qwk <alias> |
Execute a saved shortcut |
qwk <alias> -- <args> |
Execute shortcut with agent arguments |
qwk --set <alias> [prompt] |
Create or update a shortcut |
qwk --agent <command> |
Set the AI agent command (with optional default args) |
qwk --list |
List all available shortcuts with previews |
qwk --remove <alias> |
Remove a specific shortcut |
qwk --setup-completion |
Set up shell autocompletion manually |
qwk --reset |
Reset all shortcuts (with backup) |
qwk --help |
Show help information |
Requirements
- Rust 1.70+ (for building from source)
- An AI agent command-line tool (like
claude,codex, etc.)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.