Commands

Run help to list all available commands.

kbc help

You can also get details of any command.

kbc help <command>
kbc help local create row

Available Commands

Command Description
kbc help Show help for any command.
kbc status Show information about a working directory.
   
kbc sync Synchronization between a local directory and a project.
kbc sync init Initialize a new local directory and run kbc sync pull.
kbc sync pull Sync a project to the local directory.
kbc sync push Sync a local directory to the project.
kbc sync diff Show differences between a local directory and a project.
   
kbc ci Manage the CI/CD pipeline.
kbc ci workflows Generate workflows for GitHub Actions integration.
   
kbc local Operations in the local directory don’t affect the project.
kbc local create Create an object in the local directory.
kbc local create config Create an empty configuration.
kbc local create row Create an empty configuration row.
kbc local persist Detect new directories with a configuration or a configuration row.
kbc local encrypt Encrypt all unencrypted secrets.
kbc local validate Validate the local directory.
kbc local validate config Validate a configuration JSON file.
kbc local validate row Validate a configuration row JSON file.
kbc local validate schema Validate a configuration/row JSON file by a JSON schema file.
kbc local fix-paths Ensure that all local paths match configured naming.
   
kbc remote Operations directly in the project.
kbc remote create Create an object in the project.
kbc remote create branch Create a new branch from the main branch.
kbc remote create bucket Create a new bucket.
kbc remote file Manage files in Storage.
kbc remote file download Download a file from Storage.
kbc remote file upload Upload a file to Storage.
kbc remote job Manage jobs in the project.
kbc remote job run Run one or more jobs.
kbc remote table Manage tables in the project.
kbc remote table create Create a new table.
kbc remote table upload Upload a CSV file to a table.
kbc remote table download Download data from a table.
kbc remote table preview Preview up to 1000 rows from a table.
kbc remote table detail Print table details.
kbc remote table import Import data to a table from a file.
kbc remote table unload Unload a table into a file.
kbc remote workspace Manage workspaces in the project.
kbc remote workspace create Create a workspace in the project.
kbc remote workspace delete Delete a workspace in the project.
kbc remote workspace detail Print workspace details and credentials.
kbc remote workspace list List workspaces in the project.
   
kbc local template Manage template instances in the project directory.
kbc local template delete Delete a template instance from the local directory.
kbc local template list List template instances used in the project.
kbc local template use Use the template in the project directory.
   
kbc template Manage templates in the template repository.
kbc template create Create a template in the repository directory.
kbc template describe Describe a template and its inputs.
kbc template list List templates in the repository.
kbc template repository init Initialize a new repository directory.
kbc template test Manage template tests.
kbc template test create Create template tests.
kbc template test run Run template tests.
   
kbc dbt Work with dbt inside your repository.
kbc dbt init Initialize profiles, sources, and environment variables for use with dbt.
kbc dbt generate Generate profiles, sources, and environment variables for use with dbt.
kbc dbt generate profile Generate profiles for use with dbt.
kbc dbt generate sources Generate sources for use with dbt.
kbc dbt generate env Generate environment variables for use with dbt.

Aliases

The most used commands have their shorter aliases.

For example, you can use kbc c instead of kbc local create.

Full Command Aliases
kbc sync init kbc init, kbc i
kbc sync diff kbc diff, kbc d
kbc sync pull kbc pull, kbc pl
kbc sync push kbc push, kbc ph
kbc local validate kbc validate, kbc v
kbc local persist kbc persist, kbc pt
kbc local create kbc create, kbc c
kbc local encrypt kbc encrypt, kbc e

Options

Options are a way to modify the behavior of a command, they can be:

  • Global, for all commands, see below.
  • Local, only for a specific command, see the command help.

Command-line flags

  • Entered as part of the CLI command.
  • One-letter flags start with -, for example -v.
  • Longer flags start with --, for example --verbose.
  • Flags take precedence over environment variables.

Environment variables

  • Each flag can be defined via an environment variable.
  • Variable name is based on the flag name, and starts with KBC_.
  • All letters are changed to uppercase and dashes to underscores.
  • For example, flag --log-file can be defined by the KBC_LOG_FILE environment variable.
  • Sources and priority of the environment variables:
    1. From the OS environment.
    2. From environment files in the working directory.
    3. From environment files in the project directory.

All found environment files are automatically loaded.
Variables are merged together according to the following priority.

Environment File Environment Priority
.env.development.local Development The highest
.env.test.local Test  
.env.production.local Production  
.env.local Wherever the file is  
.env.development Development  
.env.test Test  
.env.production Production  
.env All The lowest

Note: All .*local environment files should be part of the .gitignore file, if used.

Global Options

-h, --help
Show help for the command
-l, --log-file <string>
Path to a log file to store the details in
-t, --storage-api-token <string>
Storage API token to the project
-v, --verbose
Increase output verbosity
--verbose-api
Log each API request and its response
-V, --version
Show the version
-d, --working-dir <string>
Use another working directory

Next Steps