Skip to content

update: new CLI - #21

Merged
Asuniia merged 26 commits into
mainfrom
feat/refactoring
Sep 14, 2026
Merged

Asuniia merged 26 commits into
mainfrom
feat/refactoring

Conversation

@Asuniia

@Asuniia Asuniia commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Théo LAGACHE and others added 23 commits September 11, 2026 10:41
Design validated in brainstorming: flat layout with services/engines/ui
layers, OOP commands, Jinja2 remote templates with manifest, compose
rendered from .env + databases.json (no state file), non-interactive
mode, error hierarchy, OTel-ready telemetry, CI hardening and release
workflow replacing ./release.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ACLkgaiP48pBMyi7kZZ4a
…is/valkey

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ACLkgaiP48pBMyi7kZZ4a
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ACLkgaiP48pBMyi7kZZ4a
…le rewrite)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ACLkgaiP48pBMyi7kZZ4a
…ory)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ACLkgaiP48pBMyi7kZZ4a
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ACLkgaiP48pBMyi7kZZ4a
The dashboard kept its summary and confirmation through the refactor; the
agent lost them when database setup moved to a loop that writes as it goes.
Restored for the agent itself, before its files are written, with --yes to
skip the prompt like the dashboard. The Edge Key is masked in the summary.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
'portabase agent NAME' becomes 'portabase agent create NAME' and 'db' moves
under 'agent'. A Typer group cannot carry both a positional argument and
subcommands, and the dashboard is about to grow 'auth' and 'set', so both
components get the same shape now, before the refactor ships.

'portabase db' survives one release as a deprecated alias that warns, and
the old 'agent NAME' form answers with the new command instead of a bare
'No such command'.

restart now runs 'up -d' before 'restart': compose restart neither creates
a service added since the last start nor rereads env_file, so the advice
printed after 'db add' was wrong.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
A declarative registry maps 18 dashboard settings to their .env variable,
type, default and prompt; flags, prompts, validation and display derive
from it. OIDC and OAuth providers are stored by prefix in .env and read
back by scanning it, the same way managed databases are.

DashboardProject refuses three states that would leave an instance
unreachable: skipping onboarding without an initial account, disabling
password login with no provider, and a provider whose callback would point
at localhost.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
'dashboard' is now a group. create derives its settings flags from the
registry — --api, --mcp, --skip-onboarding, --admin-password-stdin,
--password-auth/--no-password-auth and the rest — so a new setting is one
registry entry. In interactive mode the wizard offers the API, onboarding
and authentication sections behind a single question, off by default.

show prints settings by section with secrets masked, plus the providers
and the callback URL each one needs registered. set validates keys and
values through the same registry; unset returns to the dashboard default.

auth add|list|remove manage OIDC and OAuth providers stored by prefix in
.env. OAuth ids are limited to the names the dashboard recognizes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
The settings registry now serves both components. The agent gains the five
variables its documentation lists but the CLI never exposed — DATA_PATH,
TMPDIR, RETRY_ATTEMPTS, RETRY_BACKOFF_MS, SSL_CERT_FILE — plus LOG_LEVEL as
a choice; agent create derives its flags from the registry like dashboard
create does. host_gateway is a compose fact rather than a variable, so the
registry allows env-less settings that map to a project attribute.

show, set and unset are one implementation shared by both components,
parameterised by the project loader and renderer. The agent template
renders whichever optional variables are set, so they reach the container
without an env_file (which would also expose the managed database
credentials).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
… at it

The agent uses rustls, which ignores the system CA store, so the only way
to trust an internal CA is SSL_CERT_FILE — and the file it names must exist
inside the container. Setting the variable alone would have produced an
agent that fails at startup.

'agent set NAME ca_bundle ./ca-bundle.crt' now bind-mounts the host file
read-only at a fixed path and sets SSL_CERT_FILE to that path. The host
path lives in .env as CA_BUNDLE for compose interpolation only; it is not
passed to the container. set refuses a path that does not exist, and the
help says why the bundle must include the Mozilla roots.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
…es in the mount

The host path of the CA bundle is not a container variable, so it no
longer goes in .env. It is a compose fact like host_gateway: written as the
bind-mount source and read back from the existing compose on load.
SSL_CERT_FILE stays in .env with the in-container path, which is what the
agent consumes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
Rename commands/dashboard_auth.py to commands/auth.py. Both arguments of
'dashboard auth add' become optional and are asked interactively when
omitted (kind as a choice, OAuth provider from the known list, OIDC id as
free text). 'dashboard auth remove' without an id offers the configured
providers as a selection list. Non-interactive mode keeps failing with
'Missing --kind' / 'Missing --id'.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
Rename commands/dashboard_auth.py to commands/auth.py. Both arguments of
'dashboard auth add' become optional and are asked interactively when
omitted (kind as a choice, OAuth provider from the known list, OIDC id as
free text). 'dashboard auth remove' without an id offers the configured
providers as a selection list. Non-interactive mode keeps failing with
'Missing --kind' / 'Missing --id'.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbemoDqsmMdRq6PS5Vaup8
@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: a6b8fbb1-69d3-4f85-8a46-e92a5c839d40


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Asuniia
Asuniia merged commit 2d3356d into main Sep 14, 2026
9 checks passed
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.

1 participant