Skip to content

feat(commands): Add version command#1738

Merged
aawsome merged 3 commits intorustic-rs:mainfrom
Turmaxx:main
Apr 23, 2026
Merged

feat(commands): Add version command#1738
aawsome merged 3 commits intorustic-rs:mainfrom
Turmaxx:main

Conversation

@Turmaxx
Copy link
Copy Markdown
Contributor

@Turmaxx Turmaxx commented Apr 22, 2026

This PR introduces a dedicated version command to the CLI. While the version information is often available via --version, a standalone command allows for more detailed output, including build metadata, which is essential for debugging issues related to specific repository features or experimental locks.

This PR also adds consistency with common Rust tool patterns and also restic (e.g., cargo version, restic version).

Usage

rustic version

Output:

rustic 0.11.2

NOTE: I have disabled logging when using the version command.

@aawsome
Copy link
Copy Markdown
Member

aawsome commented Apr 22, 2026

Hi @Turmaxx!
Thanks a lot for the PR! Can you please fix the rustfmt and typo error found by the CI? (You don't have to care about the security topic; this is also contained in main, currently)

@Turmaxx
Copy link
Copy Markdown
Contributor Author

Turmaxx commented Apr 23, 2026

Hey @aawsome,
I have formatted and fixed the typos in src/command.rs. I think everything looks good. will it be necessary to log commands?

Copy link
Copy Markdown
Member

@aawsome aawsome left a comment

Choose a reason for hiding this comment

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

LGTM!

@aawsome aawsome merged commit b5588a0 into rustic-rs:main Apr 23, 2026
29 of 30 checks passed
@Turmaxx
Copy link
Copy Markdown
Contributor Author

Turmaxx commented Apr 23, 2026

Thanks!

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.

2 participants