### First-time Claude Code Setup Example Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Demonstrates the user experience during the first-time setup when prompted to install Claude Code. ```bash $ codemie setup ✓ Provider configured successfully ○ Claude Code not installed Would you like to install Claude Code now? [Y/n] y Installing Claude Code v2.0.30 (supported version)... ✓ Claude Code v2.0.30 installed successfully 💡 Next steps: Interactive mode: codemie-claude Single task: codemie-claude --task "your task" ``` -------------------------------- ### Example: Verbose Output with All Context Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md This example demonstrates how to get verbose output, showing 100 lines from the last day, including all available context. ```bash # Verbose output with all context codemie log -v -n 100 --last 1d ``` -------------------------------- ### Install Latest Claude CLI Version Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Example command to install the latest available version of the Claude CLI. ```bash claude install latest ``` -------------------------------- ### Install Claude CLI Command Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Example command to install a specific version of the Claude CLI. ```bash claude install 2.0.45 ``` -------------------------------- ### Codemie Analytics Example Workflows Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Examples demonstrating common analytics workflows, such as getting a weekly summary, filtering by project with details, tracking costs, and comparing agents. ```bash # Weekly summary codemie analytics --last 7d ``` ```bash # Project-specific with details codemie analytics --project my-project --verbose ``` ```bash # Cost tracking codemie analytics --from 2025-12-01 --to 2025-12-07 --export csv -o weekly-costs.csv ``` ```bash # Agent comparison codemie analytics --agent claude codemie analytics --agent gemini ``` -------------------------------- ### Install and Run CodeMie CLI Commands Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Install CodeMie CLI globally and run initial setup and verification commands. Then, install specific AI agents like Claude and Codex, and invoke them for coding tasks. Discover available agent skills, such as PDF processing. ```bash codemie setup codemie doctor codemie install claude --supported codemie install codex --supported codemie-claude "Review my API code" codemie-codex "Refactor this service" codemie --task "Generate unit tests" codemie skills find pdf # discover agent skills (EPAM internal + skills.sh) claude mcp add my-server -- codemie-mcp-proxy "https://mcp-server.example.com/sse" ``` -------------------------------- ### Create Skill Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/skills.md Examples for creating a new skill, including a minimal example with required fields and a full example using a JSON file. ```bash # Minimal required fields codemie sdk skills create --data '{ "name": "my-skill", "description": "Does something useful for the team.", "content": "# My Skill\n\nInstructions here...", "project": "MyProject" }' # Full example from file codemie sdk skills create --json skill.json ``` -------------------------------- ### Install Workflow Interactively Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Initiate an interactive installation process for CI/CD workflows. ```bash codemie workflow install --interactive # Interactive installation ``` -------------------------------- ### Setup CodeMie Platform Skills Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Command to browse and register CodeMie platform skills. Note that skills are installed without tools or MCP servers. ```bash # Browse and register CodeMie platform skills cademie setup skills ``` -------------------------------- ### Manual Install Supported Claude Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Example of manually installing the supported version of Claude Code using the `--supported` flag. ```bash $ codemie install claude --supported Installing Claude Code v2.0.30... ✓ Claude Code v2.0.30 installed successfully ``` -------------------------------- ### Example: Quick Troubleshooting Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md This example demonstrates a quick troubleshooting command to view error logs from the last hour. ```bash # Quick troubleshooting codemie log --level error --last 1h ``` -------------------------------- ### Configure OpenCode Provider Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/AGENTS.md Set up the provider for the OpenCode agent if it has not been configured previously. This command guides through the setup process. ```bash codemie setup ``` -------------------------------- ### Install OpenCode Agent Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/AGENTS.md Install the OpenCode AI assistant using the CodeMie installation command. This is a prerequisite for using OpenCode. ```bash codemie install opencode ``` -------------------------------- ### Install Full Feature Implementation Workflow Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Install the comprehensive CI/CD workflow for full feature implementation. ```bash codemie workflow install code-ci # Full feature implementation ``` -------------------------------- ### Start CodeMie Session with Initial Message Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Begin a CodeMie CLI session with a specific initial message or prompt. This allows you to guide the AI agent from the start. ```bash codemie-code "Help me refactor this component" ``` -------------------------------- ### Install a Workflow Template Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Installs a specified CI/CD workflow template. The `--interactive` flag enables guided prompts, while `--timeout` and `--max-turns` allow customization of workflow execution parameters. The `--environment` option specifies GitHub protection rules. ```bash codemie workflow install -i --timeout 30 --max-turns 100 --environment production pr-review ``` -------------------------------- ### Generate Project Documentation Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/commands/README.md Analyzes your codebase to generate AI-optimized documentation, including a main CLAUDE.md file and detailed guides in .codemie/guides/. Use this for initial setup or complete regeneration. ```bash /codemie-init /codemie-init "focus on API patterns" ``` -------------------------------- ### Install CodeMie via Windows CMD Source: https://github.com/codemie-ai/codemie-code/blob/main/install/README.md Download and execute the Windows CMD installer. This script fetches the PowerShell installer and runs it. It's recommended to use the PowerShell installer directly when passing arguments with spaces. ```cmd curl -fsSL https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/windows/install.cmd -o install.cmd && install.cmd && del install.cmd ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/codemie-ai/codemie-code/blob/main/CONTRIBUTING.md Install all necessary Node.js dependencies for the project. ```bash npm install ``` -------------------------------- ### Full SharePoint Datasource Example Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/datasources.md A comprehensive example of creating a SharePoint datasource with various configuration options. ```json { "name": "team-sharepoint", "project_name": "Engineering", "site_url": "https://company.sharepoint.com/sites/engineering", "include_pages": true, "include_documents": true, "include_lists": false, "max_file_size_mb": 50, "auth_type": "integration", "description": "Engineering SharePoint site", "shared_with_project": true } ``` -------------------------------- ### Quick OpenAI Setup Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/CONFIGURATION.md Set environment variables for quick setup with OpenAI. Ensure you have the correct API key and model specified. ```bash export CODEMIE_PROVIDER=openai export CODEMIE_BASE_URL=https://api.openai.com/v1 export CODEMIE_API_KEY=sk-... export CODEMIE_MODEL=gpt-4 codemie-code "Review my code" ``` -------------------------------- ### Install Personal Plugins Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/PLUGINS.md Use 'codemie plugin install' to install personal plugins that will be available across all projects. ```bash codemie plugin install ``` -------------------------------- ### Install a Local Plugin Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Installs a plugin from a local file path. Ensure the path points to a valid plugin directory. ```bash # Install a plugin from a local path codemie plugin install ``` -------------------------------- ### Example: Monitor Specific Agent Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md This example demonstrates how to monitor logs in real-time for a specific agent at the info level. ```bash # Monitor specific agent codemie log follow --agent claude --level info ``` -------------------------------- ### Install CodeMie from Source Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Build and install CodeMie directly from its GitHub source repository. This is useful for development or contributing to the project. ```bash git clone https://github.com/codemie-ai/codemie-code.git cd codemie-code npm install npm run build && npm link ``` -------------------------------- ### Example: Detailed Session Investigation Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md This example shows how to perform a detailed investigation of a specific session by including verbose output. ```bash # Detailed session investigation codemie log session abc-123-def-456 -v ``` -------------------------------- ### List Installed Workflow Templates Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md This command lists all available CI/CD workflow templates. Use the `--installed` flag to filter and show only those that have already been installed. ```bash codemie workflow list --installed ``` -------------------------------- ### Example Plugin Manifest Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/PLUGINS.md This is a comprehensive example of a plugin.json manifest file, detailing various fields for plugin metadata and component configuration. ```json { "name": "my-plugin", "version": "1.0.0", "description": "A useful plugin for CodeMie Code", "author": { "name": "Your Name", "email": "you@example.com", "url": "https://github.com/yourname" }, "homepage": "https://github.com/yourname/my-plugin", "repository": "https://github.com/yourname/my-plugin", "license": "MIT", "keywords": ["codemie", "security", "tooling"], "skills": "skills", "commands": "commands", "agents": "agents", "hooks": "hooks/hooks.json", "mcpServers": ".mcp.json" } ``` -------------------------------- ### Test Plugin Locally (Install to Cache) Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/PLUGINS.md Commands to test a plugin by installing it to the user cache and then listing plugins to verify. ```bash codemie plugin install ./my-plugin codemie plugin list ``` -------------------------------- ### Install CodeMie via PowerShell Source: https://github.com/codemie-ai/codemie-code/blob/main/install/README.md Run the PowerShell installer directly from GitHub. This is suitable for Windows environments. ```powershell irm https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/windows/install.ps1 | iex ``` -------------------------------- ### Install Plugin Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/PLUGINS.md Command to install a plugin from a local path into the user cache. The plugin directory is copied, and existing versions are skipped. ```bash codemie plugin install ``` -------------------------------- ### Context Entry Schema Example Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/assistants.md An example of the JSON structure for attaching datasources as context to an assistant. ```json { "id": "", "context_type": "knowledge_base", "name": "" } ``` -------------------------------- ### Local Installation Configuration Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/README.md Configure local installation of plugin templates using a JSON file. This allows for project-specific templates and offline usage. ```json { "enabled": true, "strategy": "hybrid", "includes": [ "claude-templates/**" ], "excludes": [ "**/*.test.js", "**/.DS_Store", "**/node_modules/**" ], "targetDir": ".codemie", "preserveStructure": true, "overwritePolicy": "newer" } ``` -------------------------------- ### Install CodeMie via macOS/Linux/WSL Source: https://github.com/codemie-ai/codemie-code/blob/main/install/README.md Use curl to download and execute the installation script for macOS, Linux, and WSL environments. ```bash curl -fsSL https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/macos/install.sh | bash ``` -------------------------------- ### Full Assistant Configuration Example Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/assistants.md A comprehensive example of an assistant.json file, demonstrating all configurable fields including name, project, system prompt, model, context, toolkits, and prompt variables. ```json { "name": "Code Reviewer", "project": "Engineering", "description": "Reviews code for best practices and security", "system_prompt": "You are a {{language}} code review assistant. Focus on {{focus_area}}.", "shared": true, "llm_model_type": "claude-3-7-sonnet", "temperature": 0.3, "conversation_starters": [ "Review my latest PR", "Check this function for security issues" ], "context": [ { "id": "", "context_type": "knowledge_base", "name": "Engineering Docs" } ], "toolkits": [ { "toolkit": "Jira", "label": "Jira", "settings_config": false, "is_external": false, "tools": [ { "name": "jira_get_issue", "settings_config": false }, { "name": "jira_search", "settings_config": false } ] } ], "prompt_variables": [ { "key": "language", "description": "Primary language", "default_value": "TypeScript" }, { "key": "focus_area", "description": "Review focus", "default_value": "security and performance" } ], "categories": ["code-review", "engineering"] } ``` -------------------------------- ### Multi-Provider Workflow Setup and Usage Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/EXAMPLES.md Illustrates setting up and switching between multiple provider profiles for different use cases, and using specific profiles for commands. ```bash # Scenario: Developer with work and personal accounts # Setup work profile with enterprise LiteLLM codemie setup # → Name: "work" # → Provider: LiteLLM # → URL: https://litellm.company.com # → Model: claude-sonnet-4-6 # Setup personal profile with OpenAI codemie setup # → Name: "personal" # → Provider: OpenAI # → Model: gpt-4.1 # List profiles to verify codemie profile # ● work (litellm) - claude-sonnet-4-6 # ○ personal (openai) - gpt-4.1 # Use work profile during work hours codemie-code "review company codebase" # Switch to personal for side projects codemie profile switch personal codemie-code "help with my open source project" # Or use specific profile without switching codemie-claude --profile work "analyze security" codemie-gemini --profile personal "generate tests" # Update work profile when credentials rotate codemie setup # → Choose: Update existing profile # → Select: work # → Update credentials... ``` -------------------------------- ### Setup CodeMie Assistants as Claude Subagents or Skills Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Command to initiate the setup process for registering CodeMie assistants as Claude subagents or skills. ```bash # Pick assistants from your CodeMie account and choose how to register them cademie setup assistants ``` -------------------------------- ### Prepare Install Artifacts Source: https://github.com/codemie-ai/codemie-code/blob/main/install/README.md Run this command to prepare publishable artifacts. Generated files are written to artifacts/install/ and are not committed. ```bash npm run prepare:install-artifacts ``` -------------------------------- ### Direct File URLs for Installers Source: https://github.com/codemie-ai/codemie-code/blob/main/install/README.md These are the direct URLs to the installer scripts for various platforms. They can be used for mirroring or direct download. ```text https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/windows/install.ps1 https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/windows/install.cmd https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/macos/install.sh ``` -------------------------------- ### Create Multiple Provider Profiles Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/CONFIGURATION.md Demonstrates creating distinct profiles for different AI providers and contexts using the setup wizard. Each profile can have unique names, providers, and credentials. ```bash # First profile - work account with LiteLLM codemie setup # → Choose: Add a new profile # → Name: "work-litellm" # → Provider: LiteLLM # → Configure credentials... # Second profile - personal OpenAI account codemie setup # → Choose: Add a new profile # → Name: "personal-openai" # → Provider: OpenAI # → Configure credentials... # Third profile - enterprise SSO codemie setup # → Choose: Add a new profile # → Name: "enterprise-sso" # → Provider: CodeMie SSO # → Authenticate via SSO... ``` -------------------------------- ### Example CLI and Environment Variable Configuration Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/ARCHITECTURE-CONFIGURATION.md Illustrates how user inputs are provided via the command line interface and environment variables to configure Codemie settings. ```text ┌─────────────────────────────────────────────────────────────────────┐ │ USER INPUT │ ├─────────────────────────────────────────────────────────────────────┤ │ CLI: codemie-claude --profile work --model claude-3-5-sonnet │ │ ENV: CODEMIE_PROVIDER=ai-run-sso │ │ FILE: ~/.codemie/codemie-cli.config.json (active profile: work) │ └────────────────────────────┬────────────────────────────────────────┘ ``` -------------------------------- ### Install and Link Codemie CLI Source: https://github.com/codemie-ai/codemie-code/blob/main/AGENTS.md Use these commands to install the Codemie CLI globally and link it to your local environment if it's not automatically recognized. ```bash npm install -g @codemieai/code ``` ```bash npm link ``` -------------------------------- ### List Integrations with Search and Filtering Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md Demonstrates searching for integrations by name and filtering by project. Also shows how to paginate results and output as JSON. ```bash codemie sdk integrations list --search 'jira' ``` ```bash codemie sdk integrations list --projects Engineering ``` ```bash codemie sdk integrations list --page 0 --per-page 25 --json ``` -------------------------------- ### Manual Install Specific Claude Version Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Example of manually installing a specific version of Claude Code, including a warning about potential compatibility issues if it's newer than the supported version. ```bash $ codemie install claude 2.0.45 Installing Claude Code v2.0.45... ✓ Claude Code v2.0.45 installed successfully ⚠️ Note: This version (2.0.45) is newer than the supported version (2.0.30). You may encounter compatibility issues with the CodeMie backend. To install the supported version, run: codemie install claude --supported ``` -------------------------------- ### List Installed Skills Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md List all installed skills. Use the '--global' flag to list user-scope skills and '--json' for JSON output. ```bash codemie skills list ``` ```bash codemie skills list --global --json ``` -------------------------------- ### Session Start Metrics Payload with MCP Data Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/SPEC-mcp-session-metrics.md Example of a session start metrics payload including new attributes for MCP server counts and names across different scopes. ```json { "name": "codemie_cli_session_total", "attributes": { "agent": "claude", "agent_version": "0.0.31", "llm_model": "claude-sonnet-4-20250514", "repository": "codemie-ai/codemie-code", "session_id": "abc-123-uuid", "branch": "main", "project": "my-sso-project", "mcp_total_servers": 5, "mcp_local_servers": 1, "mcp_project_servers": 2, "mcp_user_servers": 2, "mcp_server_names": ["github", "notion", "slack", "filesystem", "postgres"], "mcp_local_server_names": ["postgres"], "mcp_project_server_names": ["github", "notion"], "mcp_user_server_names": ["slack", "filesystem"], "total_user_prompts": 0, "total_input_tokens": 0, "total_output_tokens": 0, "total_cache_read_input_tokens": 0, "total_cache_creation_tokens": 0, "total_tool_calls": 0, "successful_tool_calls": 0, "failed_tool_calls": 0, "files_created": 0, "files_modified": 0, "files_deleted": 0, "total_lines_added": 0, "total_lines_removed": 0, "session_duration_ms": 0, "had_errors": false, "count": 1, "status": "started", "reason": "startup" } } ``` -------------------------------- ### Example: Clean Old Data (Preview and Execute) Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md These examples demonstrate the cleanup process: first previewing what would be deleted with `--dry-run`, then executing the cleanup for the last 10 days with confirmation skipped. ```bash # Clean old data (preview first) codemie log clean --days 10 --dry-run codemie log clean --days 10 --yes ``` -------------------------------- ### Agent Lifecycle Hook Example (SSO Provider Wildcard) Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/ARCHITECTURE-CONFIGURATION.md An example of an agent hook for the SSO provider, specifically a wildcard hook that applies to all agents. It demonstrates sending a session start metric. ```javascript agentHooks: { '*': { // Applies to ALL agents async onSessionStart(sessionId, env) { // Send session start metric to backend await handler.sendSessionStart({ sessionId, agentName, provider, project, model }, 'started'); } } } ``` -------------------------------- ### Framework Initialization Commands Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Commands for initializing frameworks with specific agents, including listing available frameworks, installing presets, and using interactive or force update options. ```bash codemie- init --list # List frameworks available for the agent codemie-claude init bmad # Install BMAD with the SDLC preset (BMM + TEA) codemie-claude init bmad --preset minimal # Install BMAD Method only (BMM) codemie-claude init bmad --interactive # Use the upstream BMAD interactive installer codemie-claude init bmad --force # Update an existing BMAD install ``` -------------------------------- ### Create Assistant Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/assistants.md Create a new assistant. Examples show creating with minimal required fields using a JSON string, and creating using a JSON file for a full configuration. ```bash # Minimal (required fields only) codemie sdk assistants create --data '{"name":"My Assistant","project":"MyProject","system_prompt":"You are a helpful assistant."}' # Full example from file codemie sdk assistants create --json assistant.json ``` -------------------------------- ### Custom Analytics Request Example Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-analytics/SKILL.md Use this command to make custom analytics requests to endpoints not covered by preset commands. Supports GET and POST methods. ```bash node analytics-cli.js custom /v1/analytics/mcp-servers --time-period last_30_days ``` ```bash node analytics-cli.js custom /v1/analytics/ai-adoption-overview --method POST \ --time-period last_30_days ``` -------------------------------- ### Session End Metrics Payload with MCP Data Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/SPEC-mcp-session-metrics.md Example of a session end metrics payload, mirroring the session start payload with updated duration and status. ```json { "name": "codemie_cli_session_total", "attributes": { "agent": "claude", "agent_version": "0.0.31", "llm_model": "claude-sonnet-4-20250514", "repository": "codemie-ai/codemie-code", "session_id": "abc-123-uuid", "branch": "main", "project": "my-sso-project", "mcp_total_servers": 5, "mcp_local_servers": 1, "mcp_project_servers": 2, "mcp_user_servers": 2, "mcp_server_names": ["github", "notion", "slack", "filesystem", "postgres"], "mcp_local_server_names": ["postgres"], "mcp_project_server_names": ["github", "notion"], "mcp_user_server_names": ["slack", "filesystem"], "total_user_prompts": 0, "total_input_tokens": 0, "total_output_tokens": 0, "total_cache_read_input_tokens": 0, "total_cache_creation_tokens": 0, "total_tool_calls": 0, "successful_tool_calls": 0, "failed_tool_calls": 0, "files_created": 0, "files_modified": 0, "files_deleted": 0, "total_lines_added": 0, "total_lines_removed": 0, "session_duration_ms": 125000, "had_errors": false, "count": 1, "status": "completed", "reason": "prompt_input_exit" } } ``` -------------------------------- ### Codemie Configuration Commands Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/EXAMPLES.md Examples for managing Codemie's configuration, including viewing settings, testing connections, and initializing project-specific overrides. ```bash # View current configuration with sources codemie config show # Test connection codemie config test # Initialize project-specific overrides codemie config init # Temporary model override codemie-claude --model claude-sonnet-4-6 "Explain this algorithm" ``` -------------------------------- ### SessionStart Hook Output Example Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/HOOKS.md This JSON object represents the output that can be returned by the SessionStart hook. It allows for decisions on whether to allow or block the session start, and can inject additional system context. ```json { "decision": "allow" | "block", "reason": "Human-readable explanation", "additionalContext": "Context injected as system message for agent" } ``` -------------------------------- ### Example: Search for Specific Issues Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md This example shows how to search for logs containing a specific pattern like 'connection refused' within the last 24 hours. ```bash # Search for specific issues codemie log --grep "connection refused" --last 24h ``` -------------------------------- ### Bash Hook Script Example Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/HOOKS.md This Bash script is designed to be executed as a command hook. It parses the input JSON to get the command being executed by the tool, checks it against a list of dangerous patterns, and outputs a JSON decision to allow or block. ```bash #!/bin/bash # Parse input COMMAND=$(echo "$CODEMIE_HOOK_INPUT" | jq -r '.tool_input.command') # Block dangerous patterns DANGEROUS_PATTERNS=( "rm -rf /" "dd if=" "mkfs" "> /dev/sda" ) for pattern in "${DANGEROUS_PATTERNS[@]}"; do if [[ "$COMMAND" =~ $pattern ]]; then echo "{\"decision\": \"block\", \"reason\": \"Dangerous command blocked: $pattern\"}" exit 0 fi done # Allow by default echo '{"decision": "allow"}' ``` -------------------------------- ### Core CodeMie CLI Commands Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Commonly used commands for general CodeMie CLI operations, including help, version, task execution, setup, profile management, analytics, logging, workflows, agent listing, installation, uninstallation, updates, self-updates, diagnostics, plugins, MCP proxy, codebase management, and version display. ```bash codemie --help # Show all commands and options codemie --version # Show version information codemie --task "task" # Execute single task with built-in agent and exit codemie setup # Interactive configuration wizard codemie setup skills # Manage CodeMie platform skills (register/unregister) codemie setup assistants # Manage CodeMie assistants as Claude subagents or skills codemie profile # Manage provider profiles codemie analytics [options] # View usage analytics codemie log [options] # View and manage debug logs and sessions codemie workflow # Manage CI/CD workflows codemie list [options] # List all available agents codemie install [agent] # Install an agent codemie uninstall [agent] # Uninstall an agent codemie update [agent] # Update installed agents codemie self-update # Update CodeMie CLI itself codemie doctor [options] # Health check and diagnostics codemie plugin # Manage native plugins codemie mcp-proxy # Stdio-to-HTTP MCP proxy with OAuth support codemie codebase # Manage Codebase Memory graph UI codemie version # Show version information ``` -------------------------------- ### Install Claude Agent Natively Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Installs the Claude agent using the appropriate native installer for the current platform. Use this function to automate agent installation across different operating systems. ```typescript export async function installNativeAgent( agentName: string, installerUrls: PlatformInstallerUrls, version?: string, options?: NativeInstallOptions ): Promise ``` -------------------------------- ### Gemini CLI Setup Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/AGENTS.md Configure Gemini CLI with a dedicated Google Gemini API key for direct API access. ```bash # Configure Gemini with dedicated API key codemie setup # Select: "Google Gemini (Direct API Access)" # Enter your Gemini API key from https://aistudio.google.com/apikey ``` -------------------------------- ### Check GitHub CLI Installation and Authentication Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/report-issue/SKILL.md Verifies if the `gh` CLI is installed and authenticated. If not, it provides installation and authentication instructions. ```bash if ! command -v gh &>/dev/null; then echo "GH_NOT_INSTALLED" else gh auth status 2>&1 || echo "GH_NOT_AUTHENTICATED" fi ``` -------------------------------- ### Install Latest Supported Claude Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Installs the latest version of Claude Code that is supported and tested by CodeMie. This is the recommended installation method. ```bash # Install latest supported version (recommended) codemie install claude --supported ``` -------------------------------- ### List All Available Workflows Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Display all available CI/CD workflows that can be installed. ```bash codemie workflow list # All workflows ``` -------------------------------- ### Native Installation Result Interface Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Represents the outcome of a native agent installation. Check the `success` and `installedVersion` fields to determine if the installation was successful. ```typescript export interface NativeInstallResult { success: boolean; // Installation succeeded installedVersion: string | null; // Installed version (null if verification failed) output: string; // Installation output } ``` -------------------------------- ### Install Specific CodeMie Version on macOS Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Install a specific version of CodeMie on macOS by setting the CODEMIE_PACKAGE_VERSION environment variable before running the installer script. ```bash curl -fsSL https://raw.githubusercontent.com/codemie-ai/codemie-code/main/install/macos/install.sh | env CODEMIE_PACKAGE_VERSION=0.0.57 bash ``` -------------------------------- ### Native Installation Options Interface Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Specifies optional parameters for native agent installation, such as timeout and environment variables. Customize installation behavior using these options. ```typescript export interface NativeInstallOptions { timeout?: number; // Installation timeout (ms) env?: Record; // Environment variables verifyCommand?: string; // Command to verify installation (e.g., 'claude') } ``` -------------------------------- ### Install Latest Supported Claude Version Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md Use this command to install the latest version of Claude Code that is tested and supported by CodeMie. This is the recommended installation method. ```bash codemie install claude --supported ``` -------------------------------- ### Create Git Credentials Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md Example of creating credentials for Git integration. Requires URL, token, and alias. ```json { "credential_type": "Git", "project_name": "Engineering", "alias": "github-main", "setting_type": "project", "credential_values": [ {"key": "url", "value": "https://github.com/org/repo"}, {"key": "token", "value": "ghp_yourToken"}, {"key": "alias", "value": "github-main"} ] } ``` -------------------------------- ### Setup AI Providers Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Initiates an interactive wizard for setting up AI providers. Supports multiple providers and includes features like real-time validation and profile management. ```bash codemie setup [options] ``` -------------------------------- ### Fallback npm Global Installation Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Use this method for a global npm installation if you have Node.js 20+ and npm global installs correctly configured. This is a fallback option. ```bash npm install -g @codemieai/code codemie --help ``` -------------------------------- ### List Only Installed Workflows Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Show only the CI/CD workflows that are currently installed. ```bash codemie workflow list --installed # Only installed ``` -------------------------------- ### Attach Skill to All Assistants in a Project Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/skills.md This example shows how to list all assistant IDs within a specified project and then attach a given skill ID to each of them. ```bash codemie sdk assistants list --projects MyProject --json | jq -r '.[].id' | while read id; do codemie sdk skills attach "$id" done ``` -------------------------------- ### MCP Server Configuration (Filesystem) Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/PLUGINS.md Example of an `.mcp.json` file to configure a filesystem MCP server. This is the default configuration method. ```json { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "${CLAUDE_PLUGIN_ROOT}"] } } } ``` -------------------------------- ### Install Sound Effects for Claude Code Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/README.md Enable audio feedback for Claude Code sessions by installing the plugin with the `--sounds` flag. Ensure you have a compatible audio player installed on your system (e.g., `afplay` on macOS, `aplay`/`paplay` on Linux, `mpg123` on Windows/macOS/Linux). Installation will fail if no audio player is detected. ```bash # Enable sounds during Claude installation codemie install claude --sounds ``` -------------------------------- ### Installing a Global Package Source: https://github.com/codemie-ai/codemie-code/blob/main/AGENTS.md Use the `installGlobal` utility to install npm packages globally. ```typescript installGlobal(packageName) ``` -------------------------------- ### Read Project Guides Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/commands/codemie-subagents.md Reads all markdown files within the `.codemie/guides/` directory. This is the primary source for project context when generating subagents. ```bash # If exists, read ALL guides first - this is the primary source ls .codemie/guides/ 2>/dev/null && cat .codemie/guides/*.md ``` -------------------------------- ### Invalid PR Titles Examples Source: https://github.com/codemie-ai/codemie-code/blob/main/CONTRIBUTING.md Examples of incorrectly formatted commit messages that will be rejected. ```text Add analytics # Missing type and scope Analytics support # Missing type format feat: Add Analytics Support # Description should be lowercase feature(analytics): add support # Use "feat" not "feature" ``` -------------------------------- ### Run CodeMie CLI without Global Installation Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Execute CodeMie CLI commands using npx without a global installation. Note that agent shortcuts (like `codemie-claude`) require a global installation. ```bash npx @codemieai/code setup npx @codemieai/code doctor npx @codemieai/code install claude --supported ``` -------------------------------- ### Create MCP Credentials Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md Example of creating credentials for MCP integration. Requires URL and alias. ```json { "credential_type": "MCP", "project_name": "AI", "alias": "mcp-server", "setting_type": "user", "credential_values": [ {"key": "url", "value": "http://localhost:3000"}, {"key": "alias", "value": "mcp-server"} ] } ``` -------------------------------- ### List AI Coding Agents Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md List all available AI coding agents, including their name, display name, installation status, version, and description. Use the --installed flag to show only installed agents. ```bash codemie list [options] ``` -------------------------------- ### Proxy Startup Flow Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/ARCHITECTURE-PROXY.md Details the sequence of events from the Agent CLI starting to API requests being routed through the proxy. ```text 1. Agent CLI starts └─ codemie-claude "implement feature" --provider ai-run-sso 2. Agent detects SSO provider └─ Checks if proxy is needed 3. Agent spawns proxy ├─ Create ProxyConfig (targetApiUrl, sessionId, etc.) ├─ new CodeMieProxy(config) └─ await proxy.start() ├─ Load SSO credentials ├─ Initialize plugins ├─ Call onProxyStart() hooks └─ Bind to dynamic port 4. Proxy returns URL └─ http://localhost:54321 5. Agent uses proxy URL └─ Set environment variable: ANTHROPIC_BASE_URL=http://localhost:54321 6. Agent runs normally └─ All API requests go through proxy ``` -------------------------------- ### Install Claude (Deprecated) Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/specs/claude-version-management/installation-and-versioning.md The current behavior for installing Claude via npm, which is a deprecated method. ```bash codemie install claude # Installs Claude via npm (deprecated method) ``` -------------------------------- ### Invalid Commit Message Examples Source: https://github.com/codemie-ai/codemie-code/blob/main/CONTRIBUTING.md Examples of commit messages that do not follow the Conventional Commits format. ```markdown # Missing type ``` ```markdown analytics: Add support ``` ```markdown feat(analytics) add support ``` ```markdown feat(analytics): Added support ``` ```markdown feat(analytics): Add Support ``` ```markdown Feat(analytics): add support ``` -------------------------------- ### Main Session File Example Source: https://github.com/codemie-ai/codemie-code/blob/main/tests/integration/metrics/fixtures/claude/README.md Details of the main Claude session file, including its original path and test scenario. ```text Original: ~/.claude/projects/-tmp-private/4c2ddfdc-b619-4525-8d03-1950fb1b0257.jsonl Main session file containing the primary conversation flow. Session ID: 4c2ddfdc-b619-4525-8d03-1950fb1b0257 Working Directory: /tmp/private Git Branch: analytics-v2 Test Scenario: 1. User: "create hello.py, md and js" - Write hello.py (8 lines, Python) - Write hello.md (14 lines, Markdown) - Write hello.js (8 lines, JavaScript) 2. User: "update py with one liner comment" - Read hello.py - Edit hello.py (+1 line added: "# Simple hello world program") 3. User: "delete js" - Bash: `rm hello.js` Metrics Summary (main session only): - Assistant turns: 10 (with token usage) - Input tokens: 42 - Output tokens: 806 - Cache creation: 177,370 - Cache read: 214,627 - Model: `claude-sonnet-4-5-20250929` - Tool calls: 6 (3 Write + 1 Read + 1 Edit + 1 Bash) ``` -------------------------------- ### Create LiteLLM Credentials Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md Example of creating credentials for LiteLLM integration. Requires base URL, API key, and alias. ```json { "credential_type": "LiteLLM", "project_name": "AI", "alias": "litellm-proxy", "setting_type": "user", "credential_values": [ {"key": "base_url", "value": "http://localhost:4000"}, {"key": "api_key", "value": "sk-master-key"}, {"key": "alias", "value": "litellm-proxy"} ] } ``` -------------------------------- ### Install Inline Fix Workflow Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Install the CI/CD workflow for applying quick fixes directly from comments. ```bash codemie workflow install inline-fix # Quick fixes from comments ``` -------------------------------- ### Install PR Review Workflow Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/COMMANDS.md Install the CI/CD workflow specifically designed for pull request reviews. ```bash codemie workflow install pr-review # PR review workflow ``` -------------------------------- ### Project Skill Directory Structure Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/SKILLS.md Example of how to organize multiple skills within a project directory. ```text .codemie/skills/ ├── typescript/ │ └── SKILL.md ├── python/ │ └── SKILL.md └── security/ └── SKILL.md ``` -------------------------------- ### Example Toolkit Entry Schema Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/assistants.md Illustrates the structure of a single toolkit entry within an assistant's configuration, including its name, label, and associated tools. ```json { "toolkit": "Jira", "label": "Jira", "settings_config": false, "is_external": false, "tools": [ { "name": "jira_get_issue", "settings_config": false }, { "name": "jira_search", "settings_config": false } ] } ``` -------------------------------- ### Verify CodeMie Installation Source: https://github.com/codemie-ai/codemie-code/blob/main/README.md Run these commands to verify that CodeMie has been installed correctly and is accessible from your command line. ```bash codemie --help codemie doctor ``` -------------------------------- ### Bash Command Example Source: https://github.com/codemie-ai/codemie-code/blob/main/tests/integration/session/fixtures/claude/README.md Example of a bash command used within a Claude session to delete a file. ```bash rm hello.js ``` -------------------------------- ### Create Xray Credentials Source: https://github.com/codemie-ai/codemie-code/blob/main/src/agents/plugins/claude/plugin/skills/codemie-sdk/examples/integrations.md Example of creating credentials for Xray integration. Requires client ID, client secret, and alias. ```json { "credential_type": "Xray", "project_name": "QA", "alias": "xray-main", "setting_type": "project", "credential_values": [ {"key": "client_id", "value": "your-xray-client-id"}, {"key": "client_secret", "value": "your-xray-client-secret"}, {"key": "alias", "value": "xray-main"} ] } ``` -------------------------------- ### Example Skill Code Block Source: https://github.com/codemie-ai/codemie-code/blob/main/docs/SKILLS.md A basic TypeScript code example within a skill's documentation. ```typescript // Example code ```