diff --git a/docs/navigation.js b/docs/navigation.js index d3612e9f43..34243c0d15 100644 --- a/docs/navigation.js +++ b/docs/navigation.js @@ -10,7 +10,7 @@ export const navigation = [ { title: 'CLI Applications', - href: '/docs/cli/cli', + href: '/docs/quick-start/cli', desc: "Learn to build powerful command-line interface (CLI) applications using GoFr's app.NewCMD(), offering a robust framework for command-line tools." }, diff --git a/docs/cli/cli.md b/docs/quick-start/cli/page.md similarity index 83% rename from docs/cli/cli.md rename to docs/quick-start/cli/page.md index 6574cc96dd..bb367a0741 100644 --- a/docs/cli/cli.md +++ b/docs/quick-start/cli/page.md @@ -2,6 +2,11 @@ GoFr provides a simple way to build command-line applications using `app.NewCMD()`. This creates standalone CLI tools without starting an HTTP server. +## Configuration +To configure logging for CLI applications, set the following environment variable: +- `CMD_LOGS_FILE`: The file path where CLI logs will be written. If not set, logs are discarded. + + ## Getting Started Create a basic CLI application with subcommands: @@ -71,4 +76,4 @@ go build -o mycli ./mycli --help ``` -For more details, see the [sample-cmd example](../../examples/sample-cmd). +For more details, see the [sample-cmd example](../../../examples/sample-cmd).