{"id":13900781,"url":"https://github.com/lusingander/cargo-selector","last_synced_at":"2025-04-14T10:52:43.470Z","repository":{"id":232751196,"uuid":"785126459","full_name":"lusingander/cargo-selector","owner":"lusingander","description":"Cargo subcommand to select and execute binary/example targets 📦","archived":false,"fork":false,"pushed_at":"2024-04-25T13:12:27.000Z","size":1023,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-30T07:17:31.658Z","etag":null,"topics":["cargo","cargo-plugin","cargo-subcommand","ratatui","tui"],"latest_commit_sha":null,"homepage":"https://lusingander.github.io/cargo-selector/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lusingander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-11T08:49:13.000Z","updated_at":"2024-05-03T09:35:39.456Z","dependencies_parsed_at":"2024-04-16T09:41:51.424Z","dependency_job_id":"771f99d6-233a-4cca-a430-87cccd00e090","html_url":"https://github.com/lusingander/cargo-selector","commit_stats":null,"previous_names":["lusingander/cargo-selector"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fcargo-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fcargo-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fcargo-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Fcargo-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lusingander","download_url":"https://codeload.github.com/lusingander/cargo-selector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868808,"owners_count":21174755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","cargo-plugin","cargo-subcommand","ratatui","tui"],"created_at":"2024-08-06T21:00:26.792Z","updated_at":"2025-04-14T10:52:43.464Z","avatar_url":"https://github.com/lusingander.png","language":"Rust","readme":"# cargo-selector\n\n[![Crate Status](https://img.shields.io/crates/v/cargo-selector.svg)](https://crates.io/crates/cargo-selector)\n\nCargo subcommand to select and execute binary/example targets\n\n\u003cimg src=\"./img/demo.gif\" width=800\u003e\n\n(This demo uses [Ratatui](https://github.com/ratatui-org/ratatui) as an example!)\n\n## Installation\n\n```\n$ cargo install cargo-selector\n```\n\n### AUR\n\n```\n$ paru -S cargo-selector\n```\n\n## Usage\n\n### Basic\n\nRun the command in the cargo project directory:\n\n```\n$ cargo selector\n```\n\nThen, target list will be displayed, and you can execute the following command by selecting it.\n\n```sh\n# if the target is bin\n$ cargo run --bin xyz [--features \"foo bar\"]\n\n# if the target is example\n$ cargo run --example xyz [--features \"foo bar\"]\n```\n\nBy switching the action, you can also run only the build.\n\n### Options\n\n```\nUsage: cargo selector [OPTIONS]\n\nOptions:\n  -i, --inline                   Display list inline\n  -n, --inline-list-size \u003cSIZE\u003e  List size [default: 10]\n  -k, --kind \u003cNAME\u003e              Target kind [possible values: bin, example]\n  -t, --match-type \u003cTYPE\u003e        Match type [possible values: substring, fuzzy]\n  -a, --additional-args \u003cARGS\u003e   Additional arguments\n  -h, --help                     Print help\n  -V, --version                  Print version\n```\n\n#### -a, --additional-args\n\nIf you run the command:\n\n```\n$ cargo selector -a \"-- --foo 1\"\n```\n\nThen select the command and it will run:\n\n```sh\n$ cargo run --bin xyz -- --foo 1\n```\n\n### Keybindings\n\n| Key                               | Description                                  |\n| --------------------------------- | -------------------------------------------- |\n| \u003ckbd\u003eDown\u003c/kbd\u003e \u003ckbd\u003eCtrl+n\u003c/kbd\u003e | cursor down                                  |\n| \u003ckbd\u003eUp\u003c/kbd\u003e \u003ckbd\u003eCtrl+p\u003c/kbd\u003e   | cursor up                                    |\n| \u003ckbd\u003eEnter\u003c/kbd\u003e                  | execute `cargo run --bin/example \u003cselected\u003e` |\n| \u003ckbd\u003eTab\u003c/kbd\u003e                    | switch actions                               |\n| \u003ckbd\u003eEsc\u003c/kbd\u003e \u003ckbd\u003eCtrl+c\u003c/kbd\u003e  | quit                                         |\n\n### Config\n\nIf the `CARGO_SELECTOR_CONFIG` environment variable specifies the path to the config file, the config will be loaded.\n\nThe config file uses the following format:\n\n```toml\n# Sets the default match type. If argument `-t` or `--match-type` is specified, it will be overridden.\n# type: enum (\"substring\" | \"fuzzy\")\nmatch_type = \"substring\"\n\n# Sets the display colors.\n# Colors can be set in one of the following formats:\n# - ANSI color name\n#   - \"red\", \"bright-blue\"\n# - 8-bit color (256-color) index values\n#   - \"34\", \"128\", \"255\"\n# - 24-bit true color hex codes\n#   - \"#abcdef\"\n# type: string\n[color]\nbg = \"reset\"\naction_run_bg = \"green\"\naction_run_fg = \"black\"\naction_build_bg = \"blue\"\naction_build_fg = \"black\"\ninput_fg = \"reset\"\nnumbers_fg = \"darkgrey\"\nkind_fg = \"blue\"\nname_fg = \"white\"\nname_match_fg = \"red\"\npath_fg = \"darkgrey\"\nfeatures_fg = \"darkgrey\"\nselected_bg = \"yellow\"\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":["Rust","💻 Apps"],"sub_categories":["⌨️ Development Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flusingander%2Fcargo-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flusingander%2Fcargo-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flusingander%2Fcargo-selector/lists"}