Skip to content

Feature/config not interactive migrated to nextcloud cmd - #10468

Merged
mgallien merged 7 commits into
masterfrom
feature/configNotInteractiveMigratedToNextcloudCmd
Aug 14, 2026
Merged

Feature/config not interactive migrated to nextcloud cmd#10468
mgallien merged 7 commits into
masterfrom
feature/configNotInteractiveMigratedToNextcloudCmd

Conversation

@mgallien

Copy link
Copy Markdown
Collaborator

Resolves

#

Summary

TODO

  • ...

Checklist

AI (if applicable)

@mgallien mgallien added this to the 35.0.0 milestone Jul 28, 2026
@mgallien
mgallien force-pushed the feature/configNotInteractiveMigratedToNextcloudCmd branch 3 times, most recently from 043d4aa to 9884d61 Compare July 29, 2026 11:38
@mgallien

Copy link
Copy Markdown
Collaborator Author

/backport! to stable-4.0 please

@mgallien

Copy link
Copy Markdown
Collaborator Author

/backport to stable-34.0 please

@mgallien
mgallien force-pushed the feature/configNotInteractiveMigratedToNextcloudCmd branch from 9884d61 to 255ca72 Compare July 29, 2026 15:03
@mgallien
mgallien force-pushed the feature/configNotInteractiveMigratedToNextcloudCmd branch 2 times, most recently from 7f16350 to fddd5b3 Compare August 13, 2026 13:45
@Rello
Rello self-requested a review August 13, 2026 14:05
@mgallien
mgallien force-pushed the feature/configNotInteractiveMigratedToNextcloudCmd branch from 04abfa5 to 941e07d Compare August 13, 2026 16:52
FolderMan access to a somehow singleton was awkward

make it behaves a bt more like a common singleton but also enables it to
be reset when needed for automated tests

will enable access ot it from nextcloducmd

while doing that discover and fix access to private members of FolderMan
from unexpected places

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
will make code smaller and faster

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Ports the non-interactive account provisioning feature from the GUI
client to nextcloudcmd. When --userid, --apppassword, and --serverurl
are provided, nextcloudcmd validates the credentials against the server,
creates the local sync folder if --localdirpath is given, writes the
account and folder configuration to disk (in the same format read by
the GUI client), and stores the password in the system keychain.

Progress and errors are reported on stdout/stderr and the process exits
with 0 on success or 1 on failure.

New flags: --userid, --apppassword, --serverurl, --localdirpath,
--remotedirpath, --isvfsenabled, --confdir.

nextcloudcmd links against nextcloudCore to gain access to
AccountSetupCommandLineManager, AccountSetupFromCommandLineJob and
FolderMan (which must be instantiated before setupAccountFromCommandLine
is called so the singleton is available).

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Assisted-by: ClaudeCode:claude-sonnet-4-6
teh executable return code should be 0 in case it worked and non 0 for
error cases

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
if the server signals that login is needed, teh account state may be
swithed to "signed out"

ensure this is followed by a login proces during which the user has to
provide credentials

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien
mgallien force-pushed the feature/configNotInteractiveMigratedToNextcloudCmd branch from 941e07d to 94b09bf Compare August 13, 2026 19:50
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien
mgallien force-pushed the feature/configNotInteractiveMigratedToNextcloudCmd branch from 94b09bf to 240124a Compare August 13, 2026 21:42
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
Image 65.3% Coverage on New Code (required ≥ 80%)
Image 21 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Image Catch issues before they fail your Quality Gate with our IDE extension Image SonarQube for IDE

…cloudCmd

Signed-off-by: Rello <Rello@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10468.zip

Digest: sha256:849c42197e0e7faf931e55dd1c1fd8ac35781e432acfd22a569694467bd52c7f

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien
mgallien merged commit 8aaf6d1 into master Aug 14, 2026
20 of 22 checks passed
@mgallien
mgallien deleted the feature/configNotInteractiveMigratedToNextcloudCmd branch August 14, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants