beacon generate command scans a local repository or GitHub URL, analyzes its structure and code, and generates a standards-compliant AGENTS.md file that describes the repository’s agent-usable capabilities.
Usage
Arguments
The path to the local repository or a GitHub URL to scan.Examples:
./my-project/home/user/repositories/my-apphttps://github.com/user/repo
Options
The file path where the generated AGENTS.md file should be written.Short form:
-oExample:The AI provider to use for inferring repository capabilities.Supported providers:
gemini- Google’s Gemini (default)claude- Anthropic’s Claudeopenai- OpenAI’s GPT modelsbeacon-ai-cloud- Beacon’s managed cloud service (requires payment)
API key for the chosen AI provider. If not provided, Beacon will look for the corresponding environment variable.Environment variables by provider:
GEMINI_API_KEYfor geminiCLAUDE_API_KEYfor claudeOPENAI_API_KEYfor openai
How It Works
-
Scanning - Beacon walks through the repository and collects:
- README files
- Package manifests (Cargo.toml, package.json, pyproject.toml, go.mod)
- OpenAPI/Swagger specifications
- Source code files (up to 50 files, max 50KB each)
- Existing AGENTS.md files
-
Skipped files/directories:
target,node_modules,.git,.github,dist,build__pycache__,.venv,venv.DS_Store,Thumbs.db,*.lock,*.sum- Hidden directories (starting with
.)
-
AI Inference - The collected context is sent to the selected AI provider to infer:
- Agent-usable capabilities
- API endpoints and their schemas
- Authentication requirements
- Rate limits
- Generation - A standards-compliant AGENTS.md file is written to the specified output path.
Examples
Basic usage with local repository
Generate with custom output path
Use OpenAI provider with API key
Use Claude provider with environment variable
Use Beacon Cloud (managed service)
Source Code Reference
The generate command implementation can be found in:- Command definition:
/home/daytona/workspace/source/src/main.rs:54-62 - Execution logic:
/home/daytona/workspace/source/src/main.rs:380-395 - Scanner:
/home/daytona/workspace/source/src/scanner.rs:21-113