Skip to content

feat: contextual landing page#152

Merged
gianarb merged 3 commits intomainfrom
feat/contextual-landing
Apr 17, 2026
Merged

feat: contextual landing page#152
gianarb merged 3 commits intomainfrom
feat/contextual-landing

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

@scotwells scotwells commented Apr 16, 2026

Summary

Running datumctl with no arguments used to dump a wall of usage text. Now it opens a context-aware welcome screen that meets you where you are.

Logged out

If you haven't authenticated yet, the landing page explains your options with enough detail to pick the right one:

Welcome to Datum Cloud.

datumctl manages Datum Cloud resources from your terminal — DNS zones,
projects, workloads, IAM, and more.

You're not signed in yet. Pick the login style that fits your situation:

  datumctl login
    Opens a browser for OAuth sign-in, then walks you through picking
    a default context. The easiest path for everyday use.

  datumctl login --no-browser
    Prints a short code and a URL to visit on any device — no browser
    needed on this machine. Good for SSH sessions, remote servers, or
    any environment where a browser can't be launched locally.

  datumctl login --credentials ./key.json
    Authenticates as a machine account for CI/CD and automation.
    Non-interactive — no browser, no prompts.
    Requires: a machine account created in the Datum Cloud portal and
    its credentials JSON file downloaded from there. Human accounts
    cannot use this path.

Run 'datumctl --help' for the full command reference.

Logged in, no context selected

If you're authenticated but haven't picked a context yet, the landing shows your identity and nudges you to pick one:

Good morning, Jane.

  Signed in as   jane@acme.com
  Context        (none — run 'datumctl ctx use' to pick one)
  Access         2 org(s), 4 project(s)

First, pick a working context:

  datumctl ctx use       Interactive context picker
  datumctl ctx           List all available contexts
  Switch account         datumctl auth switch

Tip: 'datumctl ctx' with no arguments opens an interactive context picker.

Run 'datumctl --help' for the full command reference.

Logged in with an active context

Once a context is set, the landing greets you, confirms your identity and active project, shows access breadth, suggests task-oriented next steps, and rotates a tip on each run:

Good morning, Jane.

  Signed in as   jane@acme.com
  Context        Infrastructure (acme-corp/infra)
  Access         2 org(s), 4 project(s)

What would you like to do?

  Explore what's there   datumctl get <resource>
                         datumctl describe <resource> <name>
  Ship something         datumctl apply -f file.yaml
                         datumctl create <resource> ...
  Explore the API        datumctl api-resources
  Follow the audit trail datumctl activity
  Switch context         datumctl ctx
  Switch account         datumctl auth switch

Tip: 'datumctl apply -f -' reads YAML from stdin — great for piping from scripts.

Run 'datumctl --help' for the full command reference.

Stacked on

Stacks on #149 — depends on the session/context discovery work landed there.

Test plan

  • datumctl with no active session shows the logged-out landing with all three login options and their descriptions
  • datumctl when signed in but no context selected shows the identity block with (none) context and the pick-a-context suggestions
  • datumctl when signed in with a context shows the greeting, identity block, task-grouped suggestions, and a rotating tip
  • datumctl --help still shows full usage as before
  • Tips rotate across runs (seeded by nanosecond timestamp)

🤖 Generated with Claude Code

@scotwells scotwells force-pushed the feat/contextual-landing branch from 094e615 to 9c6a2bf Compare April 16, 2026 15:48
@scotwells scotwells changed the base branch from feat/context-discovery-v2 to feat/context-discovery April 16, 2026 15:49
Show a context-aware welcome screen when datumctl is run with no
subcommand. Unauthenticated users see a guided onboarding page that
explains all three login paths (browser, --no-browser for headless
environments, and --credentials for machine accounts) including
prerequisites. Authenticated users see a personalised greeting by
first name and time of day, their active email and context display
name, access breadth (org/project count), contextual next-step
suggestions based on whether a context is selected, and a rotating
tip drawn from an 18-entry pool covering workflow, discovery, auth,
and power-user patterns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scotwells scotwells force-pushed the feat/contextual-landing branch 2 times, most recently from 5baf539 to e344ccd Compare April 16, 2026 16:27
@scotwells scotwells changed the title feat: contextual landing page and services command feat: contextual landing page Apr 16, 2026
Base automatically changed from feat/context-discovery to main April 16, 2026 17:34
@scotwells scotwells marked this pull request as ready for review April 16, 2026 17:40
Copy link
Copy Markdown

@ecv ecv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massive improvement. I also wonder about including a proper manpage.

@gianarb gianarb merged commit 0b3daef into main Apr 17, 2026
1 check passed
@gianarb gianarb deleted the feat/contextual-landing branch April 17, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants