SOftware Metadata Extraction Framework: A tool for automatically extracting relevant software information from code repositories (using README files, package metadata, etc.)
See the code
A command line interface for automatically extracting relevant metadata from code repositories (readme, configuration files, documentation, etc.).
Demo: See a demo running somef as a service, through the SOMEF-Vider tool.
Authors: Daniel Garijo, Allen Mao, Miguel Ángel García Delgado, Haripriya Dharmala, Vedant Diwanji, Jiaying Wang, Aidan Kelley, Jenifer Tabita Ciuciu-Kiss, Luca Angheluta, Juanje Mendoza, Anas El Hounsri and Thomas Vuillaume.
Given a readme file (or a GitHub/Gitlab/Codeberg/Bitbucket repository) SOMEF will extract the following categories (if present), listed in alphabetical order:
referencePublication, while the software itself is credited in creditText. (See https://somef.readthedocs.io/en/latest/output/#codemeta-format).
When using -e, publication metadata is enriched via OpenAlex. We recognize the following properties:
openalex_id: OpenAlex ID of the publicationcodemeta.json files within the repository and from the README (funding section headers and links to crowdfunding platforms). When using -e, the project data is enriched with OpenAIRE, adding:project_code: Project codeproject_title: Project titleproject_acronym: Project acronymgrant_id: Call/grant identifier-e, the following enrichment identifiers are also added:openaire_id: URL to the OpenAIRE explore page for the softwareswhid: Software Heritage identifier (for Zenodo DOIs)invocation category, as it may include several steps and explanations.We use different supervised classifiers, header analysis, regular expressions, the GitHub/Gitlab/Codeberg and Bitbucket API to retrieve all these fields (more than one technique may be used for each field) and language specific metadata parsers (e.g., for package files). Each extraction records its provenance, with the confidence and technique used on each step. For more information check the output format description
When extracting metadata through header analysis, SOMEF filters out headers whose confidence is below a certain threshold to avoid false positives. For instance, a header with 11+ words receives a confidence of 0.1, which is considered too low for a reliable classification — such headers are discarded from the results. The filtering ensures that only headers with a reasonable match quality are reported in the output.
| Header length | Confidence |
|---|---|
| 1–3 words | 1.0 |
| 4–6 words | 0.8 |
| 7–10 words | 0.5 |
| 11+ words | 0.1 |
See full documentation at https://somef.readthedocs.io/en/latest/
Journal publication (preferred):
@article{10.1162/qss_a_00167,
author = {Kelley, Aidan and Garijo, Daniel},
title = "{A Framework for Creating Knowledge Graphs of Scientific Software Metadata}",
journal = {Quantitative Science Studies},
pages = {1-37},
year = {2021},
month = {11},
issn = {2641-3337},
doi = {10.1162/qss_a_00167},
url = {https://doi.org/10.1162/qss_a_00167},
eprint = {https://direct.mit.edu/qss/article-pdf/doi/10.1162/qss\_a\_00167/1971225/qss\_a\_00167.pdf},
}
Conference publication (first):
@INPROCEEDINGS{9006447,
author={A. {Mao} and D. {Garijo} and S. {Fakhraei}},
booktitle={2019 IEEE International Conference on Big Data (Big Data)},
title={SoMEF: A Framework for Capturing Scientific Software Metadata from its Documentation},
year={2019},
doi={10.1109/BigData47090.2019.9006447},
url={http://dgarijo.com/papers/SoMEF.pdf},
pages={3032-3037}
}
SOMEF has been tested on Unix, MacOS and Windows Microsoft operating systems.
If you face any issues when installing SOMEF, please make sure you have installed the following packages: build-essential, libssl-dev, libffi-dev and python3-dev.
SOMEF is available in Pypi! To install it just type:
pip install somef
SOMEF-Core uses NLTK / WordNet to match README section headers (e.g. "Getting Started", "Citation") against metadata categories. Running somef configure (see below) takes care of downloading the required NLTK data automatically.
To run SOMEF, please follow the next steps:
Clone this GitHub repository
git clone https://github.com/KnowledgeCaptureAndDiscovery/somef.git
We use Poetry to ensure library compatibility. It can be installed as follows:
curl -sSL https://install.python-poetry.org | python3 -
This option is recommended over installing Poetry with pip install.
Now Poetry will handle the installation of SOMEF and all its dependencies configured in the toml file.
To test the correct installation of poetry run (poetry version > 2.0.0):
poetry --version
Install somef and all their dependencies.
cd /somef
poetry install
Now we need to access our virtual environment, to do so you can run the following command:
poetry env activate
If the environment is not active, paste the command shown when poetry env activate is run, typically something like the command below:
source /path_to_env/ENV_NAME/bin/activate
To learn more about poetry environment management, visit their official documentation here.
Test the SOMEF installation run:
somef --help
If everything goes fine, you should see:
Usage: somef [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
configure Configure credentials
describe Running the Command Line Interface
version Show somef version.
We provide a Docker image with SOMEF already installed. To run through Docker, you may build the Dockerfile provided in the repository by running:
docker build -t somef .
Or just use the Docker image already built in DockerHub:
docker pull kcapd/somef
Then, to run your image just type:
docker run --rm -it kcapd/somef
And you will be ready to use SOMEF (see section below). If you want to have access to the results we recommend mounting a volume. For example, the following command will mount the current directory as the out folder in the Docker image:
docker run -it --rm -v $PWD/:/out kcapd/somef
If you move any files produced by somef into /out, then you will be able to see them in your current directory.
Before running SOMEF for the first time, you must configure it appropriately (you only need to do this once). Run:
somef configure
And you will be asked to provide the following:
A GitHub authentication token [optional, leave blank if not used], which SOMEF uses to retrieve metadata from GitHub. If you don't include an authentication token, you can still use SOMEF. However, you may be limited to a series of requests per hour. For more information, see https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
A GitLab authentication token [optional], used for GitLab.com and self-hosted GitLab instances (e.g., gitlab.in2p3.fr). Tokens are per-instance. Note: a token from GitLab.com does not work for self-hosted servers. Create one at https://gitlab.com/-/user_settings/personal_access_tokens (scope: read_api). Without a token, some self-hosted GitLab instances may not return rate limit information.
A Codeberg authentication token [optional], used to retrieve metadata from Codeberg. Create one at https://codeberg.org/user/settings/applications (permissions: read:repository, read:user). Codeberg (Forgejo) does not expose rate limit headers even with a token.
A Bitbucket authentication token [optional], used for Bitbucket Cloud. Create an API token with scopes at https://bitbucket.org/account/settings/api-tokens/ (permissions: read:repository:bitbucket, read:account). You will also need to provide your Atlassian account email, as Bitbucket API tokens use Basic authentication (email:token encoded in base64). Without a token you are limited to 60 requests/hour.
The path to the trained classifiers (pickle files). If you have your own classifiers, you can provide them here. Otherwise, you can leave it blank.
A download size limit in MB [optional, default 200]. SOMEF skips repository archives larger than this limit. Increase it if you need to process large repositories. You can also override it with the --download-limit parameter in the describe command.
If you want SOMEF to be automatically configured (without any tokens and using the default classifiers) just type:
somef configure -a
For showing help about the available options, run:
somef configure --help
Which displays:
Usage: somef configure [OPTIONS]
Configure GitHub credentials and classifiers file path
Options:
-a, --auto Automatically configure SOMEF
-b, --base_uri URL Base URI for somef transformations
-h, --help Show this message and exit.
Commands:
test Test the configured API tokens
To verify that the authentication tokens stored in your configuration file are valid without having to run SOMEF, run:
somef configure test
This contacts each configured provider's API (api.github.com, gitlab.com, codeberg.org, bitbucket.org) with the token stored in ~/.somef/config.json and reports the status of each one, e.g.:
GitHub: token valid
GitLab: token valid
Codeberg: token valid
Bitbucket: token valid but with limited permissions (403)
401 means the token is invalid; 403 means it is valid but lacks the required scopes; any other non-200 response is reported as unexpected. Providers without a configured token are simply skipped. Bitbucket tokens must start with Basic (as set by somef configure); otherwise the test reports an incorrect format without contacting the API. The command exits with a non-zero status code if any configured token is invalid, which is useful for scripts and CI.
If you update SOMEF to a newer version, you must configure again the library (by running somef configure). The rationale is that different versions may rely on classifiers which may be stored in a different path.
If you installed through poetry and you have upgraded the python environment (e.g., from 3.10 to 3.11), you may need to run poetry env use python3.11 and poetry install to update your environment.
$ somef describe --help
SOMEF Command Line Interface
Usage: somef describe [OPTIONS]
Running the Command Line Interface
Options:
-t, --threshold FLOAT Threshold to classify the text [required]
Input: [mutually_exclusive, required]
-r, --repo_url URL Github/Gitlab/Codeberg/Bitbucket Repository URL
-d, --doc_src PATH Path to the README file source
-i, --in_file PATH A file of newline separated links to GitHub/
Gitlab/Codeberg/Bitbucket repositories
-l, --local_repo PATH Path to the local repository source. No APIs will be used
Output: [required_any]
-o, --output PATH Path to the output file. If supplied, the
output will be in JSON
-c, --codemeta_out PATH Path to an output codemeta file
-g, --graph_out PATH Path to the output Knowledge Graph export
file. If supplied, the output will be a
Knowledge Graph, in the format given in the
--format option chosen (turtle, json-ld)
-gc, --google_codemeta_out PATH Path to a Google-compliant Codemeta JSON-LD
file. This output transforms the standard
Codemeta to follow Google’s expected JSON-LD
structure.
-f, --graph_format [turtle|json-ld]
If the --graph_out option is given, this is
the format that the graph will be stored in
-p, --pretty Pretty print the JSON output file so that it
is easy to compare to another JSON output
file.
-m, --missing The JSON will include a field
somef_missing_categories to report with the
missing metadata fields that SOMEF was not
able to find.
-kt, --keep_tmp PATH SOMEF will NOT delete the temporary folder
where files are stored for analysis. Files
will be stored at the
desired path
-all, --requirements_all Export all detected requirements, including
text and libraries (default).
-v, --requirements_v Export only requirements from structured
sources (pom.xml, requirements.txt, etc.)
-ra, --reconcile_authors SOMEF will extract additional information
from certain files like CODEOWNERS.
This may require extra API
requests and increase execution time
--download-limit INTEGER Download size limit in MB for repository
archives. Overrides the value set in the
configuration file.
-h, --help Show this message and exit.
-e, --enrichment Enrich metadata with external APIs (OpenAlex,
OpenAIRE, Zenodo)
--github-token TEXT GitHub personal access token (if invalid,
stored config is used instead)
--gitlab-token TEXT GitLab personal access token (if invalid,
stored config is used instead)
--codeberg-token TEXT Codeberg personal access token (if invalid,
stored config is used instead)
--bitbucket-token TEXT Bitbucket app password (if invalid, stored
config is used instead)
--bitbucket-email TEXT Bitbucket Atlassian account email (required
with --bitbucket-token)
Repoository versions [mutually_exclusive] (see section *Repository versions*t):
-b, --branch name branch Branch of the repository to analyze. Overrides the default branch.
--tag text Tag of the repository to analyze. Cannot be used together with --branch and --commit
--commit TEXT Commit SHA to analyze. Cannot be used together
with --branch or --tag.
Alternatively, you can set tokens via environment variables or by running somef configure, which stores them permanently.
The CLI flags take precedence over stored config when valid.
-eThe -e (or --enrichment) flag queries external APIs to complete the extracted metadata:
openalex_id to DOIs of publications and reconciles missing author ORCIDs.openaire_id to publications/identifiers and enriches project funding metadata.swhid (Software Heritage ID) for records matching Zenodo DOIs.For a detailed technical breakdown of the fields mapped by each external service, please refer to the specific documentation pages:
Note: Enrichment makes additional network requests to external services, which may slow down the overall execution time. Use this flag only when you need the extra metadata.
The following command extracts all metadata available from https://github.com/dgarijo/Widoco/.
somef describe -r https://github.com/dgarijo/Widoco/ -o test.json -t 0.8
We recommend having a high value for the threshold parameter, 0.8 (default) or above.
Additional configuration parameters (such as the similarity_threshold for header analysis)
can be set in ~/.somef/config.json. See the usage documentation for details.
Try SOMEF in Binder with our sample notebook:
If you want to contribute with a pull request, please do so by submitting it to the dev branch.
Priyanka O.
To see upcoming features, please have a look at our open issues and milestones
To run a classifier with an additional category or remove an existing one, a corresponding path entry in the config.json should be provided and the category type should be added/removed in the category variable in cli.py.
SOMEF supports the extraction and analysis of metadata in package files of several programming languages. Current support includes: setup.py and pyproject.toml for Python, pom.xml for Java, .gemspec for Ruby, DESCRIPTION for R, bower.json for JavaScript, HTML or CSS, .cabal for Haskell, cargo.toml for RUST, composer for PHP, .juliaProject.toml for Julia , AUTHORS, codemeta.json, publiccode.yml, dockerfile and citation.cff
This includes identifying dependencies, runtime requirements, and development tools specified in project configuration files.
SOMEF is designed to work primarily with repositories written in English.
Repositories in other languages may not be processed as effectively, and results could be incomplete or less accurate.
-eThe -e (or --enrichment) flag queries external APIs to complete the extracted metadata:
openalex_id to DOIs of publications.openaire_id and enriches funding information (project code, title, acronym, grant id).swhid (Software Heritage ID) for Zenodo DOIs.Note: Enrichment makes additional network requests to external services, which may slow down the overall execution time. Use this flag only when you need the extra metadata.
SOMEF allows analyzing specific versions of a repository. If no version is specified, SOMEF will analyze the default branch of the repository (usually main or master). The following options let you control exactly which version of the codebase is inspected.
If neither --branch nor --tag is provided, SOMEF will:
This is the recommended option when you want to describe the current version of a a project.
somef describe -r <repo_url> --branch <branch_name> ...
somef describe -r <repo_url> --b <branch_name> ...
Forces SOMEF to analyze a specific branch of the repository.
Useful when:
somef describe -r <repo_url> --tag <tag_name> ...
Analyzes a specific tagged version of the repository.
Recommended when:
somef describe -r <repo_url> --commit <commit_sha> ...
--branch, --tag and --commit are mutually exclusive.924 followers · starred Sep 2021
75 followers · starred Apr 2025
SOftware Metadata Extraction Framework: A tool for automatically extracting relevant software information from code repositories (using README files, package metadata, etc.)
See the code
A command line interface for automatically extracting relevant metadata from code repositories (readme, configuration files, documentation, etc.).
Demo: See a demo running somef as a service, through the SOMEF-Vider tool.
Authors: Daniel Garijo, Allen Mao, Miguel Ángel García Delgado, Haripriya Dharmala, Vedant Diwanji, Jiaying Wang, Aidan Kelley, Jenifer Tabita Ciuciu-Kiss, Luca Angheluta, Juanje Mendoza, Anas El Hounsri and Thomas Vuillaume.
Given a readme file (or a GitHub/Gitlab/Codeberg/Bitbucket repository) SOMEF will extract the following categories (if present), listed in alphabetical order:
referencePublication, while the software itself is credited in creditText. (See https://somef.readthedocs.io/en/latest/output/#codemeta-format).
When using -e, publication metadata is enriched via OpenAlex. We recognize the following properties:
openalex_id: OpenAlex ID of the publicationcodemeta.json files within the repository and from the README (funding section headers and links to crowdfunding platforms). When using -e, the project data is enriched with OpenAIRE, adding:project_code: Project codeproject_title: Project titleproject_acronym: Project acronymgrant_id: Call/grant identifier-e, the following enrichment identifiers are also added:openaire_id: URL to the OpenAIRE explore page for the softwareswhid: Software Heritage identifier (for Zenodo DOIs)invocation category, as it may include several steps and explanations.We use different supervised classifiers, header analysis, regular expressions, the GitHub/Gitlab/Codeberg and Bitbucket API to retrieve all these fields (more than one technique may be used for each field) and language specific metadata parsers (e.g., for package files). Each extraction records its provenance, with the confidence and technique used on each step. For more information check the output format description
When extracting metadata through header analysis, SOMEF filters out headers whose confidence is below a certain threshold to avoid false positives. For instance, a header with 11+ words receives a confidence of 0.1, which is considered too low for a reliable classification — such headers are discarded from the results. The filtering ensures that only headers with a reasonable match quality are reported in the output.
| Header length | Confidence |
|---|---|
| 1–3 words | 1.0 |
| 4–6 words | 0.8 |
| 7–10 words | 0.5 |
| 11+ words | 0.1 |
See full documentation at https://somef.readthedocs.io/en/latest/
Journal publication (preferred):
@article{10.1162/qss_a_00167,
author = {Kelley, Aidan and Garijo, Daniel},
title = "{A Framework for Creating Knowledge Graphs of Scientific Software Metadata}",
journal = {Quantitative Science Studies},
pages = {1-37},
year = {2021},
month = {11},
issn = {2641-3337},
doi = {10.1162/qss_a_00167},
url = {https://doi.org/10.1162/qss_a_00167},
eprint = {https://direct.mit.edu/qss/article-pdf/doi/10.1162/qss\_a\_00167/1971225/qss\_a\_00167.pdf},
}
Conference publication (first):
@INPROCEEDINGS{9006447,
author={A. {Mao} and D. {Garijo} and S. {Fakhraei}},
booktitle={2019 IEEE International Conference on Big Data (Big Data)},
title={SoMEF: A Framework for Capturing Scientific Software Metadata from its Documentation},
year={2019},
doi={10.1109/BigData47090.2019.9006447},
url={http://dgarijo.com/papers/SoMEF.pdf},
pages={3032-3037}
}
SOMEF has been tested on Unix, MacOS and Windows Microsoft operating systems.
If you face any issues when installing SOMEF, please make sure you have installed the following packages: build-essential, libssl-dev, libffi-dev and python3-dev.
SOMEF is available in Pypi! To install it just type:
pip install somef
SOMEF-Core uses NLTK / WordNet to match README section headers (e.g. "Getting Started", "Citation") against metadata categories. Running somef configure (see below) takes care of downloading the required NLTK data automatically.
To run SOMEF, please follow the next steps:
Clone this GitHub repository
git clone https://github.com/KnowledgeCaptureAndDiscovery/somef.git
We use Poetry to ensure library compatibility. It can be installed as follows:
curl -sSL https://install.python-poetry.org | python3 -
This option is recommended over installing Poetry with pip install.
Now Poetry will handle the installation of SOMEF and all its dependencies configured in the toml file.
To test the correct installation of poetry run (poetry version > 2.0.0):
poetry --version
Install somef and all their dependencies.
cd /somef
poetry install
Now we need to access our virtual environment, to do so you can run the following command:
poetry env activate
If the environment is not active, paste the command shown when poetry env activate is run, typically something like the command below:
source /path_to_env/ENV_NAME/bin/activate
To learn more about poetry environment management, visit their official documentation here.
Test the SOMEF installation run:
somef --help
If everything goes fine, you should see:
Usage: somef [OPTIONS] COMMAND [ARGS]...
Options:
-h, --help Show this message and exit.
Commands:
configure Configure credentials
describe Running the Command Line Interface
version Show somef version.
We provide a Docker image with SOMEF already installed. To run through Docker, you may build the Dockerfile provided in the repository by running:
docker build -t somef .
Or just use the Docker image already built in DockerHub:
docker pull kcapd/somef
Then, to run your image just type:
docker run --rm -it kcapd/somef
And you will be ready to use SOMEF (see section below). If you want to have access to the results we recommend mounting a volume. For example, the following command will mount the current directory as the out folder in the Docker image:
docker run -it --rm -v $PWD/:/out kcapd/somef
If you move any files produced by somef into /out, then you will be able to see them in your current directory.
Before running SOMEF for the first time, you must configure it appropriately (you only need to do this once). Run:
somef configure
And you will be asked to provide the following:
A GitHub authentication token [optional, leave blank if not used], which SOMEF uses to retrieve metadata from GitHub. If you don't include an authentication token, you can still use SOMEF. However, you may be limited to a series of requests per hour. For more information, see https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
A GitLab authentication token [optional], used for GitLab.com and self-hosted GitLab instances (e.g., gitlab.in2p3.fr). Tokens are per-instance. Note: a token from GitLab.com does not work for self-hosted servers. Create one at https://gitlab.com/-/user_settings/personal_access_tokens (scope: read_api). Without a token, some self-hosted GitLab instances may not return rate limit information.
A Codeberg authentication token [optional], used to retrieve metadata from Codeberg. Create one at https://codeberg.org/user/settings/applications (permissions: read:repository, read:user). Codeberg (Forgejo) does not expose rate limit headers even with a token.
A Bitbucket authentication token [optional], used for Bitbucket Cloud. Create an API token with scopes at https://bitbucket.org/account/settings/api-tokens/ (permissions: read:repository:bitbucket, read:account). You will also need to provide your Atlassian account email, as Bitbucket API tokens use Basic authentication (email:token encoded in base64). Without a token you are limited to 60 requests/hour.
The path to the trained classifiers (pickle files). If you have your own classifiers, you can provide them here. Otherwise, you can leave it blank.
A download size limit in MB [optional, default 200]. SOMEF skips repository archives larger than this limit. Increase it if you need to process large repositories. You can also override it with the --download-limit parameter in the describe command.
If you want SOMEF to be automatically configured (without any tokens and using the default classifiers) just type:
somef configure -a
For showing help about the available options, run:
somef configure --help
Which displays:
Usage: somef configure [OPTIONS]
Configure GitHub credentials and classifiers file path
Options:
-a, --auto Automatically configure SOMEF
-b, --base_uri URL Base URI for somef transformations
-h, --help Show this message and exit.
Commands:
test Test the configured API tokens
To verify that the authentication tokens stored in your configuration file are valid without having to run SOMEF, run:
somef configure test
This contacts each configured provider's API (api.github.com, gitlab.com, codeberg.org, bitbucket.org) with the token stored in ~/.somef/config.json and reports the status of each one, e.g.:
GitHub: token valid
GitLab: token valid
Codeberg: token valid
Bitbucket: token valid but with limited permissions (403)
401 means the token is invalid; 403 means it is valid but lacks the required scopes; any other non-200 response is reported as unexpected. Providers without a configured token are simply skipped. Bitbucket tokens must start with Basic (as set by somef configure); otherwise the test reports an incorrect format without contacting the API. The command exits with a non-zero status code if any configured token is invalid, which is useful for scripts and CI.
If you update SOMEF to a newer version, you must configure again the library (by running somef configure). The rationale is that different versions may rely on classifiers which may be stored in a different path.
If you installed through poetry and you have upgraded the python environment (e.g., from 3.10 to 3.11), you may need to run poetry env use python3.11 and poetry install to update your environment.
$ somef describe --help
SOMEF Command Line Interface
Usage: somef describe [OPTIONS]
Running the Command Line Interface
Options:
-t, --threshold FLOAT Threshold to classify the text [required]
Input: [mutually_exclusive, required]
-r, --repo_url URL Github/Gitlab/Codeberg/Bitbucket Repository URL
-d, --doc_src PATH Path to the README file source
-i, --in_file PATH A file of newline separated links to GitHub/
Gitlab/Codeberg/Bitbucket repositories
-l, --local_repo PATH Path to the local repository source. No APIs will be used
Output: [required_any]
-o, --output PATH Path to the output file. If supplied, the
output will be in JSON
-c, --codemeta_out PATH Path to an output codemeta file
-g, --graph_out PATH Path to the output Knowledge Graph export
file. If supplied, the output will be a
Knowledge Graph, in the format given in the
--format option chosen (turtle, json-ld)
-gc, --google_codemeta_out PATH Path to a Google-compliant Codemeta JSON-LD
file. This output transforms the standard
Codemeta to follow Google’s expected JSON-LD
structure.
-f, --graph_format [turtle|json-ld]
If the --graph_out option is given, this is
the format that the graph will be stored in
-p, --pretty Pretty print the JSON output file so that it
is easy to compare to another JSON output
file.
-m, --missing The JSON will include a field
somef_missing_categories to report with the
missing metadata fields that SOMEF was not
able to find.
-kt, --keep_tmp PATH SOMEF will NOT delete the temporary folder
where files are stored for analysis. Files
will be stored at the
desired path
-all, --requirements_all Export all detected requirements, including
text and libraries (default).
-v, --requirements_v Export only requirements from structured
sources (pom.xml, requirements.txt, etc.)
-ra, --reconcile_authors SOMEF will extract additional information
from certain files like CODEOWNERS.
This may require extra API
requests and increase execution time
--download-limit INTEGER Download size limit in MB for repository
archives. Overrides the value set in the
configuration file.
-h, --help Show this message and exit.
-e, --enrichment Enrich metadata with external APIs (OpenAlex,
OpenAIRE, Zenodo)
--github-token TEXT GitHub personal access token (if invalid,
stored config is used instead)
--gitlab-token TEXT GitLab personal access token (if invalid,
stored config is used instead)
--codeberg-token TEXT Codeberg personal access token (if invalid,
stored config is used instead)
--bitbucket-token TEXT Bitbucket app password (if invalid, stored
config is used instead)
--bitbucket-email TEXT Bitbucket Atlassian account email (required
with --bitbucket-token)
Repoository versions [mutually_exclusive] (see section *Repository versions*t):
-b, --branch name branch Branch of the repository to analyze. Overrides the default branch.
--tag text Tag of the repository to analyze. Cannot be used together with --branch and --commit
--commit TEXT Commit SHA to analyze. Cannot be used together
with --branch or --tag.
Alternatively, you can set tokens via environment variables or by running somef configure, which stores them permanently.
The CLI flags take precedence over stored config when valid.
-eThe -e (or --enrichment) flag queries external APIs to complete the extracted metadata:
openalex_id to DOIs of publications and reconciles missing author ORCIDs.openaire_id to publications/identifiers and enriches project funding metadata.swhid (Software Heritage ID) for records matching Zenodo DOIs.For a detailed technical breakdown of the fields mapped by each external service, please refer to the specific documentation pages:
Note: Enrichment makes additional network requests to external services, which may slow down the overall execution time. Use this flag only when you need the extra metadata.
The following command extracts all metadata available from https://github.com/dgarijo/Widoco/.
somef describe -r https://github.com/dgarijo/Widoco/ -o test.json -t 0.8
We recommend having a high value for the threshold parameter, 0.8 (default) or above.
Additional configuration parameters (such as the similarity_threshold for header analysis)
can be set in ~/.somef/config.json. See the usage documentation for details.
Try SOMEF in Binder with our sample notebook:
If you want to contribute with a pull request, please do so by submitting it to the dev branch.
Priyanka O.
To see upcoming features, please have a look at our open issues and milestones
To run a classifier with an additional category or remove an existing one, a corresponding path entry in the config.json should be provided and the category type should be added/removed in the category variable in cli.py.
SOMEF supports the extraction and analysis of metadata in package files of several programming languages. Current support includes: setup.py and pyproject.toml for Python, pom.xml for Java, .gemspec for Ruby, DESCRIPTION for R, bower.json for JavaScript, HTML or CSS, .cabal for Haskell, cargo.toml for RUST, composer for PHP, .juliaProject.toml for Julia , AUTHORS, codemeta.json, publiccode.yml, dockerfile and citation.cff
This includes identifying dependencies, runtime requirements, and development tools specified in project configuration files.
SOMEF is designed to work primarily with repositories written in English.
Repositories in other languages may not be processed as effectively, and results could be incomplete or less accurate.
-eThe -e (or --enrichment) flag queries external APIs to complete the extracted metadata:
openalex_id to DOIs of publications.openaire_id and enriches funding information (project code, title, acronym, grant id).swhid (Software Heritage ID) for Zenodo DOIs.Note: Enrichment makes additional network requests to external services, which may slow down the overall execution time. Use this flag only when you need the extra metadata.
SOMEF allows analyzing specific versions of a repository. If no version is specified, SOMEF will analyze the default branch of the repository (usually main or master). The following options let you control exactly which version of the codebase is inspected.
If neither --branch nor --tag is provided, SOMEF will:
This is the recommended option when you want to describe the current version of a a project.
somef describe -r <repo_url> --branch <branch_name> ...
somef describe -r <repo_url> --b <branch_name> ...
Forces SOMEF to analyze a specific branch of the repository.
Useful when:
somef describe -r <repo_url> --tag <tag_name> ...
Analyzes a specific tagged version of the repository.
Recommended when:
somef describe -r <repo_url> --commit <commit_sha> ...
--branch, --tag and --commit are mutually exclusive.924 followers · starred Sep 2021
75 followers · starred Apr 2025