Skip to content

Add --version flag to jitsudo CLI and jitsudod server #24

Description

@youshibin

Problem

Running jitsudo --version or jitsudo version returns an error:

```
Error: unknown flag: --version
Error: unknown command "version" for "jitsudo"
```

Same issue applies to jitsudod. Users have no way to confirm which version they have installed from the CLI itself (other than brew info jitsudo for Homebrew installs).

Proposed solution

Add a --version flag (or version subcommand) to both jitsudo and jitsudod that prints the installed version, e.g.:

```
jitsudo v0.1.0
jitsudod v0.1.0
```

The version string is already injected at build time via -ldflags (internal/version.Version), so this should be straightforward to wire up in both root Cobra commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions