Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.sh text eol=lf
*.yml text eol=lf
*.md text eol=lf
101 changes: 60 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,60 @@
<img width="1200" height="675" alt="Agent OS" src="https://github.com/user-attachments/assets/97ad4491-d199-4b9b-9482-ae710291dfb4" />

## Agents that build the way you would

[Agent OS](https://buildermethods.com/agent-os) helps you shape better specs, keeps agents aligned in a lightweight system that fits how you already build.

Works alongside Claude Code, Cursor, Antigravity, and other AI tools. Any language, any framework.

**Core capabilities:**

- **Discover Standards** — Extract patterns and conventions from your codebase into documented standards
- **Deploy Standards** — Intelligently inject relevant standards based on what you're building
- **Shape Spec** — Create better plans that lead to better builds
- **Index Standards** — Keep your standards organized and discoverable

---

### Documentation & Installation

Docs, installation, usage, & best practices 👉 [It's all here](https://buildermethods.com/agent-os)

---

### Follow updates & releases

Read the [changelog](CHANGELOG.md)

[Subscribe to be notified of major new releases of Agent OS](https://buildermethods.com/agent-os)

---

### Created by Brian Casel @ Builder Methods

Created by Brian Casel, the creator of [Builder Methods](https://buildermethods.com), where Brian helps professional software developers and teams build with AI.

Get Brian's free resources on building with AI:
- [Builder Briefing newsletter](https://buildermethods.com)
- [YouTube](https://youtube.com/@briancasel)

Join [Builder Methods Pro](https://buildermethods.com/pro) for official support and connect with our community of AI-first builders:

<img width="1200" height="675" alt="Agent OS" src="https://github.com/user-attachments/assets/97ad4491-d199-4b9b-9482-ae710291dfb4" />

## Agents that build the way you would

[Agent OS](https://buildermethods.com/agent-os) helps you shape better specs, keeps agents aligned in a lightweight system that fits how you already build.

Works alongside Claude Code, Cursor, Antigravity, and other AI tools. Any language, any framework.

**Core capabilities:**

- **Discover Standards** — Extract patterns and conventions from your codebase into documented standards
- **Deploy Standards** — Intelligently inject relevant standards based on what you're building
- **Shape Spec** — Create better plans that lead to better builds
- **Index Standards** — Keep your standards organized and discoverable

---

### Documentation & Installation

Docs, installation, usage, & best practices 👉 [It's all here](https://buildermethods.com/agent-os)

---

### Windows Users (Git Bash / MINGW)

If the installation script exits silently after displaying "Configuration:", this is caused by Windows-style line endings (CRLF).

**Option 1:** Convert line endings after cloning:

```bash
find ~/agent-os -type f \( -name "*.sh" -o -name "*.yml" \) | while read f; do
tr -d '\r' < "$f" > "$f.tmp" && mv "$f.tmp" "$f"
done
```

**Option 2:** Configure Git before cloning:

```bash
git config --global core.autocrlf false
```

---

### Follow updates & releases

Read the [changelog](CHANGELOG.md)

[Subscribe to be notified of major new releases of Agent OS](https://buildermethods.com/agent-os)

---

### Created by Brian Casel @ Builder Methods

Created by Brian Casel, the creator of [Builder Methods](https://buildermethods.com), where Brian helps professional software developers and teams build with AI.

Get Brian's free resources on building with AI:
- [Builder Briefing newsletter](https://buildermethods.com)
- [YouTube](https://youtube.com/@briancasel)

Join [Builder Methods Pro](https://buildermethods.com/pro) for official support and connect with our community of AI-first builders:
41 changes: 31 additions & 10 deletions scripts/project-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,28 @@
# Installs Agent OS into a project's codebase
# =============================================================================

set -e
# Auto-fix CRLF line endings on Windows/MINGW
if [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]]; then
SCRIPT_DIR_CHECK="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASE_DIR_CHECK="$(dirname "$SCRIPT_DIR_CHECK")"

# Check if any file has CRLF
if grep -rIl $'\r' "$SCRIPT_DIR_CHECK"/*.sh "$BASE_DIR_CHECK/config.yml" >/dev/null 2>&1; then
echo "Detected Windows line endings (CRLF). Converting to Unix format (LF)..."
find "$BASE_DIR_CHECK" -type f \( -name "*.sh" -o -name "*.yml" \) | while read f; do
tr -d '\r' < "$f" > "$f.tmp" && mv "$f.tmp" "$f"
done
echo "Conversion complete. Restarting script..."
echo ""
exec "$0" "$@"
fi
fi

# Retry mechanism: if AGENT_OS_RETRY is set, run without set -e
if [[ -z "$AGENT_OS_RETRY" ]]; then
set -e
trap 'echo ""; echo "Script failed. Retrying without strict mode..."; echo ""; AGENT_OS_RETRY=1 exec "$0" "$@"' ERR
fi

# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down Expand Up @@ -241,11 +262,11 @@ install_standards() {
grep -v "^${relative_path}|" "$sources_file" > "${sources_file}.tmp" 2>/dev/null || true
mv "${sources_file}.tmp" "$sources_file"
echo "${relative_path}|${profile_name}" >> "$sources_file"
((profile_file_count++))
((profile_file_count++)) || true
done < <(find "$profile_standards" -name "*.md" -type f ! -path "*/.backups/*" -print0 2>/dev/null)

if [[ "$profile_file_count" -gt 0 ]]; then
((profiles_used++))
((profiles_used++)) || true
fi
done <<< "$INHERITANCE_CHAIN"

Expand Down Expand Up @@ -335,11 +356,11 @@ create_index() {
local desc=$(get_existing_description "root" "$filename")
if [[ -z "$desc" ]]; then
desc="Needs description - run /index-standards"
((new_count++))
((new_count++)) || true
fi
echo " $filename:" >> "$temp_file"
echo " description: $desc" >> "$temp_file"
((entry_count++))
((entry_count++)) || true
done <<< "$root_files"
echo "" >> "$temp_file"
fi
Expand All @@ -357,11 +378,11 @@ create_index() {
local desc=$(get_existing_description "$folder_name" "$filename")
if [[ -z "$desc" ]]; then
desc="Needs description - run /index-standards"
((new_count++))
((new_count++)) || true
fi
echo " $filename:" >> "$temp_file"
echo " description: $desc" >> "$temp_file"
((entry_count++))
((entry_count++)) || true
done <<< "$md_files"
echo "" >> "$temp_file"
fi
Expand Down Expand Up @@ -399,7 +420,7 @@ install_commands() {
for file in "$commands_source"/*.md; do
if [[ -f "$file" ]]; then
cp "$file" "$commands_dest/"
((count++))
((count++)) || true
fi
done

Expand Down Expand Up @@ -447,7 +468,7 @@ main() {
done
chain_display="$chain_display"$'\n'"$indent ↳ inherits from: $profile_name"
fi
((chain_depth++))
((chain_depth++)) || true
done <<< "$reversed_chain"
echo "$chain_display"

Expand All @@ -474,4 +495,4 @@ main() {
}

# Run main function
main "$@"
main "$@"