Your first error in 5 minutes
Add a product, get a key, send one error, and see it explained on Problems.
1. Add your product#
In Controxity, on Today, press Add a product. Give it a name and the address of its code (https://github.com/you/shop.git). For private code, add a token that can read it: on GitHub, a fine-grained token with that one repository and Contents: Read-only. Controxity keeps its own copy of the code and never changes your repository with it.
Controxity sets up the rest from the code by itself. You can change any of it later:
- A first version, numbered from its controxity.yml, its newest
vX.Y.Ztag, app.json, package.json or pyproject.toml (else 1.0.0). Each push after it gets the next number. - Uptime checks offered for the addresses its code names (the deploy's
healthaddress, the package.jsonhomepage): one press each. - Pull requests: if its repository is on GitHub but Controxity's GitHub App can't reach it, Today says so, with a link to add it.
- A setup pull request, if its code has no controxity.yml (the box in Add a product is ticked unless you untick it, or press Open a pull request with it on the product's page). Controxity writes controxity.yml from the code (how it installs, tests and deploys, and its parts), AGENTS.md when there's no guide, and copies its SDK in where the server code is (
vendor/controxityfor Node.js). With the second box (or the button) the fixer also starts the SDK where the server starts, with AI, and keeps that only if the product's checks still pass; otherwise the description shows the two lines to add. Nothing changes until you merge it, and the app runs as before untilCONTROXITY_KEYis set.
2. Say where it runs, and get a key#
Open the product, then Where it runs → Add a place: its name (Shop live), staging or production. If the product is in parts (a server, a web app, a phone app), the place gets the part its name or kind says (Shop web → web, Android → the phone part, else the server part); change it under Change. Press Get a key. The key is shown once: keep it in your server's environment.
Under the places, Setup lists what each place still needs, in order: a button for what's done in Controxity, and one line to copy for what runs on your machine. Each step ticks itself when Controxity sees it done, and Today shows a place that isn't set up yet. Every kind of place, with pictures: Every place, step by step.
CONTROXITY_KEY=dep_••••••••••••••••
CONTROXITY_URL=https://controxity.example.comdep_ key in a web page or a phone app. For a page, use a browser key (pub_, it can only send). For a phone app, send its crashes through your server: see Phone apps.3. Put the SDK in#
The SDK is one file, kept with your code (it isn't on npm or PyPI yet). In your server's folder:
curl -fsSL https://controxity.example.com/sdk/node.js -o controxity.jscurl -fsSL https://controxity.example.com/sdk/python.py -o controxity.pyUse your Controxity's address; Connect on the product's page shows the line with it in. With TypeScript, also curl -fsSL …/sdk/node.d.ts -o controxity.d.ts.
const controxity = require("./controxity");
controxity.init({ key: process.env.CONTROXITY_KEY, url: process.env.CONTROXITY_URL, version: "1.0.0" });
app.use(controxity.express()); // Express: after your routesimport os, controxity
controxity.init(os.environ["CONTROXITY_KEY"], os.environ["CONTROXITY_URL"], version="1.0.0")
controxity.flask(app) # Flask; FastAPI: controxity.fastapi(app)4. Send one error#
Make a route throw, or call the check:
console.log(await controxity.check()); // { ok: true, why: "Connected to …" }print(controxity.check()) # (True, "Connected to …")Within a minute the error is on Problems: what it is in plain words, where it happened, how often, and on which version. The place shows Up on Where it runs: the SDK sends a heartbeat every minute.
Next#
- Let the fixer test a fix:
node controxity.js initwrites a first controxity.yml with your test command (how), or add checks for an app with no tests yet. - Tell Controxity about each release, with its source maps, from CI: Releases from CI.
- Protect what the fixer must never change: Protect files.
- Report your database, payments or other services: Health checks.