### Install and Login to gman CLI Source: https://givemeanode.com/docs Install the gman CLI tool and authenticate the user session. ```bash curl -fsSL https://givemeanode.com/cli.sh | bash gman login ``` -------------------------------- ### Clone and Install Repository Source: https://givemeanode.com/docs Execute a git clone and pip install command on a specific node. ```bash gman run tulip -- sh -c 'git clone https://github.com/you/yourrepo && cd yourrepo && pip install -e .' # exit code = the remote exit code ``` ```python run_command("tulip", "git clone https://github.com/you/yourrepo && cd yourrepo && pip install -e .") → {exit_code: 0, stdout: "...", stderr: "...", truncated: false} ``` -------------------------------- ### Configure CI Pipeline Authentication Source: https://givemeanode.com/docs Example GitHub Actions workflow step demonstrating how to inject the GMAN_TOKEN secret into a job submission command. ```yaml # .github/workflows/deploy.yml - run: curl -fsSL https://givemeanode.com/cli.sh | bash - run: gman job submit --chip h100 --context ./train --wait env: { GMAN_TOKEN: ${{ secrets.GMAN_TOKEN }} } ``` -------------------------------- ### GET /v1/events Source: https://givemeanode.com/docs Retrieves structured notices for the node, such as machine retirement and spend-cap warnings. ```APIDOC ## GET /v1/events ### Description Retrieves structured notices with deadlines, such as machine retirement and spend-cap warnings. ### Method GET ### Endpoint http://169.254.42.1/v1/events ### Headers - **Metadata-Flavor**: givemeanode (Required) ``` -------------------------------- ### GET /v1/node Source: https://givemeanode.com/docs Retrieves identity and billing information for the current node, including name, state, rate, and grace window. ```APIDOC ## GET /v1/node ### Description Retrieves identity and billing information for the current node. ### Method GET ### Endpoint http://169.254.42.1/v1/node ### Headers - **Metadata-Flavor**: givemeanode (Required) ``` -------------------------------- ### Create, run, and stop a GPU node Source: https://givemeanode.com/docs Demonstrates the lifecycle of a GPU node using CLI commands and raw MCP tool calls. ```bash gman node create --chip h100 --wait # polls to running; prints the locked rate gman run tulip -- nvidia-smi gman node stop tulip # parked: files intact, billing stopped ``` ```json create_node(chip: "h100") → {name: "tulip", status: "provisioning", rate: "$/min"} run_command("tulip", "nvidia-smi") → {exit_code: 0, stdout: "..."} stop_node("tulip") → parked: files intact, billing stopped ``` -------------------------------- ### Create a Hugging Face connection Source: https://givemeanode.com/docs Initialize a connection with write permissions using a token from stdin. ```bash gman connection create ckpts --kind huggingface \ --scope acme/ckpts --verbs read,write --material-stdin < token.txt ``` -------------------------------- ### Manage Object Storage Buckets Source: https://givemeanode.com/docs Basic CLI commands for creating, uploading, listing, downloading, and deleting objects in a bucket. ```bash gman storage bucket create corpus gman storage cp ./train-data corpus/train/ # directories upload per-file gman storage ls corpus/ gman storage cp corpus/train/a.bin ./ # download gman storage rm corpus/train/a.bin # delete one object ``` -------------------------------- ### Create a GPU node Source: https://givemeanode.com/docs Initialize a new node with a specified name and chip configuration. ```CLI gman node create --name tulip --chip h100 ``` ```MCP create_node(name: "tulip", chip: "h100") ``` -------------------------------- ### Export data via CLI Source: https://givemeanode.com/docs List available connections and export a local directory to a Hugging Face repository. ```bash gman connection ls # ckpts huggingface read,write acme/ckpts gman export tulip --connection ckpts \ --source ~/out/checkpoints --dest acme/ckpts@main:runs/run7/ --wait ``` -------------------------------- ### Configure MCP Server in opencode.json Source: https://givemeanode.com/docs Add the GiveMeANode server to the opencode configuration file. ```json { "mcp": { "givemeanode": { "type": "remote", "url": "https://mcp.givemeanode.com", "enabled": true } } } ``` -------------------------------- ### create_context Source: https://givemeanode.com/docs Initiates a large file upload for build contexts. ```APIDOC ## create_context ### Description Presigns an upload URL for large files (up to 10 GiB). ### Parameters - **sha256** (string) - Required - SHA256 hash of the file. - **size_bytes** (integer) - Required - Size of the file in bytes. ``` -------------------------------- ### Download context to a node Source: https://givemeanode.com/docs Retrieve a download URL for a finalized context and pull it onto a specific node. ```bash gman api get /contexts/ctx_... # → download URL gman run tulip -d -- curl -o /root/data.tar.zst '' ``` ```python get_context(context_id) → download URL run_command(node, "curl -o ~/data.tar.zst ''", detach: true) ``` -------------------------------- ### Track Usage and Billing via CLI and MCP Source: https://givemeanode.com/docs Commands to retrieve monthly spending, node-specific costs, and dunning status. ```CLI gman usage # this month's spend per node gman usage --month 2026-06 gman billing # dunning state, MTD spend, caps ``` ```MCP get_usage() # this month's spend per node get_usage(month: "2026-06") get_billing() # dunning state, MTD spend, caps ``` -------------------------------- ### Upload large build contexts Source: https://givemeanode.com/docs Handle build contexts larger than 4 MiB by manually creating and finalizing a context upload. ```bash gman job submit --chip h100 --context ./ctx --command '...' # one command: tars ./ctx deterministically, uploads (create_context → # finalize_context), then submits - any size up to 10 GiB. A pre-built # tar.zst rides the same dance by hand via gman api post /contexts. ``` ```python create_context(sha256: "...", size_bytes: 123456789) → upload URL # PUT the tar to the URL, then: finalize_context(context_id) submit_job(chip: "h100", command: "...", context_id: "...", idempotency_key: "...") ``` -------------------------------- ### Import data via connection Source: https://givemeanode.com/docs Lists available connections and imports data from a source to a destination on a node. ```bash gman connection ls # names, kinds, scopes - never material gman import tulip --connection corpus \ --source s3://my-bucket/datasets/train/ --dest /data/train --wait ``` ```ruby list_connections() → [{name: "corpus", kind: "s3-keys", scope: "s3://my-bucket/datasets/", ...}] import_data("tulip", connection: "corpus", source: "s3://my-bucket/datasets/train/", dest: "/data/train") → {import_id: "i-4kd93", status: "running"} get_import("tulip", "i-4kd93") → {status: "complete", total_bytes: 5368709120, files: 128, dest_path: "/data/train"} ``` -------------------------------- ### Manage Service Tokens via CLI Source: https://givemeanode.com/docs Commands for creating, listing, and revoking service tokens. Tokens are displayed only once upon creation and should be stored securely. ```bash gman token create --name ci-deploy --workspace protein-lab # prints GMAN_TOKEN=gmnt_... once - copy it into your CI secrets gman token ls # names, scopes, workspaces, expiry, last used gman token revoke # immediate ``` -------------------------------- ### Create a secure connection Source: https://givemeanode.com/docs Configures a private data connection using CLI. Secrets are passed via stdin to ensure they are not logged. ```bash curl -fsSL https://givemeanode.com/cli.sh | bash && gman login # once, ~2 minutes gman connection create corpus --kind s3-keys \ --scope s3://my-bucket/datasets/ \ --access-key-id AKIA... --material-stdin < secret-key.txt ``` -------------------------------- ### Import Data from Storage Source: https://givemeanode.com/docs Commands to pull data from a storage bucket to a node using CLI or import_data function. ```bash gman import tulip --connection storage/corpus --source train/ --dest /data/train --wait ``` ```python import_data("tulip", connection: "storage/corpus", source: "train/", dest: "/data/train") ``` -------------------------------- ### Add MCP Server to OpenAI Codex Source: https://givemeanode.com/docs Configure the GiveMeANode MCP server via the Codex CLI or configuration file. ```bash codex mcp add givemeanode --url https://mcp.givemeanode.com ``` ```toml [mcp_servers.givemeanode] url = "https://mcp.givemeanode.com" ``` -------------------------------- ### Expose a vLLM endpoint on a node Source: https://givemeanode.com/docs Commands to run a vLLM server on a node and generate a public HTTPS URL for the specified port. ```bash gman run tulip -d -- python -m vllm.entrypoints.openai.api_server --port 8000 gman api post /nodes/tulip/endpoints --data '{"port": 8000}' → {"url": "https://.", "expires_at": "..."} ``` ```ruby run_command("tulip", "python -m vllm.entrypoints.openai.api_server --port 8000", detach: true) expose_port("tulip", port: 8000) → {url: "https://.", expires_at: "..."} ``` -------------------------------- ### Export data via SDK Source: https://givemeanode.com/docs Programmatic interface for listing connections, initiating an export, and checking status. ```python list_connections() → [{name: "ckpts", kind: "huggingface", verbs: ["read", "write"], scope: "acme/ckpts", ...}] export_data("tulip", connection: "ckpts", source: "~/out/checkpoints", dest: "acme/ckpts@main:runs/run7/") → {export_id: "exp-4kd93", status: "running"} get_export("tulip", "exp-4kd93") → {status: "complete", total_bytes: 4831838208, dest: "acme/ckpts@main:runs/run7/"} ``` -------------------------------- ### Access Storage via S3 Protocol Source: https://givemeanode.com/docs Commands to generate S3 access keys and interact with buckets using standard S3 tools like AWS CLI and DuckDB. ```bash gman storage key create --bucket corpus --access rw # prints AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY (once) / endpoint aws s3 cp ./train-data s3://corpus/train/ --recursive \ --endpoint-url https://storage.givemeanode.com duckdb -c "SELECT count(*) FROM read_parquet('s3://corpus/train/*.parquet')" gman storage key ls gman storage key revoke gmnk_... # immediate; the secret is shredded ``` -------------------------------- ### Interact with Node Metadata Source: https://givemeanode.com/docs Use these commands from inside a node to retrieve identity, monitor events, or terminate the instance. ```bash curl -s -H 'Metadata-Flavor: givemeanode' http://169.254.42.1/v1/node curl -s -H 'Metadata-Flavor: givemeanode' http://169.254.42.1/v1/events curl -s -X POST -H 'Metadata-Flavor: givemeanode' http://169.254.42.1/v1/stop ``` -------------------------------- ### Submit a batch job Source: https://givemeanode.com/docs Submit a job to run a command on a specific chip. Use an idempotency key to ensure safe resubmission. ```bash gman job submit --chip h100 --context ./eval \ --command 'python eval.py' --idempotency-key eval-2026-07-25 → job_... # the id on stdout; rate and cost ceiling on stderr (--wait blocks to running) ``` ```python submit_job( chip: "h100", command: "python eval.py", context: {"Dockerfile": "FROM pytorch/pytorch\nCOPY eval.py .", "eval.py": "..."}, idempotency_key: "eval-2026-07-25") → {job_id: "job_...", rate: "$/min", cost_ceiling: "..."} ``` -------------------------------- ### Manage and monitor jobs Source: https://givemeanode.com/docs Retrieve job status, list jobs by label, or cancel running/queued jobs. ```bash gman job get job_... # status; gman job logs job_... -f follows gman job ls --label lr-sweep # every job under the label gman job cancel job_... # immediate; queued/building stops free ``` ```python get_job("job_...") # status; add stream:"run" for logs list_jobs(label: "lr-sweep", summary: true) # rollup with every declared result cancel_job("job_...") # immediate; queued/building stops free ``` -------------------------------- ### Export data from a node Source: https://givemeanode.com/docs Generates a presigned download URL for a file or directory on a node. ```bash gman api post /nodes/tulip/exports --data '{"path": "/root/yourrepo/checkpoints"}' → {"url": "https://...", "expires_at": "..."} ``` ```ruby export_file("tulip", "/root/yourrepo/checkpoints") → {url: "https://...", expires_at: "..."} ``` -------------------------------- ### Manage node lifecycle and execution Source: https://givemeanode.com/docs Commands to stop, run processes on, and delete nodes. Deleting a node is irreversible and requires the node to be stopped first. ```CLI gman node stop tulip # stop paying now; disk parks, files intact gman run tulip -- ls # wakes a stopped node automatically gman node rm tulip # destroy the disk (crypto-erase, irreversible); # stopped nodes only, and confirms unless -y ``` ```MCP stop_node("tulip") # stop paying now; disk parks, files intact run_command("tulip", "ls") # wakes a stopped node automatically delete_node("tulip") # destroy the disk (crypto-erase, irreversible); # stopped nodes only, so stop_node first ``` -------------------------------- ### POST /nodes/{node}/exports Source: https://givemeanode.com/docs Exports a file or directory from a node and returns a presigned download URL. ```APIDOC ## POST /nodes/{node}/exports ### Description Exports a file or directory from the specified node. Returns a presigned URL for downloading the content. ### Method POST ### Endpoint /nodes/{node}/exports ### Parameters #### Path Parameters - **node** (string) - Required - The identifier of the target node. #### Request Body - **path** (string) - Required - The path on the node to export. ### Request Example { "path": "/root/yourrepo/checkpoints" } ### Response #### Success Response (200) - **url** (string) - The presigned download URL. - **expires_at** (string) - The expiration timestamp for the URL. ### Response Example { "url": "https://...", "expires_at": "..." } ``` -------------------------------- ### submit_job Source: https://givemeanode.com/docs Submits a batch job to be queued and executed on the specified chip. ```APIDOC ## submit_job ### Description Builds an image, queues the job, and executes the command. Jobs are billed only for the running attempt. ### Parameters - **chip** (string) - Required - The hardware type (e.g., "h100"). - **command** (string) - Required - The command to execute. - **context** (object) - Optional - The build context containing Dockerfile and source files. - **context_id** (string) - Optional - ID of a previously uploaded context. - **idempotency_key** (string) - Required - Key to ensure safe resubmission. ``` -------------------------------- ### Write a file to a node Source: https://givemeanode.com/docs Uploads a file to a specific path on a node. Use the API for raw requests or the helper function for direct execution. ```bash gman api post /nodes/tulip/files \ --data '{"path": "/root/run.sh", "content": "#!/bin/sh\npython train.py\n", "executable": true}' ``` ```ruby write_file("tulip", "/root/run.sh", "#!/bin/sh\npython train.py\n", executable: true) ``` -------------------------------- ### Add MCP Server to Claude CLI with Service Token Source: https://givemeanode.com/docs Use a service token to bypass browser-based OAuth redirection when running on remote machines. ```bash # on the remote machine claude mcp add --transport http givemeanode https://mcp.givemeanode.com \ --header "Authorization: Bearer $GMAN_TOKEN" ``` -------------------------------- ### POST /org/invites Source: https://givemeanode.com/docs Invites a new member to an organization. ```APIDOC ## POST /org/invites ### Description Invites a user to the organization with a specified role. ### Method POST ### Endpoint /org/invites ### Request Body - **email** (string) - Required - The email address of the user to invite. - **role** (string) - Required - The role to assign (admin, billing, or member). ``` -------------------------------- ### create_node Source: https://givemeanode.com/docs Creates a new GPU node. This operation is non-blocking and idempotent. ```APIDOC ## create_node(name, chip, clock_lock=false) ### Description Creates a new GPU node container. If the node name already exists, the call is idempotent and returns the current status. ### Parameters - **name** (string) - Required - The unique identifier for the node. - **chip** (string) - Required - The hardware type, either 'h100' or '8xh100'. - **clock_lock** (boolean) - Optional - If true, pins the GPU clock for reproducible benchmarks. ``` -------------------------------- ### run_command Source: https://givemeanode.com/docs Executes a command on a node, automatically waking it if it is currently stopped. ```APIDOC ## run_command(name, command) ### Description Runs a shell command on the specified node. If the node is stopped, it will wake automatically. ### Parameters - **name** (string) - Required - The name of the node. - **command** (string) - Required - The command string to execute. ``` -------------------------------- ### run_command Source: https://givemeanode.com/docs Executes a command on a specified node. Supports environment variables and detached execution for long-running tasks. ```APIDOC ## run_command(node, command, env=None, detach=False) ### Description Executes a shell command on the target node. If detach is set to true, the command runs in the background and returns a command ID. ### Parameters - **node** (string) - Required - The identifier of the target node. - **command** (string) - Required - The shell command to execute. - **env** (object) - Optional - Key-value pairs for environment variables. - **detach** (boolean) - Optional - If true, runs the command in the background. ### Response - **exit_code** (integer) - The exit status of the command (if not detached). - **stdout** (string) - Standard output stream. - **stderr** (string) - Standard error stream. - **command_id** (string) - Unique identifier for detached commands. - **log_path** (string) - Path to the command logs. ``` -------------------------------- ### Invite Organization Member Source: https://givemeanode.com/docs Add a new member to an organization using the CLI or MCP interface. ```bash gman api post /org/invites --data '{"email": "student@lab.edu", "role": "member"}' ``` ```text invite_member(email: "student@lab.edu", role: "member") ``` -------------------------------- ### Execute Command with Secrets Source: https://givemeanode.com/docs Pass sensitive information using the --env flag or env parameter to prevent exposure in command logs. ```bash gman run tulip --env HF_TOKEN=hf_... -- huggingface-cli download meta-llama/Llama-3.1-8B ``` ```python run_command("tulip", "huggingface-cli download meta-llama/Llama-3.1-8B", env: {HF_TOKEN: "hf_..."}) ``` -------------------------------- ### list_nodes Source: https://givemeanode.com/docs Lists all nodes associated with the user account. ```APIDOC ## list_nodes() ### Description Returns a list of all nodes currently owned by the user. ``` -------------------------------- ### Add MCP server to Claude Code Source: https://givemeanode.com/docs Configures the MCP server for use with Claude Code. ```bash claude mcp add --transport http givemeanode https://mcp.givemeanode.com ``` -------------------------------- ### list_commands Source: https://givemeanode.com/docs Lists all detached commands associated with a node. ```APIDOC ## list_commands(node) ### Description Returns a list of all detached commands on the specified node, ordered by newest first. ``` -------------------------------- ### Run parameter sweeps Source: https://givemeanode.com/docs Execute multiple variants of a job in a single call to perform hyperparameter tuning. ```bash gman api post /jobs/sweeps --data '{ "shared": {"chip": "h100", "context": {...}}, "variants": [{"env": {"LR": "1e-4"}}, {"env": {"LR": "3e-4"}}, {"env": {"LR": "1e-3"}}], "label": "lr-sweep", "idempotency_key": "lr-sweep-1"}' ``` ```python submit_jobs( shared: {chip: "h100", context: {...}}, variants: [{env: {LR: "1e-4"}}, {env: {LR: "3e-4"}}, {env: {LR: "1e-3"}}], label: "lr-sweep", idempotency_key: "lr-sweep-1") ``` -------------------------------- ### get_command Source: https://givemeanode.com/docs Retrieves the status and output of a previously executed detached command. ```APIDOC ## get_command(node, command_id, offset=None) ### Description Fetches the status and incremental output for a specific detached command. ### Parameters - **node** (string) - Required - The node identifier. - **command_id** (string) - Required - The ID of the command to retrieve. - **offset** (integer) - Optional - Byte offset to retrieve only new output. ``` -------------------------------- ### POST /nodes/{node}/files Source: https://givemeanode.com/docs Uploads a file to a specific node. ```APIDOC ## POST /nodes/{node}/files ### Description Uploads a file to the specified node. This is intended for small files like configurations or entry scripts. ### Method POST ### Endpoint /nodes/{node}/files ### Parameters #### Path Parameters - **node** (string) - Required - The identifier of the target node. #### Request Body - **path** (string) - Required - The destination path on the node. - **content** (string) - Required - The file content. - **executable** (boolean) - Optional - Whether the file should be marked as executable. ### Request Example { "path": "/root/run.sh", "content": "#!/bin/sh\npython train.py\n", "executable": true } ``` -------------------------------- ### get_job Source: https://givemeanode.com/docs Retrieves the status and details of a specific job. ```APIDOC ## get_job ### Description Returns the status of a job, including queue position and estimated wait time. If the job is complete, it returns result data and output download URLs. ### Parameters - **job_id** (string) - Required - The unique identifier of the job. ``` -------------------------------- ### POST /nodes/{node}/endpoints Source: https://givemeanode.com/docs Exposes a specific port on a running node to a public HTTPS URL. ```APIDOC ## POST /nodes/{node}/endpoints ### Description Exposes a port on a running node at a public HTTPS URL. The URL acts as a secret and should be handled securely. ### Method POST ### Endpoint /nodes/{node}/endpoints ### Parameters #### Path Parameters - **node** (string) - Required - The identifier of the node. #### Request Body - **port** (integer) - Required - The port number on the node to expose. - **auth** (string) - Optional - If set to "bearer", requires an Authorization: Bearer token at the edge. ### Response #### Success Response (200) - **url** (string) - The public HTTPS URL for the exposed port. - **expires_at** (string) - The expiration timestamp of the endpoint. ### Response Example { "url": "https://.", "expires_at": "..." } ``` -------------------------------- ### get_node Source: https://givemeanode.com/docs Retrieves the current state, rate, and queue position of a specific node. ```APIDOC ## get_node(name) ### Description Returns the status of a node. This is the recommended method to poll while a node is in 'queued', 'provisioning', or 'waking' states. ### Parameters - **name** (string) - Required - The name of the node to retrieve. ``` -------------------------------- ### submit_jobs (Sweeps) Source: https://givemeanode.com/docs Submits multiple variants of a job in a single call. ```APIDOC ## submit_jobs ### Description Runs up to 256 variants of one job with shared configuration. ### Parameters - **shared** (object) - Required - Shared configuration like chip and context. - **variants** (array) - Required - List of variant-specific configurations (e.g., environment variables). - **label** (string) - Required - Label for the sweep. - **idempotency_key** (string) - Required - Key to ensure safe resubmission. ``` -------------------------------- ### POST /v1/stop Source: https://givemeanode.com/docs Terminates the current node from within. ```APIDOC ## POST /v1/stop ### Description Ends the node from inside with stop_node semantics. ### Method POST ### Endpoint http://169.254.42.1/v1/stop ### Headers - **Metadata-Flavor**: givemeanode (Required) ``` -------------------------------- ### list_jobs Source: https://givemeanode.com/docs Lists jobs filtered by label. ```APIDOC ## list_jobs ### Description Returns a list of jobs associated with a specific label, optionally providing a summary table. ### Parameters - **label** (string) - Required - The label to filter by. - **summary** (boolean) - Optional - Whether to return a summary rollup. ``` -------------------------------- ### stop_node Source: https://givemeanode.com/docs Stops a running node to cease billing while preserving the persistent disk. ```APIDOC ## stop_node(name) ### Description Stops the node, parks the disk, and stops billing. Files remain intact. ### Parameters - **name** (string) - Required - The name of the node to stop. ``` -------------------------------- ### kill_command Source: https://givemeanode.com/docs Terminates a running detached command. ```APIDOC ## kill_command(node, command_id) ### Description Sends a TERM signal to the specified command, followed by a KILL signal after 10 seconds if the process is still active. ``` -------------------------------- ### Manage Long-Running Detached Commands Source: https://givemeanode.com/docs Run processes in the background and manage them using command IDs, logs, and termination signals. ```bash gman run tulip -d -- python train.py # returns immediately with the command id gman logs tulip -f # newest command's output; -f follows to exit gman ps tulip # all detached commands, newest first gman kill tulip # TERM, then KILL after 10s ``` ```python run_command("tulip", "python train.py", detach: true) → {command_id: "cmd_...", log_path: "..."} # returns immediately get_command("tulip", "cmd_...") # status + incremental output get_command("tulip", "cmd_...", offset: 4096) # just the new bytes list_commands("tulip") # all detached commands, newest first kill_command("tulip", "cmd_...") # TERM, then KILL after 10s ``` -------------------------------- ### delete_node Source: https://givemeanode.com/docs Permanently deletes a node and its associated persistent disk. ```APIDOC ## delete_node(name) ### Description Performs a crypto-erase of the node's disk. This is irreversible. The node must be in a stopped state before deletion. ### Parameters - **name** (string) - Required - The name of the node to delete. ``` -------------------------------- ### cancel_job Source: https://givemeanode.com/docs Cancels a running or queued job. ```APIDOC ## cancel_job ### Description Immediately cancels a job. Queued or building time is not billed. ### Parameters - **job_id** (string) - Required - The unique identifier of the job. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.