Skip to content

fix(cli): correct help text for faucet command#1830

Open
Wutche wants to merge 3 commits intostx-labs:mainfrom
Wutche:fix/1817-faucet-help-text
Open

fix(cli): correct help text for faucet command#1830
Wutche wants to merge 3 commits intostx-labs:mainfrom
Wutche:fix/1817-faucet-help-text

Conversation

@Wutche
Copy link
Copy Markdown

@Wutche Wutche commented Jan 4, 2026

The faucet command was incorrectly showing encrypt_keychain documentation. Updated to properly describe requesting testnet STX tokens. Closes #1817
@janniks @zone117x

Description

The stacks faucet command help text was copy-pasted from encrypt_keychain and showed incorrect documentation about encrypting backup phrases instead of describing the faucet functionality.

Fixed by updating the help text to correctly describe requesting free testnet STX tokens.

Breaking change?

None

Example

Before (incorrect):
$ stx help faucet
Command: faucet
Encrypt a 12-word backup phrase, which can be decrypted later with the
decrypt_backup_phrase command...

After (correct):
$ stx help faucet
Command: faucet
Request free Stacks tokens (STX) from the testnet faucet for the specified address.
This command only works on testnet and is useful for testing and development purposes.

Checklist

@jannik-stacks jannik-stacks requested a review from Copilot April 8, 2026 12:20
@jannik-stacks
Copy link
Copy Markdown
Collaborator

Hi 👋🏻 Thanks for your contribution — this repository now requires signed commits. Feel free to rewrite the commit after setting up signing and force-push to update the branch (recommended, quicker). Otherwise we may fork the changes to another PR and sign your commit for you.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #1817 where the stacks faucet command was incorrectly displaying help text from the encrypt_keychain command. The help text has been updated to correctly describe requesting free testnet STX tokens and includes an appropriate example command with expected output.

Changes:

  • Updated help text description for the faucet command to clearly explain it requests free Stacks tokens from the testnet faucet
  • Replaced the example command from demonstrating key encryption to showing the actual faucet command usage
  • Updated the example output to show the expected transaction ID and explorer link format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/argparse.ts Outdated
Comment on lines +662 to +663
" txid: '0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3',\n" +
" transaction: 'https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet'\n" +
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example JSON output in the help text is not valid JSON. In JSON format, object keys must be enclosed in double quotes (e.g., "txid" instead of txid), and string values must also use double quotes (e.g., "0xd33..." instead of '0xd33...'). The current format appears to be JavaScript object notation rather than valid JSON.

Suggested change
" txid: '0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3',\n" +
" transaction: 'https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet'\n" +
' "txid": "0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3",\n' +
' "transaction": "https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet"\n' +

Copilot uses AI. Check for mistakes.
@Wutche
Copy link
Copy Markdown
Author

Wutche commented Apr 8, 2026

Hi 👋🏻 Thanks for your contribution — this repository now requires signed commits. Feel free to rewrite the commit after setting up signing and force-push to update the branch (recommended, quicker). Otherwise we may fork the changes to another PR and sign your commit for you.

Alright thanks

The faucet command was incorrectly showing encrypt_keychain documentation.
Updated to properly describe requesting testnet STX tokens.
Closes stx-labs#1817
@Wutche Wutche force-pushed the fix/1817-faucet-help-text branch from b2b5c49 to 60082f5 Compare April 12, 2026 16:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/argparse.ts Outdated
@Wutche
Copy link
Copy Markdown
Author

Wutche commented Apr 12, 2026

@jannik-stacks you can check it out now

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +654 to 659
'Request free Stacks tokens (STX) from the testnet faucet for the specified address. ' +
'This command only works on testnet and is useful for testing and development purposes.\n' +
'\n' +
'Example:\n' +
'\n' +
'```console\n' +
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help text is long and built via many string concatenations, which is harder to scan and edit (especially the example block). Consider switching this help value to a single template literal (maintaining the same output) to reduce concatenation noise and make future edits less error-prone.

Copilot uses AI. Check for mistakes.
Comment thread packages/cli/README.md
Comment on lines +323 to +324
"txid": "0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3",
"transaction": "https://explorer.hiro.so/txid/0xd33672dd4dbb0b88f733bc67b938359843123ca3be550ca87d487d067bd1b3c3?chain=testnet"
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README example output was changed to strict JSON-style quoting. Please ensure this matches the actual CLI output formatting (e.g., if the CLI prints JSON.stringify(...)). If the CLI prints a Node-style object (unquoted keys / single quotes), the README should mirror that to avoid confusing users.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@stacks/cli: Help text for stacks faucet incorrect

3 participants