Skip to main content

Use with Codex or Claude Code

Install DevCLI, the aigw command-line tool, and log in, then choose your coding assistant below. Run the assistant on the same machine and under the same operating-system user as your DevCLI login.

Codex​

Add the AIGW skill​

From the root of your application repository:

Bash / Zsh

mkdir -p .agents/skills/aigw
aigw skill show > .agents/skills/aigw/SKILL.md

PowerShell

New-Item -ItemType Directory -Force .agents/skills/aigw | Out-Null
aigw skill show | Set-Content -Encoding utf8 .agents/skills/aigw/SKILL.md

Keep project-specific instructions in a separate file from the generated SKILL.md.

Start with your saved login​

After aigw login succeeds, start Codex CLI from your application repository:

codex

For the Codex app or IDE extension, open the same application repository. Its terminal tools must be able to run aigw and access your saved login. If the assistant runs on another machine or in an isolated environment, supply AIGW_API_KEY through that environment’s secret settings.

Paste this as your first prompt:

Use the aigw skill to work with my AIGW Account.
Run aigw status -o json and confirm apiBase is
https://api.aigw.loginid.ai. Then list my projects without changing them.
Use my saved DevCLI login, or AIGW_API_KEY if supplied by the environment.
If authentication fails, ask me to run aigw login in my own terminal.
Do not request or print API keys in this chat.

The assistant returns your Project list. If the skill is not visible, open a new session or ask Codex to read .agents/skills/aigw/SKILL.md directly. You can also mention $aigw in the Codex CLI or IDE skill picker.

Create a Project​

Use the aigw skill. Create an AIGW project named "Acme MCP dev" in my
Account. Check for an exact name match first and reuse it if there
is one; ask me which to use if there are multiple matches. Read the
project back and report its ID and name. Do not change policies yet.

The assistant should return the Project ID and verify it with projects get.

Connect your MCP server to a merchant API​

Use the aigw skill with my "Acme MCP dev" project.
Inspect this MCP server and list the project's Resources.
Help me configure an EXCHANGE Resource and a Proxy client.
After Resource creation, list its signing keys. If no key exists, create
one explicitly, read the list back, and verify the active kid is published
in the Resource JWKS before configuring merchant trust. Reuse an existing
active key; do not create another on each run.
Ask me for the merchant issuer, token endpoint, client ID, resource
indicator, scopes, and enabled identity providers you cannot find.
Do not invent those values.

Before creating the Proxy client, agree with me on a new secret-file
path outside the repository. Use --secret-file and keep secrets out
of chat. Read back configuration changes, then help me implement the
MCP authorization challenge, AIGW access token validation, credential redemption,
and merchant API call. Include ext_token:read in the agent authorization
when redemption is needed. Show me how to test the complete flow.

See Configure AIGW for the configuration inputs and MCP/UCP integration for the runtime flow.

Add AIGW sign-in to a web application​

Use OAUTH_CLIENT when the application signs users in directly through AIGW:

Use the aigw skill with my Account. Inspect this web app's framework
and existing authentication. Help me register an OAUTH_CLIENT Resource.
Ask me for the Project and HTTPS callback URL. Reuse a matching Resource
if one exists. Agree on a new secret-file path outside the repository
and use --secret-file when creating the client.

Use the returned discovery configuration with the app's OAuth/OIDC
library, keep credentials server-side, and implement the callback.
Read back the Resource and show me how to run and test sign-in.

Claude Code​

Install the AIGW skill​

aigw skill install

The skill is installed at ~/.claude/skills/aigw/SKILL.md, or under $CLAUDE_CONFIG_DIR/skills/aigw when configured.

After aigw login succeeds, start Claude Code from your application repository:

claude

Then send:

/aigw Use my AIGW Account. Run aigw status -o json and confirm
apiBase is https://api.aigw.loginid.ai. List my projects without changing them.
Use my saved DevCLI login, or AIGW_API_KEY if supplied by the environment.
If authentication fails, ask me to run aigw login in my own terminal.
Do not request or print API keys in this chat.

Reuse the task prompts above for creating a Project, connecting an MCP server, or adding web sign-in. Start each with /aigw.

Credentials and changes​

  • Run aigw login yourself before starting the assistant. Keep your API key out of prompts and tracked files.
  • Use --secret-file when creating clients that return one-time secrets.
  • Ask the assistant to read configuration back after changes.
  • Review the exact target before approving a delete, revoke, clear, or replacement.

After upgrading aigw, repeat the skill export for Codex or run aigw skill install for Claude Code. Each developer uses their own API key; a shared skill file contains instructions only.

Troubleshooting​

SymptomAction
aigw is not foundCheck aigw version in the assistant's terminal and make the binary available on its PATH
Status shows a different APIUpdate the DevCLI to v0.2.0 or later, remove custom endpoint overrides, and restart the assistant’s terminal
Exit code 3Run aigw login in your terminal, or update AIGW_API_KEY in the assistant’s secret settings
Exit code 4Add the permission named by the error; status requires project:read
Commands work in your terminal but not in the assistantRun the assistant as the same operating-system user with access to the credential store, or supply AIGW_API_KEY through its secret settings

See Codex skills and Claude Code skills for host-specific skill settings.