### Start the Kurv Server Source: https://github.com/lucas-labs/kurv/blob/master/README.md Initialize the Kurv server process. ```bash kurv server ``` -------------------------------- ### Deploy an Egg Source: https://github.com/lucas-labs/kurv/blob/master/README.md Start and daemonize an application using a configuration file. ```bash kurv collect ``` -------------------------------- ### Plugin Sidecar Configuration Example Source: https://context7.com/lucas-labs/kurv/llms.txt Example of a JSON configuration file for a plugin, placed alongside the executable to provide environment variables. ```json // kurv-my-plugin.config.json (next to kurv-my-plugin executable) { "env": { "PLUGIN_API_KEY": "secret-key", "PLUGIN_DEBUG": "true" } } ``` -------------------------------- ### Start a Stopped Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Start a previously stopped egg. ```bash curl -X POST http://localhost:8787/eggs/1/start ``` -------------------------------- ### Start an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Starts a previously stopped egg. ```APIDOC ## Start an Egg ### Description Starts a previously stopped egg. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **identifier** (string) - Required - The ID, name, or PID of the egg to start. #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` Egg with ID 1 started successfully. ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "message": "Egg started successfully." } ``` ``` -------------------------------- ### Install Kurv via Cargo Source: https://github.com/lucas-labs/kurv/blob/master/README.md Install the Kurv binary using the Rust package manager. ```bash cargo install kurv ``` -------------------------------- ### Egg Configuration Example Source: https://github.com/lucas-labs/kurv/blob/master/README.md A YAML configuration file defining the application command, arguments, and environment variables. ```yaml name: fastapi # the name of the egg / should be unique command: poetry # the command/program to run args: # the arguments to pass to the command - run - serve cwd: /home/user/my-fastapi-app # the working directory in which the command will be run env: # the environment variables to pass to the command FASTAPI_PORT: 8080 ``` -------------------------------- ### Start an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Starts a previously stopped egg using its ID or name. JSON response is available. ```bash # Start by ID kurv start 1 ``` ```bash # Start by name kurv start fastapi ``` ```bash # Get JSON response kurv start 1 --json ``` -------------------------------- ### Start the Kurv Server Source: https://context7.com/lucas-labs/kurv/llms.txt Launches the kurv server which manages all eggs and exposes the REST API for client communication. ```APIDOC ## Start the Kurv Server ### Description Launches the kurv server which manages all eggs and exposes the REST API for client communication. ### Method CLI Command ### Endpoint N/A ### Parameters #### Environment Variables - **KURV_SERVER** (boolean) - Required - Set to `true` to enable server mode. #### Flags - **--force** (boolean) - Optional - Bypasses safety checks to start the server. ``` -------------------------------- ### Create a Kurv Plugin Source: https://context7.com/lucas-labs/kurv/llms.txt Example of creating a Kurv plugin using the `kurv-plugin-sdk` crate. This involves setting up dependencies, discovering environment variables, and defining the plugin's main loop. ```rust // Cargo.toml // [dependencies] // kurv-plugin-sdk = "0.1" use kurv_plugin_sdk::{KurvEnv, PluginConfig, discover_env, plugin_metadata, start}; fn main() { start( plugin_metadata!(), |exe| { // Configure the plugin let mut env = discover_env(exe) .expect("kurv plugin: failed to load sidecar config"); env.insert("MY_PLUGIN_MODE".into(), "production".into()); PluginConfig { name: "my-plugin".into(), command: exe.to_string_lossy().into_owned(), args: vec!["run".into()], env, cwd: None, } }, |kurv_env: KurvEnv| { // Main plugin loop println!("Plugin running!"); println!("Kurv API: {}:{}", kurv_env.api_host, kurv_env.api_port); println!("Kurv Home: {:?}", kurv_env.home); println!("Logs Dir: {:?}", kurv_env.logs_dir); // Your plugin logic here... loop { std::thread::sleep(std::time::Duration::from_secs(60)); } }, ); } ``` -------------------------------- ### Start kurv Server Source: https://context7.com/lucas-labs/kurv/llms.txt Launches the kurv server to manage applications. Requires the KURV_SERVER=true environment variable or the --force flag to bypass safety checks. ```bash KURV_SERVER=true kurv server ``` ```bash kurv server --force ``` -------------------------------- ### GET /status Source: https://context7.com/lucas-labs/kurv/llms.txt Returns server information including API host, port, and version. ```APIDOC ## GET /status ### Description Returns server information including API host, port, and version. ### Method GET ### Endpoint `/status` ### Parameters None ### Request Example ```bash curl http://localhost:8787/status ``` ### Response #### Success Response (200) - **api_host** (string) - The host address of the API. - **api_port** (integer) - The port number the API is listening on. - **version** (string) - The version of the kurv server. #### Response Example ```json { "api_host": "127.0.0.1", "api_port": 8787, "version": "0.1.0" } ``` ``` -------------------------------- ### Get Egg Details Source: https://context7.com/lucas-labs/kurv/llms.txt Shows detailed information about a specific egg including configuration, environment variables, and process state. ```APIDOC ## Get Egg Details ### Description Shows detailed information about a specific egg including configuration, environment variables, and process state. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **identifier** (string) - Required - The ID, name, or PID of the egg. #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` โฌฎ ยป fastapi id 1 name fastapi command poetry run serve cwd /home/user/my-fastapi-app env: FASTAPI_PORT 8080 DEBUG false paths: stdout /path/to/logs/fastapi.out stderr /path/to/logs/fastapi.err status: status running pid 35824 start time 2024-01-15 10:30:00 try count 0 error ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "command": "poetry run serve", "cwd": "/home/user/my-fastapi-app", "env": { "FASTAPI_PORT": "8080", "DEBUG": "false" }, "paths": { "stdout": "/path/to/logs/fastapi.out", "stderr": "/path/to/logs/fastapi.err" }, "status": { "status": "running", "pid": 35824, "start_time": "2024-01-15 10:30:00", "try_count": 0, "error": null } } ``` ``` -------------------------------- ### Restart an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Restarts a running egg (stops and then starts it). ```APIDOC ## Restart an Egg ### Description Restarts a running egg (stops and then starts it). ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **identifier** (string) - Required - The ID, name, or PID of the egg to restart. #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` Egg with ID 1 restarted successfully. ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "message": "Egg restarted successfully." } ``` ``` -------------------------------- ### GET /eggs Source: https://context7.com/lucas-labs/kurv/llms.txt Returns a summary list of all collected eggs with their current status. ```APIDOC ## GET /eggs ### Description Returns a summary list of all collected eggs with their current status. ### Method GET ### Endpoint `/eggs` ### Parameters #### Query Parameters - **kind** (string) - Optional - Filter the list by kind. Example: `plugins`. ### Request Example ```bash curl http://localhost:8787/eggs ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the egg. - **pid** (integer) - The process ID of the running egg. - **name** (string) - The name of the egg. - **status** (string) - The current status of the egg (e.g., "Running", "Stopped"). - **uptime** (string) - The duration the egg has been running. - **retry_count** (integer) - The number of times the egg has been restarted due to crashes. #### Response Example ```json [ { "id": 1, "pid": 35824, "name": "fastapi", "status": "Running", "uptime": "1h 30m", "retry_count": 0 } ] ``` ``` -------------------------------- ### Get Single Egg Information Source: https://context7.com/lucas-labs/kurv/llms.txt Retrieve detailed information about a specific egg using its ID or name. ```bash curl http://localhost:8787/eggs/1 ``` ```bash # Or by name curl http://localhost:8787/eggs/fastapi ``` -------------------------------- ### Get Egg Details Source: https://context7.com/lucas-labs/kurv/llms.txt Retrieves detailed information about a specific egg using its ID, name, or PID. Includes configuration, environment variables, and process state. JSON output is supported. ```bash # Get egg details by ID kurv egg 1 ``` ```bash # Get egg details by name kurv egg fastapi ``` ```bash # Get egg details by PID kurv egg 35824 ``` ```bash # Get JSON output kurv egg 1 --json ``` -------------------------------- ### Get Single Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Retrieves detailed information about a specific egg using its ID or name. ```APIDOC ## GET /eggs/{id} ### Description Returns detailed information about a specific egg. ### Method GET ### Endpoint `/eggs/{id}` ### Parameters #### Path Parameters - **id** (string) - Required - The name or ID of the egg to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the egg. - **name** (string) - The name of the egg. - **command** (string) - The command to execute for the egg. - **args** (array of strings) - Arguments for the command. - **cwd** (string) - The current working directory for the egg. - **env** (object) - Environment variables for the egg. - **state** (object) - The current state of the egg. - **status** (string) - The status of the egg (e.g., "Running", "Stopped"). - **pid** (integer) - The process ID of the egg. - **start_time** (string) - The timestamp when the egg started. - **try_count** (integer) - The number of times the egg has been attempted to start. - **error** (string or null) - Any error message associated with the egg. ### Response Example ```json { "id": 1, "name": "fastapi", "command": "poetry", "args": ["run", "serve"], "cwd": "/home/user/my-fastapi-app", "env": { "FASTAPI_PORT": "8080" }, "state": { "status": "Running", "pid": 35824, "start_time": "2024-01-15T10:30:00", "try_count": 0, "error": null } } ``` ``` -------------------------------- ### Control Egg State Source: https://context7.com/lucas-labs/kurv/llms.txt APIs to control the lifecycle of an egg (stop, start, restart, remove). ```APIDOC ## POST /eggs/{id}/stop ### Description Stops a running egg without removing its configuration. ### Method POST ### Endpoint `/eggs/{id}/stop` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the egg to stop. ### Response #### Success Response (200) Returns the updated egg object with its status changed to "Stopped". ## POST /eggs/{id}/start ### Description Starts a previously stopped egg. ### Method POST ### Endpoint `/eggs/{id}/start` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the egg to start. ### Response #### Success Response (200) Returns the updated egg object with its status changed to "Pending". ## POST /eggs/{id}/restart ### Description Restarts a running egg. ### Method POST ### Endpoint `/eggs/{id}/restart` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the egg to restart. ### Response #### Success Response (200) Returns the updated egg object with its status changed to "Restarting". ## POST /eggs/{id}/remove ### Description Stops and removes an egg from the basket. Note: Plugins cannot be removed via API. ### Method POST ### Endpoint `/eggs/{id}/remove` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the egg to remove. ### Response #### Success Response (200) Returns the updated egg object with its status changed to "PendingRemoval". ``` -------------------------------- ### Restart an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Restarts a running egg by stopping and then starting it. Can be performed by ID or name. JSON response is available. ```bash # Restart by ID kurv restart 1 ``` ```bash # Restart by name kurv restart fastapi ``` ```bash # Get JSON response kurv restart 1 --json ``` -------------------------------- ### Get Server Status via REST API Source: https://context7.com/lucas-labs/kurv/llms.txt Retrieves server information including API host, port, and version using a curl request. ```bash curl http://localhost:8787/status ``` -------------------------------- ### Deploy New Application (Collect Egg) Source: https://context7.com/lucas-labs/kurv/llms.txt Deploy a new application by sending its configuration as JSON to create a new egg. ```bash curl -X POST http://localhost:8787/eggs \ -H "Content-Type: application/json" \ -d '{ "name": "myapp", "command": "node", "args": ["server.js"], "cwd": "/home/user/myapp", "env": { "PORT": "3000", "NODE_ENV": "production" } }' ``` -------------------------------- ### List Plugins Source: https://github.com/lucas-labs/kurv/blob/master/README.md View all currently discovered and managed plugins. ```sh $ kurv plugins # list all plugins ``` -------------------------------- ### List Plugins Source: https://context7.com/lucas-labs/kurv/llms.txt Displays all auto-discovered plugins from the plugins directory. JSON output is available. ```bash # List all plugins kurv plugins ``` ```bash # Get JSON output kurv plugins --json ``` -------------------------------- ### Collect an Egg (Deploy Application) Source: https://context7.com/lucas-labs/kurv/llms.txt Deploys a new application by providing a YAML configuration file that defines the process to run. ```APIDOC ## Collect an Egg ### Description Deploys a new application by providing a YAML configuration file that defines the process to run. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **config_file** (string) - Required - Path to the YAML configuration file for the egg. #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Request Example (myapp.kurv) ```yaml name: fastapi command: poetry args: - run - serve cwd: /home/user/my-fastapi-app env: FASTAPI_PORT: 8080 DEBUG: "false" ``` ### Response Example ``` egg fastapi has been collected with id 1 and scheduled to be started ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "message": "egg fastapi has been collected with id 1 and scheduled to be started" } ``` ``` -------------------------------- ### Collect a New Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Deploys a new application by sending its configuration as JSON. ```APIDOC ## POST /eggs ### Description Deploys a new application by sending its configuration as JSON. ### Method POST ### Endpoint `/eggs` ### Request Body - **name** (string) - Required - The name of the egg. - **command** (string) - Required - The command to execute. - **args** (array of strings) - Optional - Arguments for the command. - **cwd** (string) - Optional - The current working directory. - **env** (object) - Optional - Environment variables for the egg. ### Request Example ```json { "name": "myapp", "command": "node", "args": ["server.js"], "cwd": "/home/user/myapp", "env": { "PORT": "3000", "NODE_ENV": "production" } } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the newly created egg. - **name** (string) - The name of the egg. - **command** (string) - The command to execute for the egg. - **args** (array of strings) - Arguments for the command. - **state** (object) - The initial state of the egg. - **status** (string) - The status of the egg (e.g., "Pending"). - **pid** (integer) - The process ID of the egg (0 if not started). - **try_count** (integer) - The number of times the egg has been attempted to start. ### Response Example ```json { "id": 2, "name": "myapp", "command": "node", "args": ["server.js"], "state": { "status": "Pending", "pid": 0, "try_count": 0 } } ``` ``` -------------------------------- ### Plugin SDK Source: https://context7.com/lucas-labs/kurv/llms.txt Information on how to create and configure Kurv plugins. ```APIDOC ## Plugin Development ### Creating a Plugin Plugins are executables that kurv auto-discovers from the `/plugins/` directory. Use the `kurv-plugin-sdk` crate to build plugins. ```rust // Cargo.toml // [dependencies] // kurv-plugin-sdk = "0.1" use kurv_plugin_sdk::{KurvEnv, PluginConfig, discover_env, plugin_metadata, start}; fn main() { start( plugin_metadata!(), |exe| { // Configure the plugin let mut env = discover_env(exe) .expect("kurv plugin: failed to load sidecar config"); env.insert("MY_PLUGIN_MODE".into(), "production".into()); PluginConfig { name: "my-plugin".into(), command: exe.to_string_lossy().into_owned(), args: vec!["run".into()], env, cwd: None, } }, |kurv_env: KurvEnv| { // Main plugin loop println!("Plugin running!"); println!("Kurv API: {}:{}", kurv_env.api_host, kurv_env.api_port); println!("Kurv Home: {:?}", kurv_env.home); println!("Logs Dir: {:?}", kurv_env.logs_dir); // Your plugin logic here... loop { std::thread::sleep(std::time::Duration::from_secs(60)); } }, ); } ``` ### Plugin Sidecar Configuration Plugins can have optional configuration via a JSON file placed alongside the executable. ```json // kurv-my-plugin.config.json (next to kurv-my-plugin executable) { "env": { "PLUGIN_API_KEY": "secret-key", "PLUGIN_DEBUG": "true" } } ``` ``` -------------------------------- ### List Plugins Source: https://context7.com/lucas-labs/kurv/llms.txt Displays all auto-discovered plugins from the plugins directory. ```APIDOC ## List Plugins ### Description Displays all auto-discovered plugins from the plugins directory. ### Method CLI Command ### Endpoint N/A ### Parameters #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` # List of discovered plugins would be shown here in a table format. ``` ### JSON Response Example ```json [ { "name": "plugin1", "path": "/path/to/plugins/plugin1" }, { "name": "plugin2", "path": "/path/to/plugins/plugin2" } ] ``` ``` -------------------------------- ### List Managed Eggs Source: https://github.com/lucas-labs/kurv/blob/master/README.md Display a snapshot of all currently managed eggs and their statuses. ```zsh $ kurv list ๐Ÿฅš eggs snapshot โ•ญโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ # โ”‚ pid โ”‚ name โ”‚ status โ”‚ โ†บ โ”‚ uptime โ”‚ โ”œโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ 1 โ”‚ 35824 โ”‚ fastapi โ”‚ running โ”‚ 0 โ”‚ 1s โ”‚ โ”‚ 2 โ”‚ 0 โ”‚ fastapi-2 โ”‚ stopped โ”‚ 0 โ”‚ - โ”‚ โ•ฐโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` -------------------------------- ### Collect (Deploy) an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Deploys a new application by collecting its YAML configuration file. Supports JSON output for programmatic use. ```bash # Collect (deploy) the egg kurv collect ./myapp.kurv ``` ```bash # Get JSON output kurv collect ./myapp.kurv --json ``` -------------------------------- ### Define an Egg Configuration Source: https://context7.com/lucas-labs/kurv/llms.txt YAML configuration file for deploying a new application (egg) with kurv. Specifies the application name, command, arguments, working directory, and environment variables. ```yaml # myapp.kurv - Egg configuration file name: fastapi command: poetry args: - run - serve cwd: /home/user/my-fastapi-app env: FASTAPI_PORT: 8080 DEBUG: "false" ``` -------------------------------- ### Configure a Python Web Server with Kurv Source: https://context7.com/lucas-labs/kurv/llms.txt Define application name, command, arguments, working directory, and environment variables for a Python application managed by Kurv. ```yaml name: my-application # Required: Unique identifier for the egg command: python # Required: Command/program to execute args: # Optional: Arguments passed to the command - -m - uvicorn - main:app - --host - 0.0.0.0 - --port - "8000" cwd: /opt/myapp # Optional: Working directory for the process env: # Optional: Environment variables DATABASE_URL: postgres://localhost/mydb REDIS_URL: redis://localhost:6379 LOG_LEVEL: info SECRET_KEY: my-secret-key ``` -------------------------------- ### List All Eggs Source: https://context7.com/lucas-labs/kurv/llms.txt Displays a summary table of all collected eggs and their current status, including PID, name, status, restart count, and uptime. JSON output is available. ```bash # List all eggs kurv list ``` ```bash # Get JSON output kurv list --json ``` -------------------------------- ### Manage Environment Variables Source: https://context7.com/lucas-labs/kurv/llms.txt APIs to replace or merge environment variables for an egg. ```APIDOC ## PUT /eggs/{id}/env ### Description Replaces all environment variables for a specific egg. ### Method PUT ### Endpoint `/eggs/{id}/env` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the egg whose environment variables are to be replaced. #### Request Body - **(object)** - Required - An object containing key-value pairs of environment variables to set. ### Request Example ```json { "NEW_VAR": "value", "ANOTHER_VAR": "another_value" } ``` ### Response #### Success Response (200) Returns the updated egg object with the new environment variables. ## PATCH /eggs/{id}/env ### Description Merges new environment variables with the existing ones for a specific egg. ### Method PATCH ### Endpoint `/eggs/{id}/env` ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the egg whose environment variables are to be merged. #### Request Body - **(object)** - Required - An object containing key-value pairs of environment variables to merge. ### Request Example ```json { "ADDITIONAL_VAR": "value" } ``` ### Response #### Success Response (200) Returns the updated egg object with the merged environment variables. ``` -------------------------------- ### Manage Environment Variables Source: https://context7.com/lucas-labs/kurv/llms.txt Updates environment variables for an egg using a JSON file. Changes take effect on the next egg restart. ```APIDOC ## Manage Environment Variables ### Description Updates environment variables for an egg using a JSON file. Changes take effect on the next egg restart. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **identifier** (string) - Required - The ID, name, or PID of the egg. - **env_file** (string) - Required - Path to the JSON file containing environment variables. #### Flags - **--replace** (boolean) - Optional - Replaces all existing environment variables with the ones in the file. - **--json** (boolean) - Optional - Output in JSON format. ### Request Example (my-env.json) ```json { "FASTAPI_PORT": "9000", "NEW_VAR": "value" } ``` ### Response Example ``` Environment variables for egg with ID 1 updated successfully. ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "message": "Environment variables updated successfully." } ``` ``` -------------------------------- ### Restart a Running Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Restart a running egg. ```bash curl -X POST http://localhost:8787/eggs/1/restart ``` -------------------------------- ### List All Eggs via REST API Source: https://context7.com/lucas-labs/kurv/llms.txt Fetches a summary list of all collected eggs and their current status via the REST API. Supports filtering for plugins only. ```bash # List eggs curl http://localhost:8787/eggs ``` ```bash # List plugins only curl "http://localhost:8787/eggs?kind=plugins" ``` -------------------------------- ### Manage Eggs Source: https://github.com/lucas-labs/kurv/blob/master/README.md Commands to inspect, stop, remove, or restart specific eggs. ```sh $ kurv egg ``` ```sh $ kurv stop ``` ```sh $ kurv remove ``` ```sh $ kurv restart ``` -------------------------------- ### Manage Egg Environment Variables Source: https://context7.com/lucas-labs/kurv/llms.txt Updates environment variables for an egg using a JSON file. Supports merging with existing variables or replacing them entirely. Changes take effect on the next egg restart. JSON response is available. ```json // my-env.json { "FASTAPI_PORT": "9000", "NEW_VAR": "value" } ``` ```bash # Merge new environment variables with existing ones kurv env 1 my-env.json ``` ```bash # Replace all environment variables kurv env 1 my-env.json --replace ``` ```bash # By name kurv env fastapi my-env.json ``` ```bash # Get JSON response kurv env 1 my-env.json --json ``` -------------------------------- ### List Eggs Source: https://context7.com/lucas-labs/kurv/llms.txt Displays a summary table showing all collected eggs and their current status. ```APIDOC ## List Eggs ### Description Displays a summary table showing all collected eggs and their current status. ### Method CLI Command ### Endpoint N/A ### Parameters #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` ๐Ÿฅš eggs snapshot โ•ญโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ # โ”‚ pid โ”‚ name โ”‚ status โ”‚ โ†บ โ”‚ uptime โ”‚ โ”œโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ 1 โ”‚ 35824 โ”‚ fastapi โ”‚ running โ”‚ 0 โ”‚ 1s โ”‚ โ”‚ 2 โ”‚ 0 โ”‚ fastapi-2 โ”‚ stopped โ”‚ 0 โ”‚ - โ”‚ โ•ฐโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ ``` ### JSON Response Example ```json [ { "id": 1, "pid": 35824, "name": "fastapi", "status": "running", "retry_count": 0, "uptime": "1s" }, { "id": 2, "pid": 0, "name": "fastapi-2", "status": "stopped", "retry_count": 0, "uptime": "-" } ] ``` ``` -------------------------------- ### Merge Egg Environment Variables Source: https://context7.com/lucas-labs/kurv/llms.txt Merge new environment variables with the existing ones for an egg. ```bash curl -X PATCH http://localhost:8787/eggs/1/env \ -H "Content-Type: application/json" \ -d '{ "ADDITIONAL_VAR": "value" }' ``` -------------------------------- ### Replace Egg Environment Variables Source: https://context7.com/lucas-labs/kurv/llms.txt Replace all environment variables for an egg with new ones. ```bash curl -X PUT http://localhost:8787/eggs/1/env \ -H "Content-Type: application/json" \ -d '{ "NEW_VAR": "value", "ANOTHER_VAR": "another_value" }' ``` -------------------------------- ### Stop a Running Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Stop a running egg without removing its configuration. ```bash curl -X POST http://localhost:8787/eggs/1/stop ``` -------------------------------- ### Stop an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Halts a running egg without removing its configuration. Can be done by ID, name, or PID. JSON response is available. ```bash # Stop by ID kurv stop 1 ``` ```bash # Stop by name kurv stop fastapi ``` ```bash # Stop by PID kurv stop 35824 ``` ```bash # Get JSON response kurv stop 1 --json ``` -------------------------------- ### Stop an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Halts a running egg without removing it from the basket (configuration is preserved). ```APIDOC ## Stop an Egg ### Description Halts a running egg without removing it from the basket (configuration is preserved). ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **identifier** (string) - Required - The ID, name, or PID of the egg to stop. #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` Egg with ID 1 stopped successfully. ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "message": "Egg stopped successfully." } ``` ``` -------------------------------- ### Remove an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Stop and remove an egg from the basket. Note: Plugins cannot be removed via API. ```bash curl -X POST http://localhost:8787/eggs/1/remove ``` -------------------------------- ### Remove an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Stops the process and removes the egg configuration entirely from kurv. Can be done by ID or name. JSON response is available. ```bash # Remove by ID kurv remove 1 ``` ```bash # Remove by name kurv remove fastapi ``` ```bash # Get JSON response kurv remove 1 --json ``` -------------------------------- ### Remove an Egg Source: https://context7.com/lucas-labs/kurv/llms.txt Stops the process and removes the egg configuration from the basket entirely. ```APIDOC ## Remove an Egg ### Description Stops the process and removes the egg configuration from the basket entirely. ### Method CLI Command ### Endpoint N/A ### Parameters #### Path Parameters - **identifier** (string) - Required - The ID, name, or PID of the egg to remove. #### Flags - **--json** (boolean) - Optional - Output in JSON format. ### Response Example ``` Egg with ID 1 removed successfully. ``` ### JSON Response Example ```json { "id": 1, "name": "fastapi", "message": "Egg removed successfully." } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.