Charlie works best when your repo can set up its own development environment from a fresh clone. Put setup where your repo already runs after dependency installation. For JavaScript and TypeScript repos, that usually meansDocumentation Index
Fetch the complete documentation index at: https://docs.charlielabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
postinstall. Gate Charlie-only work with IS_CHARLIE=1, store secrets in dashboard repository environment variables, and use AGENTS.md to tell Charlie how to use the environment.
Use this setup path for build, test, and tooling dependencies that can be installed noninteractively. Running services, such as Docker Compose stacks, background processes, or databases, should be documented in
AGENTS.md and handled as a separate workflow.What Charlie sets up automatically
Charlie creates repo-specific devbox blueprints so new runs start from a prepared environment instead of a blank machine. For most repos, Charlie will:- Clone the repository into the devbox.
- Provide common tools and package categories: Git, Bash, Python, Node package managers, build tools such as
make,cmake, andpkg-config, CLIs such asjq,ripgrep,curl, andgh,mise, and native headers used by frequent Node/image/database-client packages. - Detect JavaScript package managers and run dependency installation with the repo’s normal lifecycle scripts.
- Inject configured repository environment variables from the Charlie dashboard.
- Set
IS_CHARLIE=1during Charlie runs.
Recommended pattern
For JavaScript and TypeScript repos, use this shape for setup that can run after package-manager dependency installation has completed:Call a setup script from postinstall
Keep
package.json small and route the real work to a script. Do not use this path for apt packages that are required by dependency install scripts or native addon builds; postinstall runs too late for those.Guard Charlie-only work with IS_CHARLIE
The script should exit quickly outside Charlie unless you intentionally support local use.
Make setup idempotent and noninteractive
Design setup so it is safe to run more than once.
- Use
--no-install-recommendsfor apt packages. - Pass
DEBIAN_FRONTEND=noninteractiveon eachsudo apt-getcommand. - Prefer commands that no-op when packages already exist.
- Do not prompt for input.
- Do not print secrets.
Install system dependencies
Use real apt commands for packages that must exist before tests or build tools run, as long as those packages are not required during dependency installation itself. Example: native database client headers and build metadata:bun install, pnpm install, yarn install, or npm install is still running, do not rely on postinstall; ask Charlie for a pre-dependency-install blueprint update instead.
Non-JS repos
postinstall is the main recipe for work that can happen after JavaScript dependency installation. Charlie runs package-manager installs first, so dependency install scripts and native addon builds may fail before the root postinstall script can install missing system packages.
For non-JS repos, use the closest equivalent your team already trusts:
make setup-charliejust setup-charliescripts/setup-charlie-env.shmise installplus a documented setup task
AGENTS.md so Charlie knows to run it when preparing the repo or debugging environment failures.
Tell Charlie how to use the environment
UseAGENTS.md for durable instructions about setup, verification, and known caveats.
AGENTS.md should tell Charlie what to do, not repeat every package in the setup script.
Secrets and environment variables
Use dashboard repository environment variables for non-public keys, tokens, and runtime config needed during Charlie runs. Configure them under your repository settings in the Charlie dashboard. Good uses include:- Package registry tokens such as
NPM_TOKEN. - API keys for test doubles or sandbox services.
- Runtime config used by build or verification commands.
How blueprints work
Blueprints are repo-specific prepared devbox images. They are similar to Docker images: Charlie builds them from your repo setup so future devboxes can start faster with dependencies already present. Charlie checks blueprints on repository pushes and rebuilds them when the existing blueprint is stale. Changes may not apply immediately, and existing devboxes may keep using the environment they already have. If you need a setup change available right away, contact Charlie and ask for an on-demand blueprint update.Troubleshooting
apt-get prompts or hangs
Pass DEBIAN_FRONTEND=noninteractive on the sudo apt-get command and use -y:
A native dependency fails during package install
postinstall cannot repair apt packages required by dependency install scripts or native addon builds, because the package-manager install may fail before postinstall runs. Ask Charlie for a pre-dependency-install blueprint update for those packages.
Package install works once, then fails later
Make the script idempotent. Check for files, directories, or commands before creating or installing them, and prefer package manager commands that tolerate already-installed packages.A package is missing in Charlie but installed locally
If the package is needed after dependencies install, add it to the repo setup script and commit the change. If it is needed while dependencies install, ask Charlie for a pre-dependency-install blueprint update. Local machine state is not part of the blueprint unless the repo can recreate it.A change is not visible in a new Charlie run
Blueprint updates may lag. Ask Charlie for an on-demand blueprint update if the new package is blocking work.Setup needs a running service
Leave it out of this page’s setup path for now. Document the need inAGENTS.md and ask Charlie how to handle that workflow separately.
Complete example
package.json:
scripts/setup-charlie-env.sh:
AGENTS.md: