Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vossenwout committed Sep 29, 2024
1 parent 9a1ef51 commit e542275
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 2 additions & 0 deletions cmd/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ var generateCmd = &cobra.Command{
Long: `Bundle your project into a single file, starting from the directory you are in.
By default common configuration and setup files (ex. .vscode, .venv, package.lock) are ignored as well as non-text extensions like .jpeg, .png, .pdf.
For more information see: https://crevcli.com/docs
Example usage:
crev bundle
crev bundle --ignore-pre=tests,readme --ignore-ext=.txt
Expand Down
2 changes: 2 additions & 0 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import (

// Define a default template configuration
var defaultConfig = []byte(`# Configuration for the crev tool
# for more info see: https://crevcli.com/docs
# specify your CREV API key (necessary for review command) ! this overwrites the value you specify in the environment variable
# you can get one on: https://crevcli.com/api-key
crev_api_key: # ex. csk_8e796a8f6fdb15f0902eee0d4138b9d5975e244e6cc61ef502feaf37af24c7cb
# specify the prefixes of files and directories to ignore (by default common configuration files are ignored)
ignore-pre: # ex. [tests, readme.md, scripts]
Expand Down
12 changes: 5 additions & 7 deletions cmd/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@ import (
// reviewCmd represents the review command
var reviewCmd = &cobra.Command{
Use: "review",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Short: "Let an AI review your crev-project.txt",
Long: `Let an AI review the crev-project.txt you generated with the crev bundle command.
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
This command requires a CREV_API_KEY to be set as an environment variable or in your .crev-config.yaml.
You can generate an CREV_API_KEY on the crev website. For more information see: https://crevcli.com/docs`,
Run: func(cmd *cobra.Command, args []string) {
apiKey := viper.GetString("crev_api_key")
if apiKey == "" {
log.Fatal(`Api key is required for review. Generate yours on: ... and set it as CREV_API_KEY env var or specify it under 'crev_api_key' key in your .crev-config.yaml. For more information see: ...`)
log.Fatal(`Api key is required for review. Get yours on: https://crevcli.com/api-key and set it as CREV_API_KEY env var or specify it under 'crev_api_key' key in your .crev-config.yaml. For more information see: https://crevcli.com/docs`)
}
dat, err := os.ReadFile("crev-project.txt")
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ var rootCmd = &cobra.Command{
Use: "crev",
Version: Version,
Short: "Initialize",
Long: `Allows you to generate a textual representation of
your code and let it be reviewed by an AI.
Long: `Allows you to bundle your codebase and let it be reviewed by an AI. For more information see: https://crevcli.com/docs
`,
}

Expand Down

0 comments on commit e542275

Please sign in to comment.