Backend & Full Stack Engineer: Engineering Developer Tools (DevTools), Go Cobra / Python Typer CLIs & Multi-Language SDKs

For API-first platforms, cloud infrastructure products, and AI agent runtimes, the developer experience (DX) of your Command-Line Interface (CLI) and typed Software Development Kits (SDKs) directly determines developer adoption. Hand-maintaining separate TypeScript, Python, and Go SDKs alongside a REST API inevitably leads to type drift and broken pagination helpers. As a Backend Engineer and Full Stack Engineer, I build cross-platform CLIs in Go (Cobra / Bubble Tea) and Python (Typer / Rich) alongside automated OpenAPI 3.1 SDK generation pipelines.

1. OAuth 2.0 Device Authorization Grant (RFC 8628) & OS Keyring Credential Storage

Production CLIs should never ask developers to paste long-lived API keys into shell arguments (where they leak into ~/.zsh_history and process tables) or store plaintext tokens in world-readable dotfiles. We implement the OAuth 2.0 Device Authorization Grant (RFC 8628) paired with OS-native credential vaults (macOS Keychain, Linux Secret Service / `libsecret`, Windows Credential Locker):

import time
import httpx
import typer

app = typer.Typer(no_args_is_help=True)

@app.command("login")
def cli_device_login(auth_base_url: str = "https://auth.aldianfazrihady.com") -> None:
    with httpx.Client(timeout=10.0) as client:
        init_resp = client.post(f"{auth_base_url}/oauth/device/code", json={"client_id": "afcom-cli"})
        init_resp.raise_for_status()
        data = init_resp.json()

        typer.secho(f"Open {data['verification_uri']} and enter code: {data['user_code']}", fg=typer.colors.CYAN, bold=True)
        interval = int(data.get("interval", 5))
        deadline = time.time() + int(data.get("expires_in", 600))

        while time.time() < deadline:
            time.sleep(interval)
            poll = client.post(
                f"{auth_base_url}/oauth/token",
                data={
                    "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
                    "device_code": data["device_code"],
                    "client_id": "afcom-cli",
                },
            )
            if poll.status_code == 200:
                tokens = poll.json()
                store_token_in_os_keyring("afcom-cli", tokens["access_token"])
                typer.secho("Authenticated successfully!", fg=typer.colors.GREEN)
                return
            if poll.json().get("error") != "authorization_pending":
                raise typer.Exit(code=1)

2. Automated OpenAPI 3.1 Spec Extraction & Idiomatic SDK Generation

By treating our FastAPI / Django Ninja / Go OpenAPI 3.1 schema as a single source of truth in CI/CD—paired with automated semantic versioning (Automated SemVer Release Pipelines) and Backend Engineer API architectures—every merged PR automatically compiles and publishes idiomatic Python, TypeScript, and Go client libraries with built-in exponential retry and auto-pagination iterators.

Need a Backend Engineer or Full Stack Engineer to build a polished CLI or multi-language SDK suite? Book a 1-Day Engineering Sprint.


About the Author — Hire Aldian Fazrihady (Cloud Engineer, GCP Professional Cloud Architect, GCP Professional Data Engineer, Backend, AI & Full Stack Engineer)

Aldian Fazrihady is a Top-Rated Senior Cloud Engineer, GCP Professional Cloud Architect (Google Cloud Certified), GCP Professional Data Engineer (Google Cloud Certified), Backend Engineer (Python, Django, FastAPI, Go, PostgreSQL), AI Application Engineer (LLMs, RAG, MCP, Google ADK, LangGraph), and Full Stack Engineer (React, Next.js, TypeScript) with 15+ years of production software engineering experience.

Hire Aldian Fazrihady on Upwork | Book 1-Day Programming Service ($100 USD / Rp 1.000.000) | View Live AI Portfolio | Send a Direct Message

Related Engineering Articles

Engineering Role Pillar Guides & Category Hubs