nikivdev/code · error

Bike.app not found at {}

Error message

Bike.app not found at {}

What it means

Raised by open_bike (src/todo.rs:80) when the Bike.app application bundle is not present at the hardcoded path /System/Volumes/Data/Applications/Bike.app. Before invoking `open -a Bike.app <file>`, the code checks bike_app.exists() and bails if the bundle is missing, because macOS `open` would otherwise fail obscurely.

Source

Thrown at src/todo.rs:80

        .map(|name| name.to_string())
        .filter(|name| !name.trim().is_empty())
        .unwrap_or_else(|| "project".to_string());

    let dir = root.join(".ai").join("todos");
    let path = dir.join(format!("{}.bike", project_name));
    fs::create_dir_all(&dir)?;
    let needs_init = match fs::read_to_string(&path) {
        Ok(content) => !looks_like_bike(&content),
        Err(_) => true,
    };
    if needs_init {
        let content = render_bike_template(&project_name);
        fs::write(&path, content)?;
    }

    let bike_app = Path::new("/System/Volumes/Data/Applications/Bike.app");
    if !bike_app.exists() {
        bail!("Bike.app not found at {}", bike_app.display());
    }

    let status = Command::new("open")
        .arg("-a")
        .arg(bike_app)
        .arg(&path)
        .status()
        .context("failed to launch Bike.app")?;
    if !status.success() {
        bail!("Bike.app failed to open {}", path.display());
    }

    Ok(())
}

fn looks_like_bike(content: &str) -> bool {
    let trimmed = content.trim_start();
    if !trimmed.starts_with("<?xml") {

View on GitHub (pinned to a747e741ae)

Solutions

  1. Install Bike.app, or if already installed, symlink it to /System/Volumes/Data/Applications/Bike.app (e.g. `ln -s /Applications/Bike.app /System/Volumes/Data/Applications/Bike.app`).
  2. Check the actual install location with `mdfind Bike.app` and adjust or patch the hardcoded path.
  3. Skip the open step or use a different todo app if Bike.app is not available.

Example fix

// before
let bike_app = Path::new("/System/Volumes/Data/Applications/Bike.app");
// after: tolerate common install locations
let bike_app = ["/System/Volumes/Data/Applications/Bike.app", "/Applications/Bike.app"]
    .iter().map(Path::new).find(|p| p.exists())
    .ok_or_else(|| anyhow!("Bike.app not found"))?;
Defensive patterns

Strategy: validation

Validate before calling

use std::path::Path;
let candidates = ["/System/Volumes/Data/Applications/Bike.app", "/Applications/Bike.app"];
if !candidates.iter().any(|p| Path::new(p).exists()) {
    eprintln!("Bike.app is not installed at any known location");
}

Try / catch

match result {
    Err(e) if e.to_string().starts_with("Bike.app not found") => {
        eprintln!("install Bike.app or symlink it into /System/Volumes/Data/Applications");
    }
    Err(e) => return Err(e),
    Ok(v) => v,
}

Prevention

When it happens

Trigger: Calling the todo open command (via run) on a machine where Bike.app (the macOS outliner) is not installed, is installed only in ~/Applications or /Applications instead of the expected path, or was moved/renamed/uninstalled.

Common situations: Fresh macOS installs without Bike.app; apps installed per-user in ~/Applications while the code probes the system /System/Volumes/Data/Applications path; running the tool on Linux/CI where the path never exists.

Related errors


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/de00d1f0dc5c4b54. Report an issue: GitHub.