SDKs & CLI
Depllo ships a CLI and Node/TypeScript, Python and Go SDKs,
all wrapping the same REST API. Each authenticates with a
workspace API key (sk_live_…, from Dashboard → API Keys)
— see API authentication.
CLI
npm install -g @forjio/depllo-cli
depllo auth login
Sign in
| Command | What it does |
|---|---|
depllo auth login |
Sign in with your Forjio (Huudis) account: the CLI prints a code and opens the browser (device flow); approve it there. --no-browser only prints the link. |
depllo auth login --api-key <key> |
Save a workspace API key (sk_live_…, from Dashboard → API Keys) instead — for servers and CI. Pass - as the key to read it from stdin, so it stays out of your shell history. |
depllo auth whoami |
Show what the CLI is signed in as: the Huudis user, or which key. |
depllo auth logout |
Delete the saved session or key. |
Each auth command takes --json. auth login saves to
~/.depllo/session.json (readable only by you; a Huudis session refreshes
itself). DEPLLO_TOKEN in the environment always wins over the saved
sign-in, so CI can skip auth login entirely. --issuer <url> (or
DEPLLO_HUUDIS_ISSUER) and --client-id <id> (or DEPLLO_CLI_CLIENT_ID,
default depllo-cli) point the sign-in at another Huudis or OIDC client.
Commands act on your active workspace.
# Projects
depllo projects list
# Pipelines
depllo pipeline list <project> # by name, repo, or proj_ id
depllo pipeline run <project> --ref main
depllo pipeline cancel <project> <iid>
depllo pipeline logs <jobId> --follow # tail a job's logs
# Runners
depllo runners list
# Validate a config locally before you push
depllo validate .depllo-ci.yml
Point the CLI at a different environment with DEPLLO_API_URL, or pass a
credential directly with DEPLLO_TOKEN — an sk_live_… API key is the one
to use in CI and scripts.
Every API route also has a command, generated from the API spec:
depllo api --help # the areas
depllo api projects create-pipelines proj_01hx… --ref main
depllo api api-keys list # (key management needs a signed-in person)
JavaScript / TypeScript SDK
npm install @forjio/depllo
import { DeplloClient } from "@forjio/depllo";
const depllo = new DeplloClient({
token: process.env.DEPLLO_TOKEN!, // sk_live_… API key (defaults to $DEPLLO_TOKEN)
// baseUrl defaults to https://depllo.forjio.com/api/v1
});
// List projects
const { data: projects } = await depllo.projects.list();
// Run a pipeline
const { data: pipeline } = await depllo.pipelines.run("proj_01hx…", {
ref: "main",
variables: { DEPLOY_ENV: "staging" },
});
// Tail a job's logs
const { data: log } = await depllo.jobs.log("job_01hx…");
// Check workspace usage
const { data: usage } = await depllo.usage.get();
Webhook endpoints and their delivery log are typed too
(depllo.webhookEndpoints.create/list/get/update/delete/eventTypes,
depllo.webhookDeliveries.list/get/retry), and verifyWebhook checks an incoming
delivery's Depllo-Signature — see Webhooks.
Every method returns the family envelope { data, error, meta }. Mutating
calls send an Idempotency-Key automatically. Beyond the typed resources
above, depllo.api has one method per API route (projectsList,
jobsLog, apiKeysList, …), generated from the API spec. See the
API reference for the full surface.
Python SDK
pip install forjio-depllo
from forjio_depllo import DeplloClient, DeplloError
depllo = DeplloClient() # token= or the DEPLLO_TOKEN env var (an sk_live_… key)
projects = depllo.api.projects_list()["data"]
depllo.api.projects_create_pipelines(projects[0]["id"], ref="main",
variables={"DEPLOY_ENV": "staging"})
log = depllo.api.jobs_log("job_01hx…", from_=0)["data"]
Like the JS SDK, every call returns the envelope dict (["data"]) and a
failed response raises DeplloError (.code, .status, .message,
.request_id). verify_webhook(raw_body=, signature=, secret=) checks an incoming
webhook delivery (Webhooks). client.api has one method per API route, named
<area>_<action> like the CLI's depllo api <area> <action>.
A route that answers with bytes (a job artifact, a badge SVG) has a file as its
data — {"data": bytes, "contentType", "filename"} in Python, a
DeplloFile in JS; the CLI writes the bytes to stdout
(depllo api jobs artifacts-download <job> <artifact> > dist.zip).
Go SDK
go get github.com/hachimi-cat/depllo-go
import depllo "github.com/hachimi-cat/depllo-go"
c := depllo.New(depllo.Config{Token: os.Getenv("DEPLLO_TOKEN")}) // an sk_live_… key
raw, err := c.API.ProjectsList(ctx)
var projects []struct{ ID, Name string }
err = depllo.Decode(raw, &projects)
_, err = c.API.ProjectsCreatePipelines(ctx, projects[0].ID, &depllo.ProjectsCreatePipelinesArgs{
Ref: "main",
Variables: map[string]any{"DEPLOY_ENV": "staging"},
})
c.API has the same routes as the other SDKs, Go-cased (ProjectsCreatePipelines),
each taking the path parameters and an *<Method>Args. Like the JS and Python SDKs a
call returns the whole envelope (as json.RawMessage), so list cursors are kept —
depllo.Decode reads its data, depllo.DecodeEnvelope the rest; a failure is a
*depllo.Error. depllo.VerifyWebhook(body, signature, secret, 0) checks an incoming
webhook delivery (Webhooks).