Scroll to navigation

Foundry(1) General Commands Manual Foundry(1)

NAME

foundry - a command line development environment

SYNOPSIS

foundry [OPTION]... COMMAND [COMMAND-OPTIONS]...

DESCRIPTION

foundry is a development environment and build system designed for the GNOME desktop. It provides project management, build pipeline integration, SDK management, and various development tools for building applications and libraries.

COMMANDS

Project Commands

Initialize a new project in the current directory.

Environment Commands

Enter the environment of the project in the current directory.

Enter the build environment for the project similar to the build pipeline.

Start a shell in the project environment or run command.

File Commands

Detect the programming language of a file.

Grep files using the search and replace mechanism of Foundry.

List symbols in FILE as a tree.

Find the symbol at a specific position in FILE at LINE and LINE_OFFSET (both starting from 1). Use --tree to print parent symbols as a tree.

Index FILE using the ctags service and output the ctags data to stdout.

Build Commands

Build the current build pipeline.

Run a project command in the runtime environment.

Pipeline Commands

Show information about the build pipeline.

Show build flags for the build pipeline.

List build targets for the build pipeline.

Show which pipeline is active.

Invalidate the pipeline cache.

Link a workspace to the build pipeline. The stage will run at PHASE of the current pipeline and execute the linked pipeline at LINKED_PHASE.

Unlink a workspace from the build pipeline. Removes entries matching PHASE and PROJECT_DIRECTORY from the linked workspaces.

Configuration Commands

List available configurations.

Change the active configuration.

SDK Commands

List available SDKs.

Install a specific SDK.

Change the active SDK for the build pipeline. This will update your current configuration to use the SDK when possible.

Enter a shell in the SDK environment.

Show where

Dependencies Commands

List project dependencies.

Update project dependencies. This does not build the dependencies. Use foundry build to build the dependencies.

Device Commands

List available devices.

Switch the current target device.

Deployment Commands

Deploy the project to the active device.

Test Commands

List available unit tests.

Run a unit test.

Search Commands

Use global search engine to search across project.

Open FILE in the preferred file browser.

Settings Commands

Get a setting value applying the priority of settings from the user overrides, project settings, and application-wide settings in that order.

Set a setting value. Use --global to make the setting the user default. Use --project to make the setting the project default including other users who clone the project. Otherwise, the setting applies to the current user for the current project only.

Secret Commands

Get an API key from the secret store. For example, foundry secret get-api-key gitlab.gnome.org gitlab

Check when an API key expires for a service on a specific hostname. The expiration date will be printed in local timezone.

Rotate an API key for a service on a specific hostname. The API key will be rotated using a registered key rotator plugin and the new key will be stored securely.

Store an API key in the secret store.

Diagnosis Commands

Diagnose issues with FILE

CONDITIONAL COMMANDS

The following commands are only available when certain features are enabled at build time:

Git Commands (requires feature-git)

Clone a repository into a new project directory.

Documentation Commands (requires feature-docs)

Install a specific documentation bundle.

List available documentation bundles.

Search for documentation.

Forge Commands (requires feature-forge)

List available forge integrations.

List issues from the forge.

List merge requests from the forge.

Show information about the forge project.

Switch the active forge integration. Use --clear to clear the forge setting instead of setting it.

Show information about the forge user.

Text Editing Commands (requires feature-text)

Search for text patterns in source files.

LLM Commands (requires feature-llm)

List available language models.

List available resources.

List available LLM tools.

Complete text using a language model.

MCP Commands (requires feature-mcp)

Run MCP server. The server communicates via stdin/stdout using the Model Context Protocol.

LSP Commands (requires feature-lsp)

List available language server plugins.

Set preferred LSP for a language.

Run a language server for a specific language.

Template Commands (requires feature-templates)

Create a new project from a template.

List available project templates.

Version Control Commands (requires feature-vcs)

Show blame information for files.

Fetch changes from remote repositories.

List ignored files.

List version control information.

List branches in the repository.

List files tracked by version control.

List remote repositories.

List tags in the repository.

Show commit history for FILE.

Switch branches or checkouts.

OPTIONS

Use shared mode for the command.

Show help information for the command.

EXAMPLES

Initialize a new project:

foundry init

Build the project:

foundry build

Run a project command:

foundry run

Enter the build environment:

foundry devenv

List available SDKs:

foundry sdk list

Install an SDK:

foundry sdk install org.gnome.Sdk/x86_64/master

Start a language server:

foundry lsp run python3

FEATURES

Foundry may be compiled with various features disabled or removed. Some commands may be unavailable if the underlying feature was not compiled into your version of Foundry.

SEE ALSO

For further information, visit the website https://devsuite.app/

BUGS

Bug reports can be found and filed at https://gitlab.gnome.org/chergert/foundry/issues

November 2025