Learn the CLI step by step
Understand the gxmesh workflow from sign-in and project selection to scaffolding, local calls, tests, deployment and client connection.
Use gxmesh to build and deploy tools. Use codex, claude, or another MCP client to call those
tools from a conversation. They are separate programs with separate sign-ins.
This walkthrough creates a greeting tool without external API keys. You need a Glxymesh account, the gxmesh CLI, and a local toolchain for your chosen language.
Read command examples
Section titled “Read command examples”| Notation | Meaning |
|---|---|
gxmesh |
The program you run in a terminal |
new greet |
The command and its argument: create a tool named greet |
--lang node |
An option and its value; node selects TypeScript |
<slug> |
A placeholder to replace; do not type the angle brackets |
[--approve] |
An optional flag in reference syntax; omit the brackets when using it |
'{"name":"Ada"}' |
One JSON argument, quoted so the shell keeps it together |
Run blocks one at a time. Read the result before moving to the next block. The examples use acme
as the organization; replace it with an organization you belong to.
1. Sign in and choose the destination
Section titled “1. Sign in and choose the destination”gxmesh versiongxmesh logingxmesh orggxmesh org use acmegxmesh project create hello "Hello tools"version confirms the CLI is installed. login prints a browser URL and a device code: complete that
sign-in first. org lists the organizations your account can access. org use selects one, and
project create creates the hosted destination called hello. If it already exists, use
gxmesh project use hello instead of creating it again.
2. Create the local project
Section titled “2. Create the local project”mkdir hello-toolscd hello-toolsPick one language:
gxmesh init --lang node --org acme --project hellonpm installNode.js LTS runs the tools locally. node is the configuration value for TypeScript projects.
gxmesh init --lang go --org acme --project helloInstall the Go toolchain for local builds. Use --module example.com/hello-tools if you need a
specific module path.
gxmesh init --lang python --org acme --project helloInstall Python 3.14 for local runs. Additional dependencies belong in requirements.txt.
See local development.
init writes gx.yml, language configuration, tools/ and .gitignore in this directory. It does
not deploy anything. The explicit --org and --project values make the destination clear.
3. Scaffold a tool
Section titled “3. Scaffold a tool”gxmesh new greetThis creates tools/greet/tool.yml and a greeting function in your project’s language. The generated
input is named name. Open both files: tool.yml describes the interface the model sees, and the
function implements it. The default kind is function; gxmesh new lookup --kind http creates a
request template instead, which you must configure before calling it.
4. Call and test it locally
Section titled “4. Call and test it locally”gxmesh call greet '{"name":"Ada"}'gxmesh test greetgxmesh call greet "{\"name\":\"Ada\"}"gxmesh test greetcall runs the tool on your machine and prints its result and diagnostics. The scaffold greets Ada.
test greet runs the tests: entries in that tool’s tool.yml. Run gxmesh test for all tools.
Both commands regenerate the typed inputs; use gxmesh gen when you only want to refresh editor types.
Change the generated test to check its result, not only that the call succeeds:
tests: - input: {name: Ada} expect: {contains: Ada}Run gxmesh test greet again. If a check fails, correct the tool or its test before deploying.
5. Try it through an MCP client locally
Section titled “5. Try it through an MCP client locally”gxmesh devLeave this terminal running. It serves http://127.0.0.1:7777/mcp and rebuilds on changes.
In a second terminal, choose your client:
codex mcp add hello-local --url http://127.0.0.1:7777/mcpcodexclaude mcp add --transport http hello-local http://127.0.0.1:7777/mcpclaudeAsk: “Use hello-local to greet Ada.” Inspect /mcp inside the client if the tool is missing. The
local server needs no OAuth sign-in and must run on the same machine as the client. Ctrl+C stops it.
6. Deploy and verify
Section titled “6. Deploy and verify”Back in the project directory:
gxmesh pushgxmesh revisionsgxmesh connectpush validates and sends the project to Glxymesh. The platform builds it, runs its tests and makes a
revision live if they pass. New network hosts or secret access require approval during the push.
revisions shows which revision is live. connect prints the hosted URL and client setup instructions.
The hello project in acme uses https://acme.mcp.glxymesh.com/hello. Connect it under a different
name from hello-local; follow the client connection guide to add it and
complete the hosted OAuth sign-in. Call greet and check Invocations in the console.
7. Make a change or restore a revision
Section titled “7. Make a change or restore a revision”Edit a tool, run gxmesh test, then gxmesh push again. Your connected clients keep the same URL.
If you need to restore an earlier deployed version, first inspect gxmesh revisions, then use the
actual revision identifier from that list:
gxmesh rollback r1This changes the live deployment; it does not rewrite the files on your machine. Update your local source before your next push if you want to keep the restored behavior.
Know which project a command uses
Section titled “Know which project a command uses”Inside a project, gx.yml identifies the destination. Outside one, commands such as connect use
the active organization and project. init accepts scope flags; outside a project, the environment
variables GXMESH_ORG and GXMESH_PROJECT can override the stored selection. For an existing project,
check its gx.yml before pushing; push does not accept scope flags to redirect the deployment.
See the full command reference for every command and option.
| If you see | Next step |
|---|---|
gxmesh: command not found |
Open a new terminal after installation and check that the install directory is on PATH. |
No gx.yml |
Change into the initialized project directory, or run gxmesh init in a new one. |
| A build or dependency error | Check the toolchain for your lang; for Node projects, run npm install. |
| A JSON parse error | Use the quoting example for your shell and double quotes around JSON keys and strings. |
| A host or key approval prompt | Review the changes in tool.yml; approve only the access the tool needs. |