Skip to content

Agent CLI deploy guide: use the alias instead of capturing the contract ID - #3161

Open
stellar-triage-bot[bot] wants to merge 3 commits into
mainfrom
docs-agent/2980-alias-show
Open

stellar-triage-bot[bot] wants to merge 3 commits into
mainfrom
docs-agent/2980-alias-show

Conversation

@stellar-triage-bot

@stellar-triage-bot stellar-triage-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Automated message from the Stellar Triage Bot.

Closes #2980

Working this because @kaankacar asked with /triage on #2980. Step 3 of the agent CLI deploy guide no longer captures the contract ID. It shows stellar contract alias show for when a tool needs the ID. Step 4's function-list command now passes --source, like every other contract command on the page. This replaces the closed #3086.

Why this matters

Agents copy this guide as is. Step 3 taught them to store deploy output in an unused shell variable, which stellar skill tells them not to do. Step 4's -- -h command had no --source, so an agent with no saved default got exit code 2 instead of the function list.

Sweep

Searched =$(stellar contract deploy, $(stellar contract, --id "$, CONTRACT_ID=, alias show and deploy ... > / | tee / .env in docs/, snippets/, openapi/, openrpc/ and .mintlify/skills/.

  • build-and-deploy-contracts.mdx:53: fixed here.
  • docs/build/guides/dapps/initialization.mdx:159: left. The script prints the captured ID, and a maintainer approved it in Fix the deploy, mint and init script on the dapp initialization guide #2989. It is a human setup script, not an agent guide.
  • docs/build/apps/dapp-frontend.mdx:166-177: left. The frontend template needs the ID to build its bindings.
  • SAC=$(stellar contract id asset ...) in send-tokens.mdx:68 and delegate-spending.mdx:158: left. That command computes a fixed asset contract address. It is not deploy output.
  • .mintlify/skills/cross-chain/SKILL.md "$OFT": left. It names an existing contract, not a deploy output, and skill pages are fixed upstream.
  • The skill itself does not mention alias show. That is upstream, in stellar skill tells agents not to capture contract IDs but not how to get one back stellar-cli#2880 (open).
  • contract invoke ... -- -h without --source: only build-and-deploy-contracts.mdx:78, fixed here. reference/architecture.mdx:132-133 already passes --source agent-1.

Verified

Verified against stellar-cli 30.0.1. The issue cited 28.1.0. The page pins none.

  • Ran steps 1 to 4 on testnet in a scratch project: contract init, contract build, keys generate --fund, contract deploy ... --alias hello_world, then contract invoke --id hello_world --source agent-1 --network testnet -- hello --to world.
  • Step 3: stdout was the contract ID alone.
  • Step 4: stdout was ["Hello","world"] alone. stderr said Simulation identified as read-only. Send by rerunning with --send=yes. No transaction was sent.
  • Step 4 with --send=yes: the CLI submitted a transaction and printed the same value.
  • -- -h with --source agent-1: lists hello on stdout, exits 1. Without --source and with no saved default: exits 2 with the following required arguments were not provided: --source-account.
  • -- hello -h: shows --to <String> on stdout, exits 1. The top-level -h lists only function names, so the page now says how to see arguments.
  • stellar contract alias show hello_world --network testnet printed the same ID alone on stdout. The info line goes to stderr.
  • On --network futurenet it exits 1 with no contract found with alias 'hello_world' for network ... (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/alias/show.rs).
  • A second deploy to the same alias moved alias show to the new ID. The overwrite warning is print.warnln (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/deploy/wasm.rs:272).
  • stellar contract info interface --id hello_world --network testnet resolved the alias.
  • The skill rule still holds: stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/skill/SKILL.md:45-59.
  • The AGENTS.md template that init writes is the same blob at v28.1.0 and v30.0.1, and it deploys with --alias too. So the page's link to it is still correct.
  • pnpm format:mdx, pnpm check and pnpm check:links pass.
  • A function with no return value prints an empty line (step 4). This PR does not change that sentence, and hello cannot test it, so it was checked from source: output_to_string returns an empty string when the function has no outputs (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/arg_parsing.rs:535-551), and invoke prints it with println! (invoke.rs run).

Not verified

Nothing left.

@mintlify

mintlify Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
stellar-docs 🟢 Ready View Preview Nov 16, 2026, 4:10 PM

@stellar-triage-bot stellar-triage-bot Bot added the bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge label Nov 16, 2026
@stellar-triage-bot

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Finishing my own PR for #2980, which @kaankacar asked for with /triage.

Verified against stellar-cli 30.0.1 source and the live preview. I pushed one fix: the page now quotes the full alias show error. Ready to merge.

What I checked

Only what this review added to the PR body or found different from it:

  • Fixed in 0435e30: the page quoted no contract found with alias 'hello_world', a cut-off message. The real text adds for network '<passphrase>' (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/alias/show.rs, Error::NoContract; same on main).
  • Body "Not verified: step 4": closed from source. invoke resolves --id aliases with resolve_contract_id for the network passphrase (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/invoke.rs:321-323). Step 4 itself is unchanged and not run.
  • Per-network storage: locator.rs:534 keys alias IDs by network passphrase.
  • alias show prints the ID with println! and the info line with Print (stderr, print.rs:20-30).
  • AGENTS.md template blob is d4a64dfb at v28.1.0 and v30.0.1, so the page's v28.1.0 link still matches.
  • SWEEP: no other deployed-ID capture in docs/, snippets/, openapi/, openrpc/ or .mintlify/skills/. The body's "left" items check out: both setup scripts already pass --alias, and SAC=$(stellar contract id asset ...) is a pure read.
  • Checks at 0435e30: checks, CodeQL, Socket and Mintlify Deployment pass. Preview serves the new line.
  • Versions: checked against stellar-cli 30.0.1. The issue cited 28.1.0. The page pins none.

@kaankacar

Copy link
Copy Markdown
Contributor

/triage

Run step 4 (stellar contract invoke) on testnet now. The runner allows the command since stellar/github-triage-bot#110. Then update the "Not verified" note in the PR body.

@stellar-triage-bot stellar-triage-bot Bot added bot:needs-decision Bot needs a maintainer decision (listing, scope, policy) and removed bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge labels Nov 16, 2026
@stellar-triage-bot

stellar-triage-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @kaankacar asked with /triage.

I could not run step 4. This review lane installs no stellar-cli, and its permissions block stellar. #110 changed the hook, but only the issue lane has the CLI. Should a maintainer run step 4, or should the issue lane re-run on #2980? @kaankacar @ElliotFriend

What I checked
  • PR body: the "Not verified" note now gives the current reason. It no longer says the runner refuses invoke.
  • stellar contract invoke --help and stellar version in this lane: blocked before they run.
  • stellar/github-triage-bot@55e5019: only docs-issue-agent.yml:460 runs scripts/install-stellar-cli.sh. docs-pr-review.yml does not.
  • From source: invoke resolves --id hello_world per network (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/invoke.rs:321-323). This PR does not change step 4.
  • Head 0435e30 unchanged. checks, CodeQL, Socket and Mintlify Deployment pass.
  • Decision tracked in stellar/github-triage-bot#112.

@stellar-triage-bot

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Back on this because @kaankacar asked with /triage on #2980.

Step 4 ran on testnet with stellar-cli 30.0.1 and works. The run found that the -- -h command had no --source and exits 2 without a saved default. e92fb01 fixes that line. The PR body's "Verified" and "Not verified" sections are updated. Details: #2980 (comment)

@stellar-triage-bot stellar-triage-bot Bot added bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge and removed bot:needs-decision Bot needs a maintainer decision (listing, scope, policy) labels Nov 16, 2026
@stellar-triage-bot

Copy link
Copy Markdown
Contributor Author

🤖 Automated message from the Stellar Triage Bot.

Reviewing because @kaankacar asked with /triage.

Step 4 ran on testnet in the issue lane, which answers the open question. I checked every changed line against stellar-cli 30.0.1 source and the live preview. Ready to merge.

What I checked

Only what this review added to the PR body or found different from it:

  • Body "Not verified" (empty line for a function with no return value): closed from source. output_to_string returns "" when the function has no outputs (stellar-cli@v30.0.1 cmd/soroban-cli/src/commands/contract/arg_parsing.rs:535-551), and run prints it with println!. Body updated.
  • --source on -- -h: source_account is a required clap arg with no default (stellar-cli@v30.0.1 cmd/soroban-cli/src/config/mod.rs:61-75). This matches the exit 2 the run saw.
  • -- -h and -- hello -h: both reach HelpMessage (arg_parsing.rs parse_command_matches), printed on stdout with exit 1 (cli.rs:89-92).
  • SWEEP: no other deployed-ID capture or -- -h without --source in agent guides. fully-typed-contracts.mdx:23 omits --source, but it is a concept page with sample output, not an agent recipe.
  • Checks at e92fb01: checks, CodeQL, Socket and Mintlify Deployment pass. The preview serves the new step 3 and step 4 lines.
  • Versions: checked against stellar-cli 30.0.1. The issue cited 28.1.0. The page pins none.
  • Hold stellar/github-triage-bot#112: answered by the issue lane run. Left open for a maintainer to close.

This branch was successfully deployed

1 active deployment
staging — e92fb01b Deployed Nov 16, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:ready-to-merge Bot verified and approved; waiting for a maintainer to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent CLI build and deploy guide: captures the contract ID the CLI's own skill says not to

1 participant