Skip to content

Conversation

@codegen-sh
Copy link
Contributor

@codegen-sh codegen-sh bot commented Aug 19, 2025

This PR adds a new CLI documentation section to the Overview in the docs. The CLI section is placed after the API section as requested.

The documentation includes:

  • Installation instructions
  • Authentication methods
  • Basic usage examples
  • Available commands with descriptions
  • Common workflows
  • Environment variables
  • Use cases and benefits

This provides a good starting point for users to understand and use the Codegen CLI.


💻 View my work • 👤 Initiated by @rushilpatel0About Codegen
⛔ Remove Codegen from PR🚫 Ban action checks

Co-authored-by: Rushil Patel <rpatel@codegen.com>
@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Co-authored-by: Rushil Patel <rpatel@codegen.com>
Co-authored-by: Rushil Patel <rpatel@codegen.com>
Co-authored-by: Rushil Patel <rpatel@codegen.com>
@rushilpatel0 rushilpatel0 marked this pull request as ready for review August 19, 2025 21:38
@rushilpatel0 rushilpatel0 requested review from a team and codegen-team as code owners August 19, 2025 21:38
@rushilpatel0 rushilpatel0 merged commit 9d24402 into develop Aug 19, 2025
18 checks passed
@rushilpatel0 rushilpatel0 deleted the codegen-bot/add-cli-documentation branch August 19, 2025 21:38
@codegen-sh
Copy link
Contributor Author

codegen-sh bot commented Aug 19, 2025

Found 1 critical and 1 important issue. PR is already merged/closed, so I couldn’t add inline comments—putting the actionable suggestions here.

  1. Security vulnerability: Token exposure via CLI flag (CRITICAL)
    Passing secrets via command-line flags leaks into shell history, process lists (ps/top), and sometimes telemetry. Recommend documenting safer alternatives and de-emphasizing the --token flag.
### `codegen login` **Description:** Store authentication token. **Usage Patterns:** - **Interactive login (recommended):** `codegen login` - **From environment variable (recommended):** `CODEGEN_API_TOKEN=YOUR_API_TOKEN codegen login` - **From stdin (safer than flag):** `echo "$CODEGEN_API_TOKEN" | codegen login` **Options:** - `--token TEXT` API token to store (not recommended; exposes token in shell history and process list) - `--no-verify` Skip token verification (flag) 
  1. Logic/Docs error: Incorrect env var name for --org-id default (IMPORTANT)
    In the codegen agent section, the --org-id option says it defaults to CODEGEN_API_TOKEN/REPOSITORY_ORG_ID. This is misleading: API token is not an organization ID. Other sections use CODEGEN_ORG_ID, which looks correct.
**Options:** - `--prompt, -p TEXT` The prompt to send to the agent (mutually exclusive with --id unless using create) - `--id INT` Agent run ID to fetch or pull - `--json` Output raw JSON response when fetching (flag) - `--org-id INT` Organization ID (defaults to CODEGEN_ORG_ID/REPOSITORY_ORG_ID or auto-detect) - `--model TEXT` Model to use for this agent run (optional) - `--repo-id INT` Repository ID to use for this agent run (optional) 

Please review these and update the docs to avoid unsafe guidance and confusion around env vars.

🔍 View my analysis: https://codegen.com/agent/trace/77751

@github-actions
Copy link
Contributor

🎉 This PR is included in version 0.56.14 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

2 participants