Your first Bahama Cloud project
In this tutorial, you’ll ask a coding agent to build a small Vite application and deploy it on Bahama Cloud. You give the agent the outcome; it handles the commands, configuration, and provider workflow with Bahama.
The steps below show what the agent will do on your behalf. You do not need to copy each command into a terminal. They are here so you can understand the work, recognize the moments that need your attention, and troubleshoot without guesswork.
You do not need to create an account with an underlying cloud provider or copy deployment credentials into your project. Bahama will describe every infrastructure change before it makes one, and the first deployment will wait for your approval.
Before you begin
You need:
- Bahama installed;
- an empty workspace or an existing Vite application; and
- a coding agent open in the application workspace.
The examples use names like hello-bahama. Your agent should choose names that
fit your real project rather than copying them blindly.
Your agent will do most of these steps. Your part is small but important: prompt the agent’s task, choose and sign in to accounts, and approve final plans.
Project Steps
Give your agent the job
Open Claude Code, Codex, or another coding agent in the workspace and try this:
Build a small, polished Vite app that displays “Hello from Bahama.” Use Bahama
Cloud to deploy it. Handle the setup and commands for me, and let me know when
Bahama asks me to approve a consequential plan.If you already have an application, replace the first sentence with what you want changed or deployed. The infrastructure workflow stays the same.
Your agent prepares and inspects the application
For a new project, the agent creates the Vite app, installs its dependencies, and confirms that it builds. For an existing project, it starts by understanding what is already there.
It then asks Bahama to inspect the workspace:
bahama inspect --jsonInspection gives the agent non-secret facts: framework signals, package manager, scripts, environment-variable names, and existing Bahama files. It never reads environment-variable values.
The agent should confirm that the detected framework is vite-spa and that the
project has a working build script before moving on.
Your agent confirms the provider fit
bahama providers bahama-cloud --format agentThis live provider guide tells the agent what the installed Bahama version can deploy through Bahama Cloud. A Vite SPA is supported; Next.js, Node servers, and Python applications are not.
If the project does not match, the agent should explain the mismatch and ask you how to proceed. It should not quietly reshape the application to fit a provider.
Your agent describes the project to Bahama
bahama init --name hello-bahama --application bahama-cloud --framework vite-spaThe agent runs init to write bahama.yaml and add .bahama/ to .gitignore.
This does not contact Bahama Cloud or create a project.
The generated manifest looks like this:
version: 1
project:
name: hello-bahama
application:
framework: vite-spa
environments:
local:
provider: local
production:
provider: bahama-cloudThe application has one framework and two environments. local represents
normal development in this workspace. production is the hosted Bahama Cloud
environment.
If the deployable app lives below the repository root, the agent adds its relative path:
application:
framework: vite-spa
dir: apps/webBahama asks you to sign in if needed
Your agent asks Bahama to compile an infrastructure plan:
bahama planIf this machine is not connected to a Bahama account, Bahama returns
auth required. Your agent can start the login:
bahama auth login bahama-cloudYour browser opens the Bahama consent flow. This is one of the few steps you
complete yourself because the account belongs to you. In a headless or SSH
environment, your agent can use --no-browser; Bahama displays a URL and
one-time code that you can finish in another browser.
After you finish signing in, the agent runs bahama plan again.
You review the infrastructure plan
For a new project, the plan includes a consequential step to create the Bahama Cloud project. It does not upload or deploy the application yet.
The result will resemble this:
approval required Plan plan_7f4c9b21a3d0 needs approval.
! Create Bahama Cloud project hello-bahama
creates a resource
Account: you@example.comYour agent should summarize the plan in plain language. Check the project name,
account, and each ! step. If they match what you intend, tell the agent to
approve and continue. You do not need to copy the plan ID yourself.
Your agent applies exactly what you approved
After your approval, the agent uses the exact plan ID Bahama printed:
bahama apply plan_7f4c9b21a3d0 --approvedBahama creates or adopts the project and verifies it before updating
bahama.lock. The agent can then commit the project files if you asked it to:
git add bahama.yaml bahama.lock .gitignore
git commit -m "Configure Bahama deployment"bahama.yaml records what you want. bahama.lock records which verified live
project this repository is connected to.
Your agent validates the application
Before deployment, the agent runs the project’s normal build:
npm run buildBahama Cloud will install from the checked-in lockfile and run the same build
script in an isolated build environment. The build must produce
dist/index.html.
Values whose names begin with VITE_ are included in browser code. Never put
API keys, development tokens, or database credentials in a VITE_ variable.
You approve the first deployment
Your agent now asks Bahama to deploy the production environment:
bahama deploy productionThe first deployment is consequential, so deploy stops and prints a new plan
instead of publishing immediately. The agent explains the source directory,
framework, account, and deployment step. If they look right, tell it to
continue.
The agent applies the exact deployment plan:
bahama apply plan_a91d02e4c6f8 --approvedBahama packages the current source, uploads it directly, waits for the build and publication job, and verifies the live URL. The operation is not complete until the production page responds successfully.
Ask your agent to ship the next change
Later, you can stay in the same conversational workflow:
Change the heading to “Hello again from Bahama,” test it, and deploy the update.Your agent edits and tests the application, then runs:
bahama deploy productionOnce the environment and provider configuration are established, a code-only redeployment is routine and can apply immediately. If infrastructure or provider configuration changed, Bahama stops with another plan for review.
Ask about the project later
You can ask, “Is this project healthy?” or “What is currently deployed?” Your agent checks with:
bahama status --jsonStatus compares the committed lock with the live project and reports whether the production environment is ready, not ready, unhealthy, or unknown. It does not change anything.
You now have a repeatable deployment
The repository carries its intended infrastructure and verified identity with
it. A future agent session can read bahama.yaml, confirm the live state, and
continue without recreating the project or relying on old chat history. You can
keep asking for outcomes in ordinary language while Bahama gives every agent
the same safe, inspectable execution path.
When the application needs server routes or a database, move to a supported Vite + Hono shape and add the Bahama Cloud database deliberately. The provider guide will show those additions as new consequential work before anything is created.