KAS-FOR-ALL-REPOS(1)

πŸ“¦
version 5.4 Β· 3 versions
, in ubuntu stonking

πŸ’– KAS-FOR-ALL-REPOS πŸ’–

okay so bestie, this is the kas for-all-repos plugin β€” it lives in the kas (1) manual, and it's genuinely one of those commands that eats πŸ’…


✨ SYNOPSIS ✨

kas for-all-repos [-h] [--skip STEP] [--force-checkout] [--update] [-E] [-k]
                  [config] command

🌸 DESCRIPTION 🌸

It runs a specified command in all checked out repositories. That's the whole vibe. That's the assignment. 🫢

This plugin is what implements the kas for-all-repos command, iykyk.

So here's the tea: when you run this command, kas will checkout the repositories listed in the chosen config file, and then execute a specified command in each repository. Lowkey iconic because you can use it to query the repository status, automate actions like archiving the layers used in a build, or just execute literally any other required commands. Main character energy for your CI. πŸ‘‘

For example, to print the commit hashes used by each repository used in the file kas-project.yml (assuming they are all git repositories πŸ™) you could run:

kas for-all-repos kas-project.yml 'git rev-parse HEAD'

The environment for executing the command in each repository is extended to include the following variables β€” no cap, these are yours to use:

  • KAS_REPO_NAME: The name of the current repository determined by either the name property or by the key used for this repo in the config file.
  • KAS_REPO_PATH: The path of the local directory where this repository is checked out, relative to the directory where kas is executed.
  • KAS_REPO_URL: The URL from which this repository was cloned, or an empty string if no remote URL was given in the config file.
  • KAS_REPO_COMMIT: The commit ID which was checked out for this repository, or an empty string if no commit was given in the config file.
  • KAS_REPO_BRANCH: The branch which was checked out for this repository, or an empty string if no branch was given in the config file.
  • KAS_REPO_TAG: The tag which was checked out for this repository, or an empty string if no tag was given in the config file.
  • KAS_REPO_REFSPEC: The refspec which was checked out for this repository, or an empty string if no refspec was given in the config file.
πŸ’€ heads up bestie: KAS_REPO_REFSPEC is obsolete and will be removed when support for refspec keys is removed as well. fr fr, migrate your repos to commit/branch and use the related variables instead. don't be the last one at the party πŸ™ˆ

πŸŽ€ OPTIONS πŸŽ€

🌈 Positional Arguments

  • config β€” Config file(s), separated by colon. Using .config.yaml in KAS_WORK_DIR if none is specified.
  • command β€” Command to be executed as a string.

⭐ Named Arguments

  • --skip=[] β€” Skip build steps. To skip more than one step, use this argument multiple times.

Possible choices: setup_dir, setup_home, make_non_interactive, init_setup_repos, repo_setup_loop, finish_setup_repos, repos_checkout, repos_apply_patches, setup_environ, write_bbconfig

  • --force-checkout=False β€” Always checkout the desired commit/branch/tag of each repository, discarding any local changes 😭 (yes, them local changes. gone.)
  • --update=False β€” Pull new upstream changes to the desired branch even if it is already checked out locally.
  • -E=False, --preserve-env=False β€” Keep current user environment block.
  • -k, --keep-config-unchanged β€” Skip steps that change the configuration.

πŸ‘‘ KAS πŸ‘‘

Part of the kas(1) suite.


πŸ–‹ Author

Daniel Wagner, Jan Kiszka, Claudius Heine

Siemens and contributors, 2017-2025


and that's the whole page bestie πŸŽ€ written for kas 5.4, dated Jun 25, 2026 β€” go forth and run commands in ALL the repos, slay πŸ’…βœ¨

πŸ“¦ where this page comes from