Inspacy CLI
Guide version 1.10.0
Available downloads
Download Inspacy.Cli.2.2.0.nupkgSHA-256 · ea0280f60f3be3f69348c754dee0a24bedd15a2aee1b90ef33a48861cca5ddb8
Install the CLI and check its version
Inspacy CLI 2.2.0 sends commands to the store’s versioned HTTP routes. Its command help and argument schemas travel with the package.
Before you start
- Install the .NET 10 SDK and download Inspacy.Cli.2.2.0.nupkg above into an empty packages directory. Run the example from that directory’s parent.
Steps
- Compare the file’s byte length and SHA-256 with its entry at /api/store/developers/v1/packages. In PowerShell, Get-FileHash ./packages/Inspacy.Cli.2.2.0.nupkg -Algorithm SHA256 prints the digest.
- Install the pinned version. Use the executable in ./tools for the commands below, or add the directory to PATH.
Example
dotnet tool install --tool-path ./tools --source ./packages Inspacy.Cli --version 2.2.0
./tools/inspacy --version
./tools/inspacy --helpExpected result
The version command prints 2.2.0. Help lists the installed commands even before a store connection is configured.
If something goes wrong
If the shell cannot find the command, use ./tools/inspacy from the installation directory (tools\inspacy.exe on Windows). If installation fails, check the SDK version, file name and local package directory.
Make your first call from a terminal
Fetch the JavaScript function reference. This walkthrough reads documentation and gives you a result to check before working on a game.
Before you start
- Set INSPACY_API_ORIGIN to the HTTPS origin of the store API, such as https://store.example.com. For local development, loopback HTTP is accepted. Supply just the origin, without /mcp.
- Use your shell’s secret settings to provide exactly one of INSPACY_API_KEY (your personal publishing key) or INSPACY_ACCESS_TOKEN (a store session token).
Steps
- Run ./tools/inspacy tools describe get_sdk_docs to inspect the installed input schema. Save the JSON below in a UTF-8 file named arguments.json.
- Run ./tools/inspacy docs sdk --input arguments.json. Read data.section.guideUrl to open the same reference in the browser.
- You can also supply the selectors as flags. Run ./tools/inspacy docs sdk --language javascript --version 1.2.0 --topic functions --locale en.
Example
{
"language": "javascript",
"version": "1.2.0",
"topic": "functions",
"locale": "en"
}Expected result
The SDK result has status found. Its section names javascript, version 1.2.0 and topic functions, with a download URL and a list of functions.
If something goes wrong
For an unknown selector, run ./tools/inspacy docs sdk to see the languages, versions and topics published by this API.
Command reference
Run the examples from the directory that contains tools. Redirection and pipes use standard input and output, so these commands also work in build scripts.
- --help, -h
- List the domain commands included in this CLI release.
Example
./tools/inspacy --help - --version
- Print the installed CLI version.
Example
./tools/inspacy --version - games create
- Create a private game. In draft.json, put the saved request UUID, title and description under "draft". Read data.id from the reply.
Example
./tools/inspacy games create --input draft.json - games get
- Read your private draft using the numeric ID returned by games create.
Example
./tools/inspacy games get --game-id 7 - games list
- Page through your own games. The response includes data and pagination.
Example
./tools/inspacy games list --page-number 1 --page-size 10 - catalog list
- Read a page of the public catalog.
Example
./tools/inspacy catalog list --page-number 1 --page-size 10 - tools list
- Print the local manifest as a JSON object with a tools array. This works offline.
Example
./tools/inspacy tools list - tools describe <name>
- Print the definition and inputSchema included in this version.
Example
./tools/inspacy tools describe create_game - tools call <name> [--input <file|->]
- Call the HTTP route by its tool name. Supply named JSON arguments from a UTF-8 file or pipe them through --input -. Data and pagination have the same shape as the domain command.
Example
./tools/inspacy tools call get_sdk_docs --input arguments.json - analytics summary
- Read totals for the period.
Example
./tools/inspacy analytics summary --game-id 42 --from 2027-01-05 --to 2027-01-08 - analytics series
- Read one row per UTC day.
Example
./tools/inspacy analytics series --game-id 42 --from 2027-01-05 --to 2027-01-08 - rankings list
- List the ranking categories of an owned game.
Example
./tools/inspacy rankings list --game-id 42 - rankings create
- Create a ranking category from a JSON file.
Example
./tools/inspacy rankings create --game-id 42 --input category.json - rankings update
- Replace a category's title, order, unit and state.
Example
./tools/inspacy rankings update --game-id 42 --code fastest-lap --input changes.json
Handle results in scripts
Commands and tools call return the HTTP API’s JSON on stdout. Diagnostics go to stderr.
Steps
- Check the exit status before parsing. Zero means success, 1 means the operation or exchange failed, and 2 means the command or its configuration needs correction.
- To migrate a v1 script, replace structuredContent.data with data and read pagination from the outer response. An API refusal can include an error body on stdout.
- A write is sent once. After a lost create reply, use the original request UUID and identical draft. After an uncertain news post, inspect news list --game-id with the game's ID before issuing another post.
- An unavailable action is reported against the installed manifest. Check the package catalog and install a CLI release that includes the action.
Example
$reply = ./tools/inspacy docs sdk --input arguments.json
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
($reply | ConvertFrom-Json).data.section.guideUrlExpected result
With arguments.json from the first-call tutorial, the script prints the URL of the selected SDK reference.
Resume an interrupted build uploadResume a build upload
Use the original ZIP and the saved upload ID to send the missing parts and then queue the verified build.
Before you start
- Use the publisher connection for the game. Run tools describe begin_build_upload for the reservation fields. Save the request UUID, SHA-256, byte count and build options before calling uploads begin --input begin.json. The reservation fields go under upload.
Steps
- Set the PowerShell variable $uploadId to the returned data.uploadId and run uploads resume with the original ZIP. The CLI reads receivedParts and sends only missing parts as raw bytes with X-Part-SHA256.
- Check the exit code after each command. Once every part is acknowledged, call uploads complete and then uploads status to follow the build.
Example
./tools/inspacy uploads resume --upload-id $uploadId --file game.zip
./tools/inspacy uploads complete --upload-id $uploadId
./tools/inspacy uploads status --upload-id $uploadIdExpected result
data.status moves from uploading to queued. Read missingApproval on this build before release.
If something goes wrong
After any interruption, query uploads status. Reuse the same upload ID and source ZIP for a reservation still in uploading. A queued build already has a packaging job.