Skip to content

Commit 5c62f4a

Browse files
author
Claude
committed
Merge PR microsoft#44 - AI-First Principles and PR microsoft#7 - Global Amplifier access
2 parents 4e15763 + 749a03a commit 5c62f4a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+23074
-3
lines changed

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
".vscode",
1515
".claude",
1616
".ai",
17-
"~/amplifier"
17+
"~/dev/amplifier"
1818
]
1919
},
2020
"enableAllProjectMcpServers": false,

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ __pycache__
1818
.ruff_cache
1919
.cache
2020
*.egg-info
21-
bin
21+
# bin directory for build artifacts (but allow our global command)
22+
# bin
2223
obj
2324
dist
2425
build

Makefile

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ default: ## Show essential commands
2121
@echo ""
2222
@echo "Quick Start:"
2323
@echo " make install Install all dependencies"
24+
@echo " make install-global Install global 'amplifier' command"
2425
@echo ""
2526
@echo "Knowledge Base:"
2627
@echo " make knowledge-update Full pipeline: extract & synthesize"
@@ -74,6 +75,7 @@ help: ## Show ALL available commands
7475
@echo ""
7576
@echo "QUICK START:"
7677
@echo " make install Install all dependencies"
78+
@echo " make install-global Install global 'amplifier' command"
7779
@echo ""
7880
@echo "KNOWLEDGE BASE:"
7981
@echo " make knowledge-update Full pipeline: extract & synthesize"
@@ -165,6 +167,9 @@ install: ## Install all dependencies
165167
@echo ""
166168
@echo "✅ All dependencies installed!"
167169
@echo ""
170+
@echo "💡 For global access to Amplifier from any directory:"
171+
@echo " make install-global"
172+
@echo ""
168173
@if [ -n "$$VIRTUAL_ENV" ]; then \
169174
echo "✓ Virtual environment already active"; \
170175
elif [ -f .venv/bin/activate ]; then \
@@ -173,6 +178,67 @@ install: ## Install all dependencies
173178
echo "✗ No virtual environment found. Run 'make install' first."; \
174179
fi
175180

181+
# Global installation
182+
install-global: ## Install global 'amplifier' command for system-wide access
183+
@echo "Installing global Amplifier command..."
184+
@if [ ! -f .venv/bin/activate ]; then \
185+
echo "❌ Please run 'make install' first to create the virtual environment"; \
186+
exit 1; \
187+
fi
188+
@mkdir -p ~/bin
189+
@cp bin/amplifier ~/bin/amplifier
190+
@chmod +x ~/bin/amplifier
191+
@echo "✅ Global 'amplifier' command installed to ~/bin/amplifier"
192+
@echo ""
193+
@if echo "$$PATH" | grep -q "$$HOME/bin"; then \
194+
echo "✓ ~/bin is already in your PATH"; \
195+
else \
196+
echo "💡 Add ~/bin to your PATH for global access:"; \
197+
if [ -n "$$ZSH_VERSION" ] || [ "$$SHELL" = "/bin/zsh" ] || [ -f ~/.zshrc ]; then \
198+
echo ' echo "export PATH="\$$HOME/bin:\$$PATH"" >> ~/.zshrc'; \
199+
echo " source ~/.zshrc"; \
200+
else \
201+
echo ' echo "export PATH="\$$HOME/bin:\$$PATH"" >> ~/.bashrc'; \
202+
echo " source ~/.bashrc"; \
203+
fi; \
204+
fi
205+
@echo ""
206+
@echo "Usage: amplifier [project-dir] [claude-options]"
207+
@echo "Example: amplifier ~/my-project --model sonnet"
208+
209+
install-global-system: ## Install global 'amplifier' command system-wide (requires sudo)
210+
@echo "Installing system-wide Amplifier command..."
211+
@if [ ! -f .venv/bin/activate ]; then \
212+
echo "❌ Please run 'make install' first to create the virtual environment"; \
213+
exit 1; \
214+
fi
215+
@echo "This will install to /usr/local/bin and requires sudo privileges."
216+
@read -p "Continue? [y/N] " -n 1 -r; echo; \
217+
if [[ $$REPLY =~ ^[Yy]$$ ]]; then \
218+
sudo cp bin/amplifier /usr/local/bin/amplifier; \
219+
sudo chmod +x /usr/local/bin/amplifier; \
220+
echo "✅ Global 'amplifier' command installed to /usr/local/bin/amplifier"; \
221+
else \
222+
echo "Installation cancelled."; \
223+
fi
224+
225+
uninstall-global: ## Remove global 'amplifier' command
226+
@echo "Removing global Amplifier command..."
227+
@if [ -f ~/bin/amplifier ]; then \
228+
rm ~/bin/amplifier; \
229+
echo "✅ Removed ~/bin/amplifier"; \
230+
else \
231+
echo "✓ ~/bin/amplifier not found"; \
232+
fi
233+
@if [ -f /usr/local/bin/amplifier ]; then \
234+
echo "System-wide installation found at /usr/local/bin/amplifier"; \
235+
read -p "Remove it? (requires sudo) [y/N] " -n 1 -r; echo; \
236+
if [[ $$REPLY =~ ^[Yy]$$ ]]; then \
237+
sudo rm /usr/local/bin/amplifier; \
238+
echo "✅ Removed /usr/local/bin/amplifier"; \
239+
fi; \
240+
fi
241+
176242
# Code quality
177243
check: ## Format, lint, and type-check all code
178244
@# Handle worktree virtual environment issues by unsetting mismatched VIRTUAL_ENV

