Skip to content

Add cli command to build docs#27

Open
omkar-foss wants to merge 2 commits into
chaoss:mainfrom
omkar-foss:feat/cli-command-docs
Open

Add cli command to build docs#27
omkar-foss wants to merge 2 commits into
chaoss:mainfrom
omkar-foss:feat/cli-command-docs

Conversation

@omkar-foss

@omkar-foss omkar-foss commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Closes #15.

This PR adds a new command ai-detection-action docs, details in help snippet below.

To avoid clutter here I've pushed generated docs separately to this commit in my fork, you can preview those markdown docs here.

$ ai-detection-action docs --help
Build docs in markdown, manpages, rest formats

Usage:
  ai-detection docs [flags]

Examples:
  # simply build markdown docs at default output dir (./docs/cli)
  ai-detection-action docs

  # build rest docs at default output dir
  ai-detection-action docs --format rest

  # build manpages docs at a specific 'documentation' dir
  ai-detection-action docs --format manpages --out ./documentation

Flags:
      --format string   markdown|manpages|rest (default "markdown")
  -h, --help            help for docs
      --out string      output directory (default "./docs/cli")

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@MoralCode

Copy link
Copy Markdown
Contributor

ai-detection-action feels like a pretty long name to expect people to type on the CLI. any ways to make this shorter?

@omkar-foss

omkar-foss commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

any ways to make this shorter?

How about aida? (ai)-(d)etection-(a)ction

@MoralCode

Copy link
Copy Markdown
Contributor

this is for the golang core, which is technically separate from the github action wrapper.

what if we had the CLI name be disclosure?

@omkar-foss

Copy link
Copy Markdown
Contributor Author

what if we had the CLI name be disclosure?

Looks good, could it be a bit more informative like disclosure-cli or ai-disclosure-cli?

@MoralCode

Copy link
Copy Markdown
Contributor

what if we had the CLI name be disclosure?

Looks good, could it be a bit more informative like disclosure-cli or ai-disclosure-cli?

i feel like if people have downloaded this project and are using it as a CLI, they may alrady know what its about. IMO if we want to be extra clear, we should make a note of this projects purpose in the --help menu (i.e. where most CLI users will go if they need help, dont know what this program does or how to use it).

I think the shorter, easier to remember binary name is going to make it easier to use than the additional verbosity (especially when the help menu is a better place for that verbosity)

@omkar-foss

Copy link
Copy Markdown
Contributor Author

Sure if we're making --help comprehensive along with short cli name (disclosure) then it sounds good to me, thanks for elaborating

@omkar-foss

Copy link
Copy Markdown
Contributor Author

Sure if we're making --help comprehensive along with short cli name (disclosure) then it sounds good to me, thanks for elaborating

@MoralCode I've created issue #34 based on our conversation above in this thread.

@MoralCode MoralCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Repo has been renamed to support #34. Can you:

  1. update the various imports in this project to use the new name
  2. make sure the binaries now build as disclosure
  3. ensure any changes that need to be made in this PR get made (i.e. add the help text to explain the project?

Comment thread cmd/cmd.go Outdated
@omkar-foss

omkar-foss commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

1 & 2 from this comment done in #36.

Regarding 3:

add the help text to explain the project

I think adding help text is a good first issue for newcomers. Would be nice if we create a separate issue for this.

@MoralCode

Copy link
Copy Markdown
Contributor

sounds good. this should probably be rebased on top of the renaming changes to pre-emptively deal with any merge conflicts

@omkar-foss omkar-foss force-pushed the feat/cli-command-docs branch from 6c2d870 to 11a5f79 Compare May 29, 2026 06:07
@omkar-foss

Copy link
Copy Markdown
Contributor Author

sounds good. this should probably be rebased on top of the renaming changes to pre-emptively deal with any merge conflicts

Done, rebased with main, thanks.

@omkar-foss

Copy link
Copy Markdown
Contributor Author

@andrew @MoralCode quick nudge, this pr is ready to review & merge, thanks.

@omkar-foss omkar-foss requested a review from MoralCode May 30, 2026 08:06

@andrew andrew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would be good to have some tests for this

@omkar-foss

Copy link
Copy Markdown
Contributor Author

Would be good to have some tests for this

Sure will add some

Signed-off-by: Omkar P <45419097+omkar-foss@users.noreply.github.com>
Signed-off-by: Omkar P <45419097+omkar-foss@users.noreply.github.com>
@omkar-foss omkar-foss force-pushed the feat/cli-command-docs branch from 11a5f79 to 0a7a19c Compare June 13, 2026 15:52
@omkar-foss

Copy link
Copy Markdown
Contributor Author

Would be good to have some tests for this

Sure will add some

@andrew Have added tests, check it out when possible, thanks

@MoralCode MoralCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Havent tested directly but agree with the direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Use our new CLI library to generate docs

3 participants