### Formatting Current Date with JavaScript Source: https://www.kerlig.com/help/actions/variables Provides an example of using the JavaScript Date object to get the current date and format it using toUTCString(). This allows for dynamic inclusion of standardized date information in prompts. ```JavaScript {{ new Date().toUTCString() }} ``` -------------------------------- ### Download Ollama Model via Terminal Source: https://www.kerlig.com/help/integrations/ollama/troubleshooting This command downloads a specified model using the Ollama terminal interface. Ensure Ollama is installed and accessible from your terminal. This is a prerequisite for using models not yet present locally. ```shell ollama pull llama3 ``` -------------------------------- ### Manage AI Integration API Keys via CLI Source: https://www.kerlig.com/help/guides/team-deployment Commands for managing API keys for various AI integrations supported by Kerlig. You can set or remove API keys for specific services like 'openai', 'anthropic', 'google', 'groq', and 'openrouter'. This allows for flexible configuration of AI features. ```Bash kerlig api-key set -i -k YOUR_API_KEY ``` ```Bash kerlig api-key remove -i ``` -------------------------------- ### Converting Text to Uppercase with JavaScript Source: https://www.kerlig.com/help/actions/variables Illustrates how to use the toUpperCase() JavaScript method on a Kerlig variable. This snippet shows how to dynamically transform selected text into uppercase format for use in prompts. ```JavaScript {{ selectedText.toUpperCase() }} ``` -------------------------------- ### Create Global 'kerlig' Command with Bash Script Source: https://www.kerlig.com/help/guides/team-deployment This Bash script creates a global 'kerlig' command by symlinking the Kerlig application executable. It ensures that the command can be run from any directory. Ensure the path to the Kerlig executable is correct for your system. ```Bash #!/bin/bash # Get the actual path to the app executable APP_PATH="/Applications/Kerlig.app/Contents/MacOS/Kerlig" # Change to the directory containing the executable cd "$(dirname "$APP_PATH")" # Execute the app with all passed arguments exec "./$(basename "$APP_PATH")" "$@" ``` -------------------------------- ### Make 'kerlig' Executable Source: https://www.kerlig.com/help/guides/team-deployment This command grants execute permissions to the 'kerlig' Bash script, allowing it to be run as a command-line utility. This is typically done after creating the script in a directory included in your system's PATH. ```Bash sudo chmod +x /usr/local/bin/kerlig ``` -------------------------------- ### Manage Kerlig License Keys via CLI Source: https://www.kerlig.com/help/guides/team-deployment Commands for managing the license key for Kerlig. The 'set' command requires a license key, while the 'remove' command clears the currently active license key. These operations help in license activation and deactivation. ```Bash kerlig license set -k LICENSE_KEY ``` ```Bash kerlig license remove ``` -------------------------------- ### Using Ternary Operator with Variables in JavaScript Source: https://www.kerlig.com/help/actions/variables Shows how to use the conditional (ternary) operator in JavaScript with Kerlig variables. This provides a concise way to achieve the same fallback logic as the OR operator, offering an alternative for conditional variable assignment. ```JavaScript {{ lastAssistantMsg ? lastAssistantMsg : selectedText }} ``` -------------------------------- ### Using OR Operator with Variables in JavaScript Source: https://www.kerlig.com/help/actions/variables Demonstrates how to use the OR operator (||) in JavaScript within Kerlig variables. This allows for fallback values, using the first available variable if the preceding one is not defined. It's useful for ensuring a value is always present. ```JavaScript {{ lastAssistantMsg || selectedText }} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.