README.md

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,131 @@ We've taken our learnings about what works in AI-assisted development and packag
123123

124124
---
125125

126+
5. **Install global access** (Optional but recommended):
127+
```bash
128+
make install-global
129+
```
130+
131+
This installs the `amplifier` command globally, letting you use Amplifier on any project from anywhere:
132+
133+
```bash
134+
cd ~/my-other-project
135+
amplifier # Starts Claude with Amplifier agents for this project
136+
```
137+
126138
## 📖 How to Use Amplifier
127139

128140
### Create Amplifier-powered Tools for Scenarios
129141

130142
Amplifier is designed so **you can create new AI-powered tools** just by describing how they should think. See the [Create Your Own Tools](docs/CREATE_YOUR_OWN_TOOLS.md) guide for more information.
131143

132-
### Explore Ampifier's agents on your code
144+
### Explore Amplifier's Agents on Your Code
133145

134146
Try out one of the specialized experts:
135147

136148
- "Use the zen-architect agent to design my application's caching layer"
137149
- "Deploy bug-hunter to find why my login system is failing"
138150
- "Have security-guardian review my API implementation for vulnerabilities"
139151

152+
### Global Usage: Amplifier on Any Project 🌍
153+
154+
**The power of Amplifier is no longer confined to the Amplifier directory.** Use all 20+ specialized agents, knowledge extraction, and automation tools on any codebase, anywhere on your system.
155+
156+
#### Method 1: Global Command (Recommended)
157+
158+
After running `make install-global`, use Amplifier from any directory:
159+
160+
```bash
161+
# Work on any project
162+
cd ~/my-web-app
163+
amplifier
164+
165+
# Or specify a different project
166+
amplifier ~/dev/my-python-api
167+
168+
# Pass Claude options
169+
amplifier ~/my-project --model sonnet
170+
amplifier ~/my-app --print "Fix the authentication bug"
171+
```
172+
173+
#### Method 2: From Amplifier Directory
174+
175+
If you prefer not to install globally:
176+
177+
```bash
178+
cd ~/dev/amplifier
179+
./amplifier-anywhere.sh ~/path/to/your/project
180+
181+
# Or with Claude options
182+
./amplifier-anywhere.sh ~/my-app --model sonnet
183+
```
184+
185+
#### Method 3: Manual Setup
186+
187+
For maximum control:
188+
189+
```bash
190+
cd ~/dev/amplifier
191+
source .venv/bin/activate
192+
claude --add-dir /path/to/your/project
193+
```
194+
195+
#### Usage Template
196+
197+
**Important**: When Claude starts, always begin with this message template:
198+
199+
```
200+
I'm working in [YOUR_PROJECT_PATH] which doesn't have Amplifier files.
201+
Please cd to that directory and work there.
202+
Do NOT update any issues or PRs in the Amplifier repo.
203+
204+
Use [AGENT_NAME] to [TASK_DESCRIPTION].
205+
```
206+
207+
**Examples**:
208+
- `"Use zen-architect to design my application's caching layer"`
209+
- `"Deploy bug-hunter to find why my login system is failing"`
210+
- `"Have security-guardian review my API implementation for vulnerabilities"`
211+
- `"Use modular-builder to implement the user profile feature"`
212+
213+
#### Global Benefits
214+
215+
**All 20+ specialized agents** work on your projects
216+
**Shared knowledge base** - insights from one project help others
217+
**Same powerful automation** - quality checks, parallel development
218+
**Project isolation** - changes only affect your target project
219+
**Works anywhere** - no need to copy files or modify your projects
220+
221+
#### Troubleshooting Global Access
222+
223+
**Command not found: `amplifier`**
224+
```bash
225+
# Check if ~/bin is in PATH
226+
echo $PATH | grep $HOME/bin
227+
228+
# Add to PATH if missing
229+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
230+
source ~/.zshrc
231+
```
232+
233+
**Cannot find Amplifier installation**
234+
```bash
235+
# The global command looks for Amplifier in these locations:
236+
# - ~/dev/amplifier (most common)
237+
# - ~/amplifier
238+
# - ~/repos/amplifier
239+
# - ~/code/amplifier
240+
241+
# Create a symlink if needed
242+
ln -s /path/to/your/amplifier ~/dev/amplifier
243+
```
244+
245+
**Get help anytime**
246+
```bash
247+
amplifier --help # Show usage help
248+
amplifier --version # Show version info
249+
```
250+
140251
### Parallel Development
141252

142253
**Why use this?** Stop wondering "what if" — build multiple solutions simultaneously and pick the winner.

0 commit comments

Comments
 (0)