To contribute to this repository, you must sign off your commits to certify that you have the right to contribute the code and that it complies with the open source license. The rules are pretty simple, if you can certify the content of DCO, then simply add a "Signed-off-by" line to your commit message to certify your compliance. Please use your real name as pseudonymous/anonymous contributions are not accepted.
Signed-off-by: Joe Smith <joe.smith@email.com>
If you set your user.name and user.email git configs, you can sign your
commit automatically with git commit -s:
git commit -s -m "Your commit message"
This project needs some dependencies in order to run, make sure to have them all installed.
Make sure to have node installed using nvm
Note: This project requires Node.js version 24. If you use nvm, you can install it using:
nvm install 24 nvm use 24
Run the following command
npm install --global corepack@latest
corepack enable pnpmNow you can run the following command to setup your environment
pnpm setup:repoAfter running this, you will need to write the DATABRICKS_HOST in the .env file created in the app template here
Documentation to obtain the dev token here
The following command will compile all the packages and app in watch mode.
pnpm devNote: To avoid port collisions with the
clean-appexample, you should create a.envfile inapps/dev-playgroundand set another port for this app:DATABRICKS_APP_PORT=8001
Running the following command
pnpm startwill run all the builds and then start the app project. In order to make this work you will need to have the following env vars in your .env file
DATABRICKS_HOST=
The playground app can be deployed to Databricks using the following command:
pnpm pack:sdk
pnpm deploy:playgroundYou can set the following environment variables to the command to customize the deployment:
export DATABRICKS_PROFILE=your-profile # Databricks profile name. Used as a Databricks CLI profile argument whenever a command is executed.
export DATABRICKS_APP_NAME=your-app-name # The name of the app to deploy. If not provided, it will be prefixed with the username.
export DATABRICKS_WORKSPACE_DIR=your-workspace-dir # The source workspace directory to deploy the app from. It will be used to construct the absolute path: /Workspace/Users/{your-username}/{workspace-dir}The single source template (template/) is used to generate app variants for the app-templates repository. The variants and post-processing steps are defined in tools/generate-app-templates.ts.
pnpm generate:app-templatesBy default, this outputs to ../app-templates, assuming the repo is cloned alongside this one.
| Variable | Default | Description |
|---|---|---|
APP_TEMPLATES_OUTPUT_DIR |
../app-templates |
Output directory |
DATABRICKS_CLI |
databricks |
CLI binary name or path |
The docs/ directory contains the AppKit documentation site, built with Docusaurus.
Working with docs:
# From root
pnpm docs:dev # Start dev server
pnpm docs:build # Build docs
pnpm docs:serve # Serve built docsSee docs/README.md for more details.
Resource types and their permissions are defined once in the plugin-manifest schema; the CLI (create, add-resource, validate) and the appkit registry types are derived from it.
To add or change a resource type:
-
Edit the schema –
packages/shared/src/schemas/plugin-manifest.schema.json:- Add the value to
$defs.resourceType.enum. - Add a permission definition (e.g.
$defs.myResourcePermission) with anenumarray; list permissions weakest to strongest (this order is used for merge/escalation). - In
$defs.resourceRequirement.allOf, add a branch withif.properties.type.constset to the new type andthen.properties.permission.$refpointing at that permission def (e.g.#/$defs/myResourcePermission).
- Add the value to
-
Regenerate registry types – from the repo root:
pnpm exec tsx tools/generate-registry-types.tsThis updates
packages/appkit/src/registry/types.generated.ts. The appkit build runs this automatically before compiling. -
Optional: Add default fields for the new type in
packages/shared/src/cli/commands/plugin/create/resource-defaults.ts(DEFAULT_FIELDS_BY_TYPE) so the plugin create/add-resource prompts suggest env vars.
For more context and alternative approaches, see Registry types from schema.