add simple cli with repo path arg

tzemanovic
Jan 29, 2026, 4:17 PM
FTRAPDYAI3KKJDIGZX6PX3HZBYKLPRD5VZ2P5MZSAP2246OPWUOAC

Dependencies

Change contents

  • replacement in inflorescence/src/main.rs at line 54
    [10.66][14.499483:499552]()
    let repo_path = PathBuf::from("/home/tz/dev/inflorescence");
    [10.66]
    [12.144]
    const PATH_ARG: &str = "repository_path";
    let cli = clap::Command::new("Inflorescence")
    .bin_name("inflorescence")
    .version(clap::crate_version!())
    .about("GUI for version control backed by Pijul")
    .arg(clap::Arg::new(PATH_ARG).required(false).help(
    "Repository path to manage, absolute or relative (optional)",
    ));
    let matches = cli.get_matches();
    let repo_path = matches
    .get_one::<String>(PATH_ARG)
    .map(|path| std::fs::canonicalize(path).unwrap())
    .unwrap_or_else(|| PathBuf::from("/home/tz/dev/inflorescence"));
  • edit in inflorescence/Cargo.toml at line 27
    [2.3680]
    [6.6892]
    [dependencies.clap]
    workspace = true
  • edit in Cargo.toml at line 35
    [4.7808]
    [6.6931]
    [workspace.dependencies.clap]
    version = "4"
    features = ["cargo"]
  • edit in Cargo.lock at line 135
    [2.6612]
    [11.9495]
    ]
    [[package]]
    name = "anstream"
    version = "0.6.21"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
    dependencies = [
    "anstyle",
    "anstyle-parse",
    "anstyle-query",
    "anstyle-wincon",
    "colorchoice",
    "is_terminal_polyfill",
    "utf8parse",
    ]
    [[package]]
    name = "anstyle"
    version = "1.0.13"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
    [[package]]
    name = "anstyle-parse"
    version = "0.2.7"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
    dependencies = [
    "utf8parse",
    ]
    [[package]]
    name = "anstyle-query"
    version = "1.1.5"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
    dependencies = [
    "windows-sys 0.61.2",
  • edit in Cargo.lock at line 177
    [11.9510]
    [3.2786]
    name = "anstyle-wincon"
    version = "3.0.11"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
    dependencies = [
    "anstyle",
    "once_cell_polyfill",
    "windows-sys 0.61.2",
    ]
    [[package]]
  • edit in Cargo.lock at line 818
    [5.5628]
    [3.5183]
    ]
    [[package]]
    name = "clap"
    version = "4.5.55"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "3e34525d5bbbd55da2bb745d34b36121baac88d07619a9a09cfcf4a6c0832785"
    dependencies = [
    "clap_builder",
  • edit in Cargo.lock at line 830
    [3.5198]
    [2.16446]
    name = "clap_builder"
    version = "4.5.55"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "59a20016a20a3da95bef50ec7238dbd09baeef4311dcdd38ec15aba69812fb61"
    dependencies = [
    "anstream",
    "anstyle",
    "clap_lex",
    "strsim",
    ]
    [[package]]
    name = "clap_lex"
    version = "0.7.7"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
    [[package]]
  • edit in Cargo.lock at line 908
    [8.3436]
    [8.3436]
    [[package]]
    name = "colorchoice"
    version = "1.0.4"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
  • edit in Cargo.lock at line 2678
    [9.4884]
    [7.391]
    "clap",
  • edit in Cargo.lock at line 2774
    [13.8737]
    [13.8737]
    [[package]]
    name = "is_terminal_polyfill"
    version = "1.70.2"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
  • edit in Cargo.lock at line 3965
    [3.13928]
    [3.13928]
    name = "once_cell_polyfill"
    version = "1.70.2"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
    [[package]]
  • edit in Cargo.lock at line 5429
    [2.75427]
    [4.8367]
    name = "strsim"
    version = "0.11.1"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
    [[package]]
  • edit in Cargo.lock at line 6206
    [15.45904]
    [15.45904]
    name = "utf8parse"
    version = "0.2.2"
    source = "registry+https://github.com/rust-lang/crates.io-index"
    checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
    [[package]]