Skip to content
Merged
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
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ flowchart TD
curl -fsSL https://raw.githubusercontent.com/Conava/claude-devline/main/install.sh | bash
```

Installs Claude Code (if missing), the devline plugin, and the recommended companions (RTK, Ponytail, Basic Memory). Works on **Linux** (apt/pacman/dnf/zypper/apk), **macOS** (Homebrew), and **Windows via WSL or Git Bash** — it prompts before installing any missing underlying tool. Review the script first if you like. Flags: `--minimal` (devline only), `--skip-rtk`/`--skip-ponytail`/`--skip-memory`, `--yes` (non-interactive). Example: `curl -fsSL https://raw.githubusercontent.com/Conava/claude-devline/main/install.sh | bash -s -- --minimal`.
Installs Claude Code (if missing), the devline plugin, and the recommended companions (RTK, Ponytail). Works on **Linux** (apt/pacman/dnf/zypper/apk), **macOS** (Homebrew), and **Windows via WSL or Git Bash** — it prompts before installing any missing underlying tool. Review the script first if you like. Flags: `--minimal` (devline only), `--skip-rtk`/`--skip-ponytail`, `--yes` (non-interactive). Example: `curl -fsSL https://raw.githubusercontent.com/Conava/claude-devline/main/install.sh | bash -s -- --minimal`.

### From the marketplace

Expand Down Expand Up @@ -78,18 +78,13 @@ For zero prompts on long unattended runs you can also add `--dangerously-skip-pe

## Recommended companions

Optional, but they make devline leaner and more capable — `/devline:setup` offers to install all three. The [quick installer](#quick-install) sets up all three automatically, and wires Basic Memory through a per-session MCP wrapper so parallel Claude sessions each bind to their own repo's `memory/` project (multi-session-safe).
Optional, but they make devline leaner and more capable — `/devline:setup` offers to install both, and the [quick installer](#quick-install) sets up both automatically.

- **[RTK](https://github.com/rtk-ai/rtk)** — a CLI proxy that filters command-output noise for 60-90% token savings. devline runs many parallel agents issuing Bash commands, so it compounds.
```bash
curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
rtk init -g
```
- **[Basic Memory](https://github.com/basicmachines-co/basic-memory)** — local-first, per-project memory stored as plain Markdown you commit to the repo, retrieved on demand so it never bloats context. Persistent cross-session recall in any Claude Code session, not just devline.
```bash
uv tool install basic-memory
claude mcp add basic-memory -- uvx basic-memory mcp
```
- **[Ponytail](https://github.com/DietrichGebert/ponytail)** — a separate Claude Code plugin that keeps generated code minimal (YAGNI, stdlib-first, shortest working diff). It composes with devline: devline enforces the process, ponytail keeps the code it produces lean.
```
/plugin marketplace add DietrichGebert/ponytail
Expand Down Expand Up @@ -708,7 +703,7 @@ Scans your text against 60+ known AI writing patterns (negative parallelism, tri
- **`/compact` at ~70% context.** The PreCompact hook preserves pipeline state automatically. Pass focus instructions: `/compact Focus on the API changes`.
- **Use `/devline:implement` for well-defined tasks.** Skip brainstorming when you already know exactly what to build.
- **Use `/devline:debug` instead of manual debugging.** The scientific method catches root causes faster than reading code and guessing.
- **Install the [recommended companions](#recommended-companions).** RTK, Basic Memory, and Ponytail — `/devline:setup` offers all three.
- **Install the [recommended companions](#recommended-companions).** RTK and Ponytail — `/devline:setup` offers both.

---

Expand Down
76 changes: 8 additions & 68 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,29 @@ set -euo pipefail
# devline one-command installer.
#
# Installs Claude Code (if missing), the devline plugin, and the recommended
# companions (RTK, Ponytail, Basic Memory). Cross-platform: Linux (apt, pacman,
# dnf, zypper, apk), macOS (Homebrew), and Windows via WSL or Git Bash.
# companions (RTK, Ponytail). Cross-platform: Linux (apt, pacman, dnf, zypper,
# apk), macOS (Homebrew), and Windows via WSL or Git Bash.
#
# Safe to re-run — every step checks first, and optional steps warn-and-continue
# instead of aborting. Missing UNDERLYING tools (a package manager, uv, node, jq,
# git, gh, Claude Code) are offered before installing; the devline plugin and the
# instead of aborting. Missing UNDERLYING tools (a package manager, node, jq, git,
# gh, Claude Code) are offered before installing; the devline plugin and the
# companions install by default (gate them with --minimal / --skip-*).
#
# Review this script before running it. Usage:
# bash install.sh # everything (prompts before installing missing tools)
# bash install.sh --yes # assume "yes" to every prompt (non-interactive / CI)
# bash install.sh --minimal # devline only, no companions
# bash install.sh --skip-rtk --skip-ponytail --skip-memory # skip specific companions
# bash install.sh --skip-rtk --skip-ponytail # skip specific companions
#
# On Windows: run inside WSL (recommended) or Git Bash. No native PowerShell installer.

# ---- flags ------------------------------------------------------------------
MINIMAL=0; SKIP_RTK=0; SKIP_PONYTAIL=0; SKIP_MEMORY=0; ASSUME_YES=0
MINIMAL=0; SKIP_RTK=0; SKIP_PONYTAIL=0; ASSUME_YES=0
for arg in "$@"; do
case "$arg" in
--minimal) MINIMAL=1 ;;
--skip-rtk) SKIP_RTK=1 ;;
--skip-ponytail) SKIP_PONYTAIL=1 ;;
--skip-memory) SKIP_MEMORY=1 ;;
-y|--yes) ASSUME_YES=1 ;;
-h|--help) grep '^#' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
*) echo "[devline] unknown option: $arg (ignored)" ;;
Expand Down Expand Up @@ -86,7 +85,7 @@ pkg_install() {
zypper) case "$pkg" in node) m=nodejs;; esac; $SUDO zypper --non-interactive install "$m" ;;
apk) case "$pkg" in node) m=nodejs;; gh) m=github-cli;; esac; $SUDO apk add "$m" ;;
brew) case "$pkg" in node) m=node;; esac; brew install "$m" ;;
winget) case "$pkg" in git) m=Git.Git;; jq) m=jqlang.jq;; gh) m=GitHub.cli;; node) m=OpenJS.NodeJS;; uv) m=astral-sh.uv;; curl) m=cURL.cURL;; *) m="$pkg";; esac
winget) case "$pkg" in git) m=Git.Git;; jq) m=jqlang.jq;; gh) m=GitHub.cli;; node) m=OpenJS.NodeJS;; curl) m=cURL.cURL;; *) m="$pkg";; esac
winget install -e --id "$m" --accept-source-agreements --accept-package-agreements ;;
scoop) scoop install "$pkg" ;;
choco) choco install -y "$pkg" ;;
Expand All @@ -106,21 +105,6 @@ ensure_tool() {
fi
}

