# Development workspace examples

`condensed.py` and `expanded.py` show the same Function in two forms. Choose one; they register the
same name, `create-dev-workspace`. `workspace_helpers.py` contains the supporting code, not built-in
Chalk SDK methods.

These examples require the Chalk CLI and `chalkcompute==2.13.8` (with `connectrpc==0.12.1`), access
to an x86-64 Linux host pool with room for an 8-vCPU / 16-GiB sandbox. `developer_image()` selects
`node:26.13.1-bookworm`; `install_dev_tools()` adds Neovim, Chalk CLI, Codex, Herdr, tmux, the GitHub
CLI, and example Zsh dotfiles. Replace those shell settings with your own dotfiles and extend the
helper for additional tools. Image construction is separate from the network policy applied to the
running sandbox.

Before importing either example, set `CHALK_WORKSPACE_HOST_POOL_ID` to your host pool's ID. This is
non-secret configuration. Download the selected example and `workspace_helpers.py` into the same
directory and deploy the Function using the documented Chalk Function deployment workflow:

https://docs.chalk.ai/docs/compute/functions

Then enter a 12-hour workspace:

```bash
chalk sandbox start create-dev-workspace \
  --arg name_suffix=feature-investigation \
  --arg lifetime_minutes=720 \
  --arg shared_volume_name=team-dev-context \
  -- herdr
```

To enable authenticated GitHub API requests, first register an appropriately scoped token in Chalk
Secrets, then add `--arg github_secret_name=GH_TOKEN` before `-- herdr`. The argument is the
secret's name, not its value. Hostname binding controls where Chalk supplies the credential; the
token's permissions determine which repositories and operations it can access. Neither example
configures raw IP/CIDR routes. PR resource detection requires a supported creation request, such as
GraphQL `createPullRequest`.

The examples do not set up model-provider authentication or customer access. Configure those
separately before making model requests or reaching customer systems. A sandbox lifetime is an upper
bound, not a guarantee against host maintenance or infrastructure failures. The examples are
publication assets, not a deployment into the author's live workspaces.
