Context-Aware Workspace Automation
cawa (Context-Aware Workspace Automation) is a native, privacy-first tool for
defining per-project workflows. Stop cluttering your global shell history with
project-specific one-liners.
cs (Context Switcher) is the command-line interface for cawa.
Define local scripts that only exist where they matter.
- π Workspace-Isolated: Workflows live in
.cawa_cfg.jsonright next to your code. - π‘οΈ Context-First: Commands only execute when you are effectively "in" the project.
- π Native Speed: Built in Rust. Zero dependencies. Avg execution overhead < 5ms.
- β‘ Parallel Runner: Batch operations side-by-side with
-p. - π₯οΈ Interactive TUI: Visual alias selector with live search β press
/to filter. - π Notifications: Get a desktop ping when long-running tasks finish with
--notify. - βοΈ Shell Native: Pipes, chaining (
&&), and environment variables work as expected. - π Flexible Identity: Rename the binary to
do,run, ortaskand it adapts automatically. - β±οΈ Performance Metrics: Optional timing for your heavy build scripts.
- β° Timeouts: Automatically kill runaway commands after N seconds with
--timeout. - π
Last-run Tracking:
cs listshows when each alias was last executed. - π·οΈ Alias Descriptions: Document what each alias does with
--desc. - π Dry Run: Preview exactly what would execute before committing with
--dry-run. βΆοΈ One-off Runner: Usecs runfor quick parallel or timed commands without saving an alias.- π Global Aliases: Define cross-project aliases with
-g, stored in~/.config/cawa/config.json. - βοΈ In-place Edit:
cs edit <alias>opens the command in$EDITORwithout remove-and-re-add. - π§ Setup Wizard:
cs initwalks you through creating a config from scratch with interactive prompts.
brew tap mmiraly/tap
brew install cawacurl -fsSL https://raw.githubusercontent.com/mmiraly/cawa/main/scripts/install.sh | bash- Go to the Releases page.
- Download the archive for your OS/Architecture (e.g.,
cs-v1.0.0-darwin-arm64.tar.gz). - Extract and move to your path:
tar -xzf cs-*.tar.gz sudo mv cs /usr/local/bin/
Requirements: Rust Toolchain (cargo).
git clone https://github.com/mmiraly/cawa.git
cd cawa
cargo install --path .This installs the binary to ~/.cargo/bin, which must be in your $PATH.
git clone https://github.com/mmiraly/cawa.git
cd cawa
cargo build --release
sudo cp target/release/cs /usr/local/bin/New to a project? Run the interactive wizard to create your config:
cs initIt will ask for a project identifier, whether to enable timing, and optionally
seed your first alias β then writes .cawa_cfg.json ready to commit.
# Define a 'ship' workflow
cs add ship "cargo fmt && cargo test && git push"
# Add a description so teammates know what it does
cs add --desc "build and push to production" ship "cargo fmt && cargo test && git push"
# Kill the command if it runs longer than 120 seconds
cs add --timeout 120 build "cargo build --release"
# Create a 'wip' checkpoint
cs add wip "git add . && git commit -m 'wip'"
# Run multiple test suites in parallel
cs add -p quality "cargo test --lib" "npm run test:e2e"# Just run it
cs ship
# Pass arguments (passed through to the underlying command)
cs ship -- --force
# Preview what would run without executing
cs ship --dry-run
# Run a one-off command without saving an alias (supports --notify, --dry-run, timing)
cs run "cargo build --release"
cs run -p "cargo test" "npm run lint"cs list
cs remove ship
# Rename an alias without re-defining it
cs rename ship deploy
# Edit an alias command in your $EDITOR
cs edit shipDon't remember your alias names? Launch the interactive selector:
cs tui- Up/Down or j/k: Navigate
- Enter: Execute
- /: Start incremental search β type to filter aliases by name
- Esc: Clear search / exit
- q: Exit
Aliases defined with -g live in ~/.config/cawa/config.json and are
available in every project. Local aliases always override global ones with
the same name.
# Save to the global config instead of the project config
cs add -g gs "git status"
cs add -g gp "git push"
# Remove a global alias
cs remove -g gs
# Global aliases appear in cs list with a [global] tag
cs listGet a desktop notification when a command finishes (success or fail). Great for long builds!
# Works with any alias
cs test --notify
# Works with parallel commands too
cs build --notifyThe config lives in .cawa_cfg.json. It is meaningful to commit this file to
git so your team shares the same aliases!
A separate .cawa_state.json file tracks local run timestamps (used by
cs list to show last-run age). Add it to .gitignore β it's machine-local.
{
"enable_timing": true,
"aliases": {
"release": "./scripts/release.sh",
"test": {
"run": "cargo test --all",
"description": "run the full test suite"
},
"ci": {
"parallel": ["cargo test", "cargo clippy", "cargo fmt --check"],
"description": "everything the CI pipeline checks"
}
}
}We welcome contributions!
- Fork the repo.
- Create feature branch (
git checkout -b feature/cool-thing). - Commit changes (
git commit -m 'Add cool thing'). - Push to branch.
- Open a Pull Request.
git clone https://github.com/mmiraly/cawa.git
cd cawa
cargo build
./target/debug/cs --helpCopyright (C) 2026
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
See LICENSE for details.