# uv — package manager first (widely packaged), official astral installer as fallback.
ensure_uv() {
command -v uv >/dev/null 2>&1 && { log "present: uv"; return 0; }
if [ -n "$PM" ] && confirm "uv (Python tool, needed for Basic Memory) is missing. Install via $PM?"; then
if step "install uv ($PM)" pkg_install uv && command -v uv >/dev/null 2>&1; then return 0; fi
warn "uv not available via $PM — falling back to the official installer."
fi
if confirm "Install uv via the official astral.sh installer?"; then
step "install uv (astral)" bash -c 'curl -LsSf https://astral.sh/uv/install.sh | sh'
export PATH="$HOME/.local/bin:$PATH"; command -v uv >/dev/null 2>&1
else
return 1
fi
}

# ---- prerequisites ----------------------------------------------------------
ensure_tool git "git" || warn "git is required for most devline features."
ensure_tool curl "curl" || true
Expand Down Expand Up @@ -177,50 +161,6 @@ else
log "skipping Ponytail"
fi

# ---- Basic Memory (installs by default; offers uv if missing) --------------
if [ "$MINIMAL" -eq 0 ] && [ "$SKIP_MEMORY" -eq 0 ]; then
log "installing Basic Memory"
if ensure_uv; then
export PATH="$HOME/.local/bin:$PATH"
step "uv tool install basic-memory" uv tool install basic-memory
# Per-session MCP wrapper — quoted heredoc so nothing expands at write time.
mkdir -p "$HOME/.claude/mcp"
cat > "$HOME/.claude/mcp/basic-memory-cwd.sh" <<'WRAPPER'
#!/usr/bin/env bash
# Per-session Basic Memory MCP server, bound to the current repo's project —
# or, when not inside a git repo, to the current directory. One stdio server
# per Claude session (in that session's cwd) pins to its own project via
# --project, so parallel sessions never clobber a shared "active project",
# and a non-git root (e.g. a container of nested repos) still gets its own
# isolated project instead of dumping into the shared default.
export PATH="$HOME/.local/bin:$PATH"
root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
if [ -n "$root" ]; then
name=$(basename "$root")
if ! basic-memory project list 2>/dev/null | grep -qw "$name"; then
mkdir -p "$root/memory"
basic-memory project add "$name" "$root/memory" >/dev/null 2>&1 || true
fi
exec basic-memory mcp --project "$name"
fi
exec basic-memory mcp
WRAPPER
chmod +x "$HOME/.claude/mcp/basic-memory-cwd.sh"
log "wrote $HOME/.claude/mcp/basic-memory-cwd.sh"
if have_claude; then
claude mcp remove basic-memory >/dev/null 2>&1 || true
step "register basic-memory MCP" claude mcp add --scope user basic-memory -- bash "$HOME/.claude/mcp/basic-memory-cwd.sh"
claude plugin marketplace add basicmachines-co/basic-memory-plugins || true
claude plugin install basic-memory@basicmachines-co || true
fi
INSTALLED+=("Basic Memory (per-session MCP wrapper)")
else
warn "uv unavailable — skipped Basic Memory. Install uv, then re-run."
fi
else
log "skipping Basic Memory"
fi

