# Default job when you just run `bacon`
default_job = "build-mcp"

# Watch configuration for MCP
[jobs.check-mcp]
command = ["cargo", "check", "-p", "suno-mcp-server"]
# Watch the mcp directory specifically
watch = ["mcp/src", "mcp/Cargo.toml"]
default_watch = false
# Rebuild on any change in mcp/
apply_gitignore = true

[jobs.build-mcp]
command = ["bash", "-lc", "cargo build --release -p suno-mcp-server && root=$(pwd) && claude mcp remove suno-mcp-server && claude mcp add --scope user suno-mcp-server \"${root}/target/release/suno-mcp-server\""]
watch = ["mcp/src", "mcp/Cargo.toml"]
default_watch = false
need_stdout = true
background = true

[jobs.test-mcp]
command = ["cargo", "nextest", "run", "-p", "suno-mcp-server"]
watch = ["mcp/src", "mcp/Cargo.toml"]
default_watch = false
need_stdout = true
allow_warnings = true

# Check everything
[jobs.check-all]
command = ["cargo", "check", "--workspace"]

# Test everything with nextest
[jobs.test-all]
command = ["cargo", "nextest", "run", "--workspace"]
need_stdout = true

# TUI project
[jobs.check-tui]
command = ["cargo", "check", "-p", "suno-tui"]
watch = ["tui/src", "tui/Cargo.toml"]
default_watch = false

# Run the MCP server (for testing)
[jobs.run-mcp]
command = ["cargo", "run", "-p", "suno-mcp-server"]
need_stdout = true
background = false
on_change_strategy = "kill_then_restart"
kill = ["kill", "-s", "INT"]

# Keybindings
[keybindings]
m = "job:check-mcp"        # 'm' for MCP check
b = "job:build-mcp"        # 'b' for MCP build
t = "job:test-mcp"         # 't' for MCP test
a = "job:test-all"         # 'a' for all tests
u = "job:check-tui"        # 'u' for TUI check
r = "job:run-mcp"          # 'r' for run MCP server
