Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.khal.ai/llms.txt

Use this file to discover all available pages before exploring further.

KHAL source now follows the split in Source control for KHAL teams: private app/platform repos live in internal KHAL Gitea; public docs, app-kit, and desktop remain on GitHub because of their public docs/SaaS/cloud integration path. For most FDE app work, start from the private Gitea repo URL you received during onboarding, not a GitHub workspace clone.

Before you start

You need these installed and signed in before running init.sh. The bootstrap script exits early with a clear message if anything is missing.
RequirementWhyCheck
git ≥ 2.30Submodule features required by init.shgit --version
Gitea accessRequired for private app/platform repostea login list or your configured SSH key
Node 20+@khal-os/* packages target modern Nodenode --version
pnpmWorkspace package manager for the SDKpnpm --version
bunRuntime + package manager for generated app/service/workflow reposbun --version

Clone and bootstrap

1

Authenticate with KHAL Gitea

Use the internal Gitea credentials or SSH key from onboarding. For CLI checks:
tea login list
tea whoami
For SSH remotes, register your public key in the internal Gitea UI before cloning.
2

Clone the repo you are working on

git clone <private-khal-gitea-repo-url>
cd <repo>
Use GitHub only for the public docs repo and the GitHub-hosted app-kit/desktop exceptions.
3

Bootstrap the workspace

./init.sh
If the repo ships an init.sh, run it after cloning. Private app repos may instead use the generated app workflow from FDE CLI quickstart: bun install, bun run build, bun run typecheck, then khal install ... --dry-run.
Run ./init.sh --help to see the available options, including --dry-run (preview actions) and --verbose (extra debug output).
Terminal output of ./init.sh showing each submodule align to its tracked branch and a green success summary.

What you get

After cloning, keep the repo on its authoritative remote. For private app/platform work that is KHAL Gitea. For docs/app-kit/desktop exceptions that may still be GitHub. Do not publish private repo URLs, tokens, credential-helper output, or internal host details in public docs/issues.

Install dependencies

Which package manager to use where — pnpm vs bun — and how to get the whole workspace compiling.

Build your first pack

Scaffold from the template, rename, edit, build — you’ll have a running pack by the end of the page.

Troubleshooting

Confirm your internal Gitea account, SSH key, or credential helper. Run tea login list, tea whoami, and git ls-remote <private-khal-gitea-repo-url> without pasting tokens into logs.
Upgrade to git 2.30 or newer. Older git versions don’t honor the submodule flags init.sh relies on.
Use the SSH clone URL from the internal Gitea UI, then verify:
git remote -v
git ls-remote origin

What’s next

Install dependencies

pnpm + bun + the node versions your workspace actually needs.

Your first pack

Scaffold an app with khal new and run the local proof loop.