# ---- summary ----------------------------------------------------------------
echo
log "===== install summary ====="
Expand All @@ -232,7 +172,7 @@ fi
echo
log "Next steps:"
[ "$CLAUDE_JUST_INSTALLED" -eq 1 ] && log " 1. Run 'claude' once to authenticate (browser login)."
log " * Restart Claude Code so new MCP servers and plugins load."
log " * Restart Claude Code so new plugins load."
log " * Run '/devline:setup' inside each project to configure it."
case "$OS" in MINGW*|MSYS*|CYGWIN*) log " * On Windows, WSL gives the smoothest experience if anything above failed." ;; esac
for note in "${NOTES[@]-}"; do [ -n "$note" ] && log " note: $note"; done
31 changes: 1 addition & 30 deletions skills/setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ If there are non-default settings, assemble the file using the output format fro

### 3. Recommended additions (optional)

Three optional companions make devline leaner and more capable. Offer all three — the user can accept any subset. For each: check if it's already present (note it and skip if so), otherwise briefly explain it and ask whether to install. If a step fails, show the error and point to the tool's repo for manual install.
Two optional companions make devline leaner and more capable. Offer both — the user can accept any subset. For each: check if it's already present (note it and skip if so), otherwise briefly explain it and ask whether to install. If a step fails, show the error and point to the tool's repo for manual install.

**RTK (Rust Token Killer)** — a CLI proxy that cuts token use 60-90% on common commands (git, ls, grep, test runners, builds) by filtering noise before it reaches context. devline runs many parallel agents issuing Bash commands, so the savings compound.
- Check: `which rtk`.
Expand All @@ -76,35 +76,6 @@ Three optional companions make devline leaner and more capable. Offer all three
2. `rtk init -g` — registers the auto-rewrite hook in `~/.claude/settings.json`
3. Verify: `rtk --version`

**Basic Memory** — local-first, per-project memory stored as plain Markdown you commit to the repo, retrieved on demand so it never bloats context. Gives agents persistent, cross-session recall of project decisions and corrections. Works in any Claude Code session, not just devline.
- Check: `which basic-memory`.
- If accepted (multi-session-safe setup — each Claude session binds to its own repo's `memory/` project via a per-session MCP wrapper, so parallel sessions never clobber a shared "active project"):
1. `uv tool install basic-memory`
2. Write the per-session MCP wrapper to `~/.claude/mcp/basic-memory-cwd.sh` (create `~/.claude/mcp/` if needed) and `chmod +x` it, with exactly this content:
```bash
#!/usr/bin/env bash
# Per-session Basic Memory MCP server, bound to the current repo's project —
# or, when not inside a git repo, to the current directory. One stdio server
# per Claude session (in that session's cwd) pins to its own project via
# --project, so parallel sessions never clobber a shared "active project",
# and a non-git root (e.g. a container of nested repos) still gets its own
# isolated project instead of dumping into the shared default.
export PATH="$HOME/.local/bin:$PATH"
root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
if [ -n "$root" ]; then
name=$(basename "$root")
if ! basic-memory project list 2>/dev/null | grep -qw "$name"; then
mkdir -p "$root/memory"
basic-memory project add "$name" "$root/memory" >/dev/null 2>&1 || true
fi
exec basic-memory mcp --project "$name"
fi
exec basic-memory mcp
```
3. `claude mcp add --scope user basic-memory -- bash ~/.claude/mcp/basic-memory-cwd.sh`
4. Optionally add its official Claude Code plugin (`basic-memory@basicmachines-co`) for session-start recall + the `memory-defrag`/`memory-reflect` consolidation skills.
- For a full machine setup, the repo's `install.sh` does all of this plus devline + the other companions.

**Ponytail** — a separate Claude Code plugin that keeps generated code minimal (YAGNI, stdlib-first, shortest working diff). It composes with devline: devline enforces the process, ponytail keeps the code lean.
- Check: whether the ponytail plugin is already enabled (look in `~/.claude/plugins` or the user's enabled plugins).
- If accepted: it's a plugin, so have the **user** run these interactive commands (this skill can't invoke `/plugin` itself):
Expand Down
Loading