Start from a template
When you don’t have any code yet, jiayang init writes a small app that deploys as it is. Every template with code already checks who is calling with our SDK, so you start with sign-in done properly.
The templates
Section titled “The templates”| Template | What it is | Runs as |
|---|---|---|
static-site |
A page of HTML and CSS. Nothing to install or build. | A static site |
worker |
A JavaScript app that greets whoever signed in and shows their role | A Worker |
internal-tool |
A list your team shares and adds to, kept in the app’s own database | A Worker |
express |
A Node server with Express and @jiayang-cloud/sdk |
A container |
fastapi |
A Python app with FastAPI and the jiayang package |
A container |
Container apps need a paid plan. Static sites and Workers run on every plan, Free included.
jiayang init on its own lists them:
jiayang initMake one and deploy it
Section titled “Make one and deploy it”-
Write the template.
Terminal window jiayang init workerMade a Worker in ./worker, with README.md, index.js and jiayang.mjs.Deploy it, with your workspace in place of <workspace>:jiayang deploy <workspace>/worker ./worker --createIf you’re signed in and in one workspace, the command names it in place of
<workspace>.It goes in
./<template>unless you name a directory:jiayang init worker hellowrites it into./hello. Each template has aREADME.mdsaying what it does and how to change it. -
Deploy it.
Terminal window jiayang deploy acme/hello ./worker --createa Workerbecause it has index.jsVersion 1 (8b217ef9bf3c) is live.https://hello--acme.jiayang-apps.cloudThe app is private, so only you can open it until you share it.
-
Check who it thinks you are.
Terminal window jiayang curl acme/hello /api/me{"email":"ada@example.com","role":"owner","kind":"user"}200 OK
Files that are already there
Section titled “Files that are already there”jiayang init never replaces a file. If any of the template’s files is already in the directory, it writes nothing at all and says which:
error: ./worker already has README.md, index.js and jiayang.mjs, and a template never replaces a file. Nothing was written. Pick a new directory, or an empty one.Other files in the directory are left as they are, so you can write a template into a directory that already has, say, a .git.
In a script, --json gives the files it wrote and the command to run next:
jiayang --json init internal-tool team-listWith your AI agent
Section titled “With your AI agent”The agent plugin and MCP server have the same templates. Ask for an app that doesn’t exist yet, like “make me a page where the team can keep a list of orders”, and the agent calls list_templates, writes one with create_from_template, changes it to do what you asked, and deploys it.
create_from_template writes only inside the project the agent is working in, never into a hidden directory, and never over a file. Neither tool needs you to be signed in, since they don’t reach the platform. Deploying does.
Next steps
Section titled “Next steps”- Check who is calling, to change what each person can do.
- Share an app with your team.
- Run your app locally behind our sign-in with
jiayang dev.