### Atomemo Plugin CLI Development Setup Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Guides on setting up the development environment for the Atomemo Plugin CLI. This includes cloning the repository, installing dependencies, building, testing, and running the CLI in development mode. ```bash # Clone the repository git clone https://github.com/choice-open/atomemo-plugin-cli.git cd atomemo-plugin-cli # Install dependencies npm install # Build the project npm run build # Run tests npm test # Run the CLI in development mode ./bin/dev.js ``` -------------------------------- ### Atomemo CLI Quick Start Commands Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Provides essential commands to get started with the Atomemo Plugin CLI. These include logging in, initializing a new plugin, and refreshing API keys for development. ```bash atomemo auth login ``` ```bash atomemo plugin init ``` ```bash atomemo plugin refresh-key ``` -------------------------------- ### Atomemo CLI Autocomplete Setup Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Sets up shell autocompletion for the Atomemo CLI. This includes displaying installation instructions, setting up for specific shells like bash, zsh, and powershell, and refreshing the autocomplete cache. ```bash atomemo autocomplete # Setup for specific shells atomemo autocomplete bash atomemo autocomplete zsh atomemo autocomplete powershell # Refresh the autocomplete cache atomemo autocomplete --refresh-cache ``` -------------------------------- ### Install Atomemo Plugin CLI Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Installs the Atomemo Plugin CLI globally using various package managers. This is the first step to using the CLI for plugin development. ```bash npm install -g @choiceopen/atomemo-plugin-cli ``` ```bash # Using yarn yarn global add @choiceopen/atomemo-plugin-cli ``` ```bash # Using pnpm pnpm add -g @choiceopen/atomemo-plugin-cli ``` -------------------------------- ### Atomemo CLI Usage Examples Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Demonstrates basic usage patterns for the Atomemo Plugin CLI, including running commands, checking the version, and accessing help. ```sh-session $ atomemo COMMAND running command... $ atomemo (--version) @choiceopen/atomemo-plugin-cli/0.2.5 darwin-arm64 node-v24.13.0 $ atomemo --help [COMMAND] ``` -------------------------------- ### Atomemo Plugin Development Workflow Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Outlines the complete workflow for developing plugins using the Atomemo CLI. This includes installing the CLI, logging in to authenticate, checking authentication status, and initializing a new plugin project through an interactive process. ```bash # Step 1: Install the CLI npm install -g @choiceopen/atomemo-plugin-cli # Step 2: Authenticate with your Choiceform account atomemo auth login # Follow the browser verification process # Step 3: Verify authentication atomemo auth status # Step 4: Create a new plugin project atomemo plugin init # Answer the interactive prompts: ``` -------------------------------- ### CLI Utility Commands Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Commands for accessing help documentation and checking the installed CLI version. ```bash atomemo help atomemo help auth login atomemo version atomemo version --verbose ``` -------------------------------- ### Atomemo CLI Help Command Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Provides help information for the Atomemo Plugin CLI and its commands. Users can specify a command to get detailed usage instructions. ```bash USAGE $ atomemo help [COMMAND...] ARGUMENTS [COMMAND...] Command to show help for. FLAGS -n, --nested-commands Include all nested commands in the output. DESCRIPTION Display help for atomemo. ``` -------------------------------- ### GET /api/v1/debug_api_key Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Retrieves a debug API key for development purposes, requiring an authenticated session. ```APIDOC ## GET /api/v1/debug_api_key ### Description Retrieves a debug API key for development purposes, requiring an authenticated session. ### Method GET ### Endpoint https://plugin-hub.atomemo.ai/api/v1/debug_api_key ### Parameters #### Headers - **Authorization** (string) - Required - Bearer ### Response #### Success Response (200) - **api_key** (string) - The generated debug API key #### Response Example { "api_key": "..." } ``` -------------------------------- ### GET /v1/auth/get-session Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Retrieves the current user session information using a valid Bearer token. ```APIDOC ## GET /v1/auth/get-session ### Description Retrieves the current user session information using a valid Bearer token. ### Method GET ### Endpoint https://oneauth.atomemo.ai/v1/auth/get-session ### Parameters #### Headers - **Authorization** (string) - Required - Bearer ### Response #### Success Response (200) - **user** (object) - User profile details - **session** (object) - Session metadata including expiry #### Response Example { "user": { "name": "...", "email": "..." }, "session": { "updatedAt": "...", "expiresAt": "..." } } ``` -------------------------------- ### Plugin Hub API Endpoints Reference Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Reference for Plugin Hub API endpoints used by the CLI for plugin management. Includes an example for obtaining a debug API key for development purposes, which requires an access token for authorization. ```bash # Plugin Hub API Endpoints (production: https://plugin-hub.atomemo.ai) # Get debug API key for development curl https://plugin-hub.atomemo.ai/api/v1/debug_api_key \ -H "Content-Type: application/json" \ -H "User-Agent: Choiceform (Atomemo Plugin CLI)" \ -H "Authorization: Bearer your-access-token" ``` -------------------------------- ### Manage Atomemo Plugins Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Commands to initialize new plugin projects via interactive or non-interactive modes and refresh debug API keys for local development. ```bash atomemo plugin init atomemo plugin init --name my-plugin --language typescript --description "My plugin description" atomemo plugin refresh-key ``` -------------------------------- ### Authenticate with Atomemo Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Commands to initiate the OAuth 2.0 Device Authorization flow and check current authentication status. ```bash atomemo auth login atomemo auth status ``` -------------------------------- ### Atomemo CLI Autocomplete Command Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Displays instructions for setting up shell autocompletion for the Atomemo Plugin CLI. This enhances user experience by providing command suggestions. ```bash USAGE $ atomemo autocomplete [SHELL] [-r] ARGUMENTS [SHELL] (zsh|bash|powershell) Shell type FLAGS -r, --refresh-cache Refresh cache (ignores displaying instructions) DESCRIPTION Display autocomplete installation instructions. EXAMPLES $ atomemo autocomplete $ atomemo autocomplete bash $ atomemo autocomplete zsh $ atomemo autocomplete powershell $ atomemo autocomplete --refresh-cache ``` -------------------------------- ### Atomemo CLI Version Command Source: https://github.com/choice-open/atomemo-plugin-cli/blob/main/README.md Displays the version of the Atomemo Plugin CLI. The --verbose flag provides additional details about the environment and dependencies. ```bash USAGE $ atomemo version [--json] [--verbose] FLAGS --verbose Show additional information about the CLI. GLOBAL FLAGS --json Format output as json. FLAG DESCRIPTIONS --verbose Show additional information about the CLI. Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using. ``` -------------------------------- ### POST /v1/auth/device/code Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Initiates the device authorization flow to obtain a device and user code for authentication. ```APIDOC ## POST /v1/auth/device/code ### Description Initiates the device authorization flow to obtain a device and user code for authentication. ### Method POST ### Endpoint https://oneauth.atomemo.ai/v1/auth/device/code ### Request Body - **client_id** (string) - Required - The identifier for the CLI client (e.g., "atomemo_plugin_cli") ### Request Example { "client_id": "atomemo_plugin_cli" } ### Response #### Success Response (200) - **device_code** (string) - The code used to poll for the token - **user_code** (string) - The code displayed to the user - **verification_uri** (string) - The URL for user verification - **verification_uri_complete** (string) - The direct URL for user verification #### Response Example { "device_code": "...", "user_code": "ABCD-1234", "verification_uri": "...", "verification_uri_complete": "..." } ``` -------------------------------- ### POST /v1/auth/device/token Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Polls the authentication server using the device code to exchange it for an access token. ```APIDOC ## POST /v1/auth/device/token ### Description Polls the authentication server using the device code to exchange it for an access token. ### Method POST ### Endpoint https://oneauth.atomemo.ai/v1/auth/device/token ### Request Body - **grant_type** (string) - Required - Must be "urn:ietf:params:oauth:grant-type:device_code" - **client_id** (string) - Required - The identifier for the CLI client - **device_code** (string) - Required - The device code received from the initial request ### Request Example { "grant_type": "urn:ietf:params:oauth:grant-type:device_code", "client_id": "atomemo_plugin_cli", "device_code": "your-device-code" } ### Response #### Success Response (200) - **access_token** (string) - The JWT access token #### Response Example { "access_token": "..." } ``` -------------------------------- ### OneAuth API Endpoints Reference Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Reference for OneAuth API endpoints used by the CLI for authentication. Includes requests for device authorization codes, polling for access tokens, and retrieving user session information. Requires a client ID and bearer token for authorization. ```bash # OneAuth API Endpoints (production: https://oneauth.choiceform.io) # Request device authorization code curl -X POST https://oneauth.choiceform.io/v1/auth/device/code \ -H "Content-Type: application/json" \ -H "User-Agent: Choiceform (Atomemo Plugin CLI)" \ -d '{"client_id": "atomemo_plugin_cli"}' # Poll for access token curl -X POST https://oneauth.choiceform.io/v1/auth/device/token \ -H "Content-Type: application/json" \ -H "User-Agent: Choiceform (Atomemo Plugin CLI)" \ -d '{ "grant_type": "urn:ietf:params:oauth:grant-type:device_code", "client_id": "atomemo_plugin_cli", "device_code": "your-device-code" }' # Get user session information curl https://oneauth.choiceform.io/v1/auth/get-session \ -H "Content-Type: application/json" \ -H "User-Agent: Choiceform (Atomemo Plugin CLI)" \ -H "Authorization: Bearer your-access-token" ``` -------------------------------- ### Atomemo Plugin Generator API Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Generates new plugin projects from templates using the Eta template engine. Supports creating TypeScript plugins with customizable properties and target directories. The generator copies common and language-specific templates, renders Eta files, and groups permissions by scope. ```typescript import { createPluginGenerator } from "@choiceopen/atomemo-plugin-cli/utils/generator"; // Create a TypeScript plugin generator const generator = createPluginGenerator("typescript", { props: { name: "my-awesome-plugin", description: "A plugin that does awesome things", author: "John Doe", email: "john@example.com", url: "https://github.com/myorg/my-awesome-plugin", language: "typescript", createdAt: new Date().toISOString(), date: new Date().toISOString().slice(0, 10), year: new Date().getFullYear().toString(), permissions: ["http:read", "fs:write"] // Will be grouped by scope }, target: "/path/to/my-awesome-plugin" }); // Generate the plugin project files await generator.generate(); ``` -------------------------------- ### Atomemo Configuration Management API Source: https://context7.com/choice-open/atomemo-plugin-cli/llms.txt Manages CLI configuration stored in `~/.choiceform/atomemo.json`. Provides functions to load, update, and save configuration with Zod schema validation. The configuration directory can be customized using the CHOICEFORM_CONFIG_DIR environment variable. ```typescript import * as configStore from "@choiceopen/atomemo-plugin-cli/utils/config"; // Load configuration (creates default if not exists) const config = await configStore.load(); // Update configuration (deep merge) await configStore.update({ auth: { production: { access_token: "new-token" } } }); // Save complete configuration (overwrites) await configStore.save({ auth: { production: { endpoint: "https://oneauth.atomemo.ai", access_token: "your-token" } }, hub: { production: { endpoint: "https://plugin-hub.atomemo.ai" } } }); // Environment variable to customize config directory // Set CHOICEFORM_CONFIG_DIR to override default ~/.choiceform ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.