{"id":22394431,"url":"https://github.com/akamai/cli-sandbox","last_synced_at":"2025-07-31T10:32:49.468Z","repository":{"id":37248629,"uuid":"144623215","full_name":"akamai/cli-sandbox","owner":"akamai","description":"Akamai CLI for Sandbox","archived":false,"fork":false,"pushed_at":"2025-07-25T11:08:23.000Z","size":563,"stargazers_count":13,"open_issues_count":9,"forks_count":11,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-25T17:27:23.264Z","etag":null,"topics":["akamai","akamai-cli","akamai-sandbox","cli","sandbox"],"latest_commit_sha":null,"homepage":"https://github.com/akamai/cli","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akamai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-13T19:14:46.000Z","updated_at":"2025-07-25T11:07:27.000Z","dependencies_parsed_at":"2025-07-04T13:10:09.521Z","dependency_job_id":"c58d0222-5262-4e9f-a314-4df1ab25a997","html_url":"https://github.com/akamai/cli-sandbox","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/akamai/cli-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akamai","download_url":"https://codeload.github.com/akamai/cli-sandbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akamai%2Fcli-sandbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268024646,"owners_count":24183149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akamai","akamai-cli","akamai-sandbox","cli","sandbox"],"created_at":"2024-12-05T05:10:09.306Z","updated_at":"2025-07-31T10:32:49.459Z","avatar_url":"https://github.com/akamai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sandbox CLI\nThe Sandbox command line interface (CLI) expedites the process of creating an isolated development environment for testing changes to your website or property.\n\n## Technical Setup Requirements\nTo use this tool you need:\n* [Akamai CLI](https://github.com/akamai/cli) installed. If you have a Mac with brew installed, run this command: `brew install akamai`.\n* An API client that contains both the Sandbox and Property Manager APIs with read-write access. Follow the steps in [Get Started with APIs](https://developer.akamai.com/api/getting-started) to learn how to configure credentials to access the API.\n* Node versions supported: any active LTS, maintenance LTS and current version (according to [nodejs schedule](https://nodejs.org/en/about/releases/)), currently: 20.x, 22.x and 24.x.\n* A supported Java version, currently 8, 11, 15 and 17.\n\n## Quick Start\n\n#### Step 1: Install Sandbox CLI \n\n`akamai install sandbox`\n\n#### Step 2: Create a sandbox \n\nThere are a variety of ways to create a sandbox. These code samples show a few common options.\n\n**Option A**: Create a sandbox based on a hostname in your Akamai property.\n\n`akamai sandbox create --hostname www.example.com --name sandbox_for_example.com`\n\n**Option B**: Create a sandbox based on a Property Manager configuration file.\n\n`akamai sandbox create --property example_prod_pm --name sandbox_for_example.com`\n\n\u003e**NOTE**: This command creates a sandbox based on the version of your Property Manager configuration that is currently active on the production network.\n\n**Option C**: Create a sandbox based on a specific version of a property configuration.\n\n`akamai sandbox create --property example_prod_pm:42 --name sandbox_for_example.com`   \n\nWhen creating the sandbox based on a property, the CLI automatically scans the Property Manager configuration, detects all the origins defined in the file and either use the origins from property (`--origin-from property`) or from config file (`--origin-from config`).\nAlternatively if you don't provide `--origin-from` command it will ask you to confirm if you want sandbox requests to go directly to origins from property or from config file. This is an example of how the auto scan works:\n\n```\nmy_laptop:~ username$ akamai sandbox create --property www.example.com:5 --name sandbox_for_example.com --requesthostnames localhost,www.example.com --origin-from config\nbuilding origin list \nDetected the following origins: origin-www.example.com  \nregistering sandbox in local datastore\nsandbox-id: 4b3a0c0e-dfe9-4df8-b175-1ed23e293c52 sandbox_for_example.com is now active  \nSuccessfully created sandbox-id 4b3a0c0e-dfe9-4df8-b175-1ed23e293c52. Generated sandbox client configuration at /Users/username/.akamai-cli/cache/sandbox-cli/sandboxes/sandbox_for_example.com/config.json Edit this file to specify the port and host for your dev environment. \nmy_laptop:~ username$\n``` \n\n\n#### Step 3: Connect to your sandbox\nRun this command to connect securely to the sandbox you just created:\n\n`akamai sandbox start`\n\nYou will see this message confirming that you are connected to the sandbox:\n\n`INFO  c.a.devpops.connector.ConnectorMain - Successfully launched Akamai Sandbox Client`\n\nYou may also add a `--print-logs` parameter to display logs directly on standard output. \n\n#### Step 4: Test the Sandbox\nYou have two options to test the Sandbox.\n\n* Point the hostname associated with the Property Manager configuration to `127.0.0.1` in your `/etc/hosts` file, then access the site from your browser `http://\u003cyour-hostname\u003e:9550`.\n\n    OR\n\n* Run this curl command: `curl --header 'Host: www.example.com' http://127.0.0.1:9550/`\n\n#### Step 5: Validate that your responses are coming from a Sandbox \nAll Sandbox traffic is tagged with the response header `X-Akamai-Sandbox: true`. You can use e.g. the [Developer Toolkit](https://github.com/akamai/akamai_developer_toolkit) to validate the presence of the header, Network Monitor in any browser or similar tools that display HTTP headers.\n\n#### Debug and report issues\nYou are all set, happy debugging! If you experience any issues with Sandbox, raise them as a [github issue](https://github.com/akamai/cli-sandbox/issues). Feel free to create a pull request with the fix or suggestion.\n___\n\n## Overview of Commands\nSandbox CLI enables you to manage sandboxes by calling the [Sandbox API](https://techdocs.akamai.com/sandbox/reference/welcome-to-sandbox-api).\n\nEvery command has a built-in help available by using `--help` or `-h`. Alternatively, you can use `akamai sandbox help [command]` \n\nCommand arguments in `[]` are optional, whereas command arguments in `\u003c\u003e` are required.\n\n\u003e **NOTE**: `sandbox-id` is a string that uniquely identifies a sandbox by `name` or `sandbox-id`. If you don’t specify a `sandbox-id`, the CLI uses the default sandbox. You can set the default with the `use` command.\n\n```\nUsage:  [options] [command]\n\nA tool that makes it easier to manage Akamai Sandboxes. Call the Sandbox API from the command line.\n\nOptions:\n  -V, --version                                                 Output the current version.\n  --debug                                                       Show debug information.\n  --edgerc \u003cfile\u003e                                               Use edgerc file for authentication.\n  --section \u003cname\u003e                                              Use this section in edgerc file that contains the credential set.\n  --accountkey \u003caccount-id\u003e                                     Use given internal parameter.\n  -h, --help                                                    Output usage information.\n\nCommands:\n  help [command]                                                Displays help information for the given command.\n  install                                                       Downloads and installs the Sandbox Client software.\n  list|ls [options]                                             Lists sandboxes that are available locally.\n  show [sandbox-id]                                             Shows details about the sandbox and JWT expiration date.\n  rules [sandbox-id]                                            Shows a rules tree for the sandbox.\n  use \u003csandbox-id\u003e                                              Sets a default sandbox for commands requiring [sandbox-id].\n  delete [options] \u003csandbox-id\u003e                                 Deletes the sandbox.\n  update-property [options] \u003csandbox-id\u003e \u003csandbox-property-id\u003e  Updates the sandbox’s property.\n  update [options] [sandbox-id]                                 Updates the sandbox.\n  clone [options] \u003csandbox-id\u003e                                  Clones the sandbox.\n  create [options]                                              Creates a new sandbox.\n  start [options]                                               Starts the sandbox client.\n  add-property [options] [sandbox-id]                           Adds a property to the sandbox.\n  sync-sandbox [options] \u003cJWT\u003e                                  Syncs a remote sandbox with the local system.\n  rotate-jwt [sandbox-id]                                       Rotates the JWT for the sandbox.\n  add-edgeworker \u003cedgeworker-id\u003e \u003cedgeworker-tarball\u003e           Adds an edgeworker to the default sandbox. Use a positive integer for edgeworker-id.\n  update-edgeworker \u003cedgeworker-id\u003e \u003cedgeworker-tarball\u003e        Updates the edgeworker for the default sandbox.\n  download-edgeworker \u003cedgeworker-id\u003e                           Downloads the edgeworker for the default sandbox.\n  delete-edgeworker [options] \u003cedgeworker-id\u003e                   Deletes the edgeworker for the default sandbox.\n```\n\n## Customizable Template\nYou can use this code sample to quickly customize the sandbox to your development environment. Copy the code below and paste it into a text editor.\n\n```\n{\n    \"sandbox\": {\n        \"clonable\": true,\n        \"properties\": [\n            {\n                \"property\": \"123456:2\",\n                \"requestHostnames\": [\n                    \"localhost2\"\n                ],\n                \"cpcode\": 1234\n            },\n            {\n                \"hostname\": \"example.com\",\n                \"requestHostnames\": [\n                    \"localhost2\"\n                ]\n            },\n            {\n                \"property\": \"example.sandbox.property.com:1\",\n                \"rulesPath\": \"./rules-1.json\",\n                \"requestHostnames\": [\n                    \"localhost3\"\n                ]\n            }\n        ]\n    },\n    \"clientConfig\": {\n        \"sandboxServerInfo\": {\n            \"secure\": false,\n            \"port\": 9550,\n            \"host\": \"127.0.0.1\"\n        },\n        \"originMappings\": [\n            {\n                \"from\": \"origin-www.example.com\",\n                \"to\": {\n                    \"secure\": false,\n                    \"port\": 8080,\n                    \"host\": \"localhost\"\n                }\n            }\n        ]\n    }\n}\n```\n\n1. Edit the information for `sandboxServerInfo` and `originMappings` according to your development environment and property specifications. For more information on which fields to modify, refer to the [User Guide](https://techdocs.akamai.com/sandbox/docs/config-sandbox-client-cli).\n2. Save the file with a `.json` extension (e.g., `example_recipe.json`)\n3. Run this command on your file `akamai sandbox create --recipe=example_recipe.json` to instantiate the sandbox client according to the defined specifications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamai%2Fcli-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakamai%2Fcli-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakamai%2Fcli-sandbox/lists"}