Skip to content

Commit cc6846c

Browse files
committed
rename blockstack-cli -> stacks-cli
1 parent abf0edc commit cc6846c

File tree

6 files changed

+63
-46
lines changed

6 files changed

+63
-46
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ members = [
1212
"stacks-signer",
1313
"stacks-node",
1414
"contrib/stacks-inspect",
15-
"contrib/blockstack-cli"
15+
"contrib/stacks-cli"
1616
]
1717

1818
exclude = ["contrib/tools/config-docs-generator"]

contrib/blockstack-cli/README.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

contrib/blockstack-cli/Cargo.toml renamed to contrib/stacks-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "blockstack-cli"
2+
name = "stacks-cli"
33
version = "0.1.0"
44
edition = "2024"
55

contrib/stacks-cli/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# stacks-cli
2+
3+
A CLI for building and signing Stacks transactions and interacting with Clarity contracts.
4+
5+
### Features
6+
7+
* **Transaction Building:**
8+
* `publish`: Deploy Clarity smart contracts.
9+
* `contract-call`: Call public functions on deployed contracts.
10+
* `token-transfer`: Transfer STX between accounts.
11+
* **Key Management:**
12+
* `generate-sk`: Generate a new Stacks private key.
13+
* `addresses`: Derive Stacks and Bitcoin addresses from a private key.
14+
* **Decoding Helpers:**
15+
* `decode-tx`, `decode-block`, `decode-header`, etc. - Decode raw, hex-encoded data structures.
16+
17+
### Build & Run
18+
19+
```bash
20+
# Build the CLI
21+
cargo build -p stacks-cli
22+
23+
# See top-level help
24+
cargo run -p stacks-cli -- --help
25+
```
26+
*Note the extra `--` to pass flags to the binary instead of cargo.*
27+
28+
### Global Options
29+
* `--testnet[=<chain-id>]` - Generate a transaction for the testnet. An optional custom chain ID can be provided in hex (e.g., `--testnet=0x12345678`).
30+
31+
### Examples
32+
33+
**Note:** All arguments are positional.
34+
35+
```bash
36+
# Publish a contract on testnet
37+
cargo run -p stacks-cli -- --testnet publish <SENDER_PRIVATE_KEY> <FEE_RATE> <NONCE> <CONTRACT_NAME> <PATH_TO_CLARITY_FILE>
38+
39+
# Call a contract function
40+
# Function arguments are passed using flags: -e (evaluate), -x (hex), or --hex-file
41+
cargo run -p stacks-cli -- contract-call <SENDER_PRIVATE_KEY> <FEE_RATE> <NONCE> <CONTRACT_ADDRESS> <CONTRACT_NAME> <FUNCTION_NAME> -e "'ST1...'" -e "u100"
42+
43+
# Transfer STX (amount is in micro-STX, memo is optional)
44+
cargo run -p stacks-cli -- token-transfer <SENDER_PRIVATE_KEY> <FEE_RATE> <NONCE> <RECIPIENT_ADDRESS> <AMOUNT_USTX> "my memo"
45+
46+
# Generate a new key and associated addresses
47+
cargo run -p stacks-cli -- generate-sk
48+
```
49+
50+
See `--help` on each subcommand for complete options (e.g., `cargo run -p stacks-cli -- publish -h`).
File renamed without changes.

0 commit comments

Comments
 (0)