KAS-FOR-ALL-REPOS(1)
π 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 thenameproperty 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 wherekasis 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.yamlinKAS_WORK_DIRif 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
Β© Copyright
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
- ubuntu stonking: kas 5.4-